# Build your first workflow

Make a form that saves each answer as a new row in Google Sheets.

## You need

- Cloud · **A GoRunner account**: [Sign up for GoRunner Cloud](https://app.gorunner.io/signup).
- Self-hosted · **A GoRunner account**: Your admin invites you to your installation.
- Embed · **A GoRunner account**: You open GoRunner from inside the product you use.
- **A Google account**: You sign in to it in step 4.
- **A Google Sheet**: With `Name` in cell A1 and `Email` in B1.

## 1. Create a workflow

1. Open **Workflows** and press **New workflow** at the top right.
2. Press the name **Untitled workflow** at the top and type `Join the list`.

![A new workflow opens as an empty canvas, with Add a trigger in the middle.](https://docs.gorunner.io/assets/img/build/fw-1-canvas-light.jpg)

You should see an empty canvas, with **Add a trigger** in the middle.

## 2. Add the form

1. Press **Add a trigger**, type `form` and choose **Form**.
2. Set **Form Title** to `Join the list`.
3. Under **Fields**, press **Add Field** and label it `Name`.
4. Press **Add Field** again, label it `Email` and set its type to **Email**.

The form is this workflow’s [trigger](https://docs.gorunner.io/glossary#trigger): the thing that starts it.

![The Form trigger with two fields, Name and Email.](https://docs.gorunner.io/img/build/fw-2-light.jpg)

Under each field is the expression that will hold its answer, such as `{{trigger.body.name}}`.

## 3. Add Google Sheets

1. Under the form’s card, press **+** (Add step at the end).
2. Type `sheets` and choose **Google Sheets**.
3. Set **Resource** to **Sheet (Rows)** and **Operation** to **Append Row(s)**.
4. Press the step’s name at the top of its panel and type `Add a row`.

![Typing sheets in Add a step finds Google Sheets.](https://docs.gorunner.io/img/build/fw-3-light.jpg)

You should see a second card: **Add a row · 01 · Google Sheets**.

## 4. Connect your Google account

1. Under **Connection**, press **New**.
2. Press **Sign in with Google**.
3. Choose your account in Google’s window and allow access.

![Connect Google Sheets, with the Sign in with Google key.](https://docs.gorunner.io/img/build/fw-4-light.jpg)

You do this once. Every workflow in this workspace can use the [connection](https://docs.gorunner.io/glossary#connection).

**What if it says “Set up Google sign-in”?**

This installation has no Google app yet. If you’re an admin of this installation, paste the **Client ID** and **Client secret** of a Google Cloud app. Add the **Redirect address to add in Google Cloud** to that app, then press **Save and sign in**. Everyone on the installation can then sign in with Google.

Publish the app in Google Cloud: an app left in Testing signs everyone out after 7 days.

![Set up Google sign-in asks for a Client ID and a Client secret.](https://docs.gorunner.io/img/build/google-setup-light.jpg)

Anyone else sees “Google sign-in isn’t set up here”, with the name of an admin to ask.

## 5. Choose what to write

1. In **Spreadsheet**, paste your sheet’s address from the browser.
2. In **Sheet**, choose the tab, such as **Sheet1**.
3. In **Data**, paste this exactly. You don’t need to write it yourself:

```json
{"Name": "{{trigger.body.name}}",
 "Email": "{{trigger.body.email}}"}
```

The words before each colon are your sheet’s column names, from row 1. Each `{{ }}` is replaced with what the person typed.

![The Add a row step: spreadsheet, Sheet1, and the Data field with two pills.](https://docs.gorunner.io/img/build/fw-5-light.jpg)

You should see each expression as a pill, such as **trigger.body.name**.

## 6. Test it

Press **Test** in the top bar. GoRunner runs your draft once, with an empty sample in place of a real answer. The steps do real work, so Google Sheets writes to your sheet. If a card shows **Failed**, select it to read why.

![After Test, both cards show Worked.](https://docs.gorunner.io/img/build/fw-6-light.jpg)

You should see Worked on both cards. The test wrote a blank row, because the sample was empty: your sheet looks the same, and the first real answer fills that row.

## 7. Publish

Press **Publish**. From now on, every answer starts a [run](https://docs.gorunner.io/glossary#run).

![The workflow’s state reads Live.](https://docs.gorunner.io/img/build/fw-7-light.jpg)

You should see the state next to the name changes from **Draft** to **Live**.

## 8. Send the form

1. Select the **On Form Submission** card.
2. Copy the **Form URL (public)** and open it in a new tab.
3. Fill in the form and press **Submit**.

![The published form, Join the list, filled in.](https://docs.gorunner.io/img/build/fw-8-light.jpg)

Within a few seconds, a new row appears in your sheet:

| Row | A | B |
| --- | --- | --- |
| 1 | Name | Email |
| 2 | Ada Lovelace | ada@acme.com |

*Row 2 is the answer you sent.*

To see each time the workflow ran, open **Runs**.

## What you built

A workflow is a trigger, here the form, followed by steps, here Google Sheets. **Test** runs your draft once. **Publish** makes it live, so every new answer starts a run.

## Next

- [What is a workflow?](https://docs.gorunner.io/build/what-is-a-workflow): Triggers, steps, drafts and runs · 4 min
- [Use data from earlier steps](https://docs.gorunner.io/build/use-data-from-earlier-steps): Put a form answer into an email · 5 min
- [Connect Gmail](https://docs.gorunner.io/apps/gmail#connect): Sign in once, use it in every workflow

Source: https://docs.gorunner.io/build/first-workflow
