# Submitting a Google Form using the Command Line | Yazin Alirhayim

**TLDR:** Use the tool at the [bottom of this page 👇](https://yaz.in/p/submitting-a-google-form-using-the-command-line#tool)

I use Google Forms ALOT! On a normal day, I'm looking at 10 — 15 submissions to the same two forms: a personal expense tracking form, and a company expense tracking form.

The traditional process of opening the browser, typing in the URL, manually filling in the different fields and hitting Submit was getting incredibly annoying. I wanted a way to be able to submit a form in seconds, and without leaving whatever it was I was working on.

I needed a way to submit a form using the command line!

## [](https://yaz.in/p/submitting-a-google-form-using-the-command-line#the-steps)The Steps

Turns out, it's actually pretty simple to do!

1.  Head over to your form URL and click on the "Edit" icon in the top-right: ![](https://yaz.in/assets/images/edit-icon.png "Edit Icon")
2.  Click on the `⋮` in the top-right, and select "Get pre-filled link": ![](https://yaz.in/assets/images/get-prefilled-link.png "Get prefilled link")
3.  Fill the form, and click "Get link": ![](https://yaz.in/assets/images/fill-form.png "Get link")
4.  You should now have a link that looks something like this:

    ```
    https://docs.google.com/forms/d/e/1FAicQLSe-Tdl1aEjHkKdsS0oQ0g-jfIqvQaAGT0enZoyIXlYh4UjKHg/viewform?usp=pp_url&entry.1491423912=Shopping&entry.1092687747=100&entry.478624260=1kg+of+frog+legs
    ```

    Now, we just need to make 2 changes (not needed if you're using my fancy tool below):
    *   Replace `viewform` with `formResponse`, and
    *   Append `&submit=Submit` to the end of the URL

That's it! You can paste that link into your browser, and you should see the familiar "Your response has been recorded" message.

## [](https://yaz.in/p/submitting-a-google-form-using-the-command-line#an-even-easier-way)An even easier way…

Of course, to actually use this in the command line, we need to use `curl`.

To make things easy for you, I created a neat little tool for this. Just paste your _pre-filled link_ from above, and it'll generate the curl command for you!

## The Tool 🛠

Paste your pre-filled link below:

and… hey presto ✨

Your `curl` command is:

```
curl -G -Ss \
  --data-urlencode "entry.123=Example" \
  https://docs.google.com/forms/d/e/.../formResponse?usp=pp_url
```