## What is Zapier?

Zapier is a no-code automation platform that connects web applications. Each automated workflow in Zapier is called a “Zap.” A Zap starts with a **trigger** — an event in one app — and runs one or more **actions** in other apps. Gavel acts as a trigger: when a user finishes a Gavel workflow, the Zap fires and carries the answers into whatever apps you configure.

Gavel’s Zapier app uses the trigger event **“Workflow Completed.”** You map this to any Zapier action — creating contacts, updating spreadsheets, sending emails, and more.

---

## Send data from Gavel to Zapier (data only)

Use this path when you want to send questionnaire answers to another app but do not need to include the generated documents.

1. Finalize your Gavel workflow
   
   Zapier expects consistent field names. Complete and test your workflow before connecting it to Zapier. If you later add, remove, or rename questions, you will need to update your Zap to match.

2. Create a new Zap in Zapier
   
   Log in to Zapier and click **Create Zap**. In the trigger search box, type **Gavel** and select it from the results.

3. Select the Workflow Completed trigger event
   
   In the **Trigger Event** dropdown, choose **Workflow Completed**, then click **Continue**.

4. Connect your Gavel account
   
   Zapier will prompt you to authenticate. Enter your Gavel **subdomain** and your **API key**. If you have not created an API key yet, see [Creating an API key](https://helpdocs.gavel.io/workflows/api#creating-an-api-key).

5. Send test data from Gavel
   
   In your Gavel workflow, open **Settings > Integrations** and click **Send Test Data**. This sends a sample payload to Zapier so it knows what fields to expect.

6. Test the trigger in Zapier
   
   Back in Zapier, click **Test trigger**. You will see a list of all the variable names and values sent from Gavel. Click **Continue** to proceed to the action step.

7. Add an action and map fields
   
   Select the app you want to send data to and map Gavel’s fields to that app’s fields. Click **Publish Zap** when you are ready.

Zapier adjusts variable names slightly for display: underscores are removed and the name is title-cased. A Gavel variable named `my_address` appears in Zapier as **My Address**. The underlying data is unchanged.

---

## Send data and documents from Gavel to Zapier

When you also want your generated documents delivered through Zapier, use the **Webhooks by Zapier** approach instead of the native Gavel trigger.

1. Finalize your Gavel workflow
   
   As with the data-only path, complete and test the workflow before wiring up Zapier.

2. Connect your Gavel account in Zapier
   
   In Zapier, click **My Apps**, search for **Gavel**, and authenticate with your subdomain and API key.

3. Create a Zap using Webhooks by Zapier
   
   Click **Create Zap**. In the trigger search box, type **Webhooks by Zapier** and select it.

4. Choose Catch Hook as the trigger event
   
   In the **Trigger Event** dropdown, choose **Catch Hook**, then click **Continue**. Zapier will generate a webhook URL — copy it.

5. Paste the URL into your Gavel workflow
   
   Open your workflow in Gavel, go to **Settings > Integrations**, and paste the webhook URL. Check the **Include Documents** checkbox to attach your generated documents to the payload.

6. Send test data from Gavel
   
   Click **Send Test Data** in Gavel to fire a test payload to the Zapier webhook URL.

7. Test the trigger in Zapier
   
   In Zapier, click **Test trigger**. Confirm you can see the Gavel variable data (and document URLs if you enabled Include Documents). Click **Continue**.

8. Add actions and publish
   
   Map the Gavel fields to your target app’s fields and publish the Zap.

---

## Custom webhooks (non-Zapier integrations)

If you have a developer or prefer to build your own integration, you can send workflow data to any HTTP endpoint directly from Gavel — no Zapier required.

1. Open your workflow's Settings tab
   
   In the workflow builder, go to **Settings > Integrations** and click **New Webhook**.

2. Enter your webhook URL
   
   Paste your endpoint URL into the **Webhook URL** field.

3. Choose whether to include documents
   
   Check the **Include Documents** checkbox if you want the generated output documents to be included in the payload.

4. Add custom headers (optional)
   
   If your endpoint requires authentication or custom headers, expand the headers section and add the key-value pairs you need.

5. Send test data
   
   Click **Send Test Data** to fire a test payload. Use a tool like [requestbin.com](https://requestbin.com/) or [postb.in](https://postb.in/) to inspect the shape of the request before you go live.

---

## Question types Gavel sends to Zapier

Gavel sends answers for the following question types through both the Zapier app and webhook: Text, Text Area, Dropdown, Combobox, Single Select, Multi Select, Yes/No, Number, Number (with decimal), Date, Email, Repeating Item (with all supported sub-types), Clio Contact, Clio Matter, CSV Data Source, and any variables created via Invisible Logic.

---

## Advanced Zapier features

Once your data is flowing into Zapier, you can use Zapier’s built-in tools to build sophisticated automations:

- **Paths** — route data based on conditions

Use Paths to send data down different branches depending on the answers in your workflow. For example, route new estate planning clients to one action and business clients to another based on a question answer.

- **Filter** — only proceed when a condition is met

Add a Filter step to stop a Zap from running unless specific criteria are true. For example, only create a new matter in your practice management system if the client answered “Yes” to a specific question.

- **Formatter** — transform your data

Use Formatter to reformat dates, change text case, split names into first and last, extract phone numbers, or perform calculations on numeric answers before sending them to the next app.

- **Looper** — iterate over repeating items

Use Zapier’s Looper app to run subsequent steps once for each row in a Gavel repeating item — for example, creating one calendar event per party in a multi-party agreement.

- **Delay** — pause between steps

Add a Delay step to hold an action for a set amount of time — for instance, send a follow-up email three days after a client completes an intake workflow.

If you cannot find a suitable app in the Zapier library, use the generic **Webhooks by Zapier** action to POST data to any custom endpoint your developer builds.
