> ## Documentation Index
> Fetch the complete documentation index at: https://parabola.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Set Up a Google Sheets Button to Trigger a Parabola Flow

> Add a button in Google Sheets that triggers a Parabola flow via webhook using Google Apps Script.

Use this guide to add a button in Google Sheets that triggers a Parabola flow via webhook.

## Prerequisites

* A Parabola flow with a **webhook trigger** enabled
* A Google Sheet where you want the button

## Step-by-step setup

<Steps>
  <Step title="Get your Parabola webhook URL">
    1. Open your Parabola flow
    2. Click the **lightning bolt** icon (triggers)
    3. Toggle on **Webhooks**
    4. Copy the generated webhook URL
    5. Make sure the flow is **turned on**
  </Step>

  <Step title="Add the Apps Script">
    1. Open your Google Sheet
    2. Go to **Extensions > Apps Script**
    3. Delete any boilerplate code in `Code.gs`
    4. Paste this code:

    ```javascript theme={null}
    function triggerParabolaFlow() {
      var url = "PASTE_YOUR_WEBHOOK_URL_HERE";
      UrlFetchApp.fetch(url, { method: "post", muteHttpExceptions: true });
      SpreadsheetApp.getActiveSpreadsheet().toast("Flow triggered!", "Parabola", 3);
    }
    ```

    5. Replace `PASTE_YOUR_WEBHOOK_URL_HERE` with your webhook URL
    6. Press **Ctrl+S** to save
  </Step>

  <Step title="Import the macro">
    1. Go back to your Google Sheet
    2. Click **Extensions > Macros > Import macros**
    3. Find `triggerParabolaFlow` and click **Add function**
  </Step>

  <Step title="Create the button">
    1. Go to **Insert > Drawing**
    2. Create a shape and add text like **"Run Parabola Flow"**
    3. Click **Save and Close**
  </Step>

  <Step title="Assign the script">
    1. **Single click** the drawing
    2. Click the **three dots** menu in the top-right corner
    3. Select **Assign script**
    4. Type exactly: `triggerParabolaFlow`
    5. Click **OK**
  </Step>

  <Step title="Authorize the script">
    The first click will prompt authorization. Click **Continue**, select your account, and click **Allow**. If you see an "unverified app" warning, click **Advanced > Go to \[project name]**.
  </Step>
</Steps>

## Troubleshooting

| Issue                                | Solution                                                         |
| ------------------------------------ | ---------------------------------------------------------------- |
| "Script function could not be found" | Import the macro via **Extensions > Macros > Import macros**     |
| Toast error about null               | Run the script from the sheet button, not the Apps Script editor |
| Flow doesn't run                     | Make sure the flow is turned on in Parabola                      |
