Skip to main content
All CollectionsDoc managementDoc usage & navigation
Create webhook-triggered automations
Create webhook-triggered automations

Learn how to create webhook-triggered automations to seamlessly connect your Coda docs to external apps

Updated over a month ago

Webhook-triggered automations in Coda let you seamlessly connect your docs to external apps and services, automating workflows in real time. When an event occurs in an external app, it sends data straight to your Coda doc to trigger an action, such as adding a row or updating a table.

Within this article you’ll find...


What is a webhook?

Imagine you’ve ordered pizza from your favorite restaurant. Instead of calling repeatedly to ask, “Is my pizza ready yet?”, you ask them to notify you the moment it’s out of the oven. Later, you get a text: “Your pizza is ready for pickup!” This is the basic idea of webhooks—a way for one system to notify another automatically when something important happens.

Webhooks are automated messages sent from one app to another whenever a specific event occurs, like digital notifications. They push information as soon as it happens, eliminating the need for manual checks.

Webhooks save time and effort by keeping apps in sync. They can log a sale, send a notification, or trigger a new task without human involvement. Once set up, they ensure the right information gets where it needs to be—just like a text message telling you your pizza is ready.

Webhook-triggered automations

Webhook-triggered automations in Coda let you seamlessly connect your documents to external apps and services, automating workflows in real time.

Let’s say you run an online store. Each time someone makes a purchase, your payment platform (like Stripe, for example) sends out a webhook message containing the purchase details. This message is sent to a URL you’ve set up in another app, such as your inventory tracker in Coda. With the help of a webhook-triggered automation, as soon as this message arrives, Coda can log the order and update your records automatically, without you lifting a finger.

Set up your webhook-triggered automation

To create a webhook-triggered automation, follow these steps:

  1. Inside your Coda doc, click on the gear icon in the upper right

  2. Select Automations from the list

  3. Click + Add rule

  4. For the When step, select Webhook invoked from the dropdown menu. In the URL section, a URL will be generated by Coda that you can use to make POST requests to.

  5. To successfully trigger this automation via an external source, you will need to provide the external source with an API token with write access to the doc using Bearer Authentication. You can create a new API token by clicking Create API token, or use an existing API token. You can also reuse the same API token to trigger multiple rules in the same doc.

    1. Note: You can view and remove API tokens from your account page under Coda API tokens.

  6. Continue setting up the rest of your automation rule based on your preferences. Read more about setting up automations here.

create webhook triggered automation.gif

Note that you will be able to reference the webhook payload (JSON object) in later steps of your automation using the name Step 1 Result. For example, if the payload is {"message": "hello!"}, you can use the ParseJSON() formula to get the message value:

ParseJSON([Step 1 Result].ToText(), "$.message")

📣 For more info on Step 1 Result, check out this article, and for more on ParseJSON(), click here.

Trigger your automation rule

The automation rule will be triggered when you send a POST request to the Coda URL provided in the first step of your automation.

If you provide a JSON payload in the POST request body, the payload will be available in later automation steps as Step 1 Result.

ℹ️ What is a POST request?

A POST request is a type of HTTP request method used when a client sends data to a server to create or update a resource. Think of it like filling out a form online—when you hit “Submit,” all your information (like name and shipping address) is sent to the store’s website so they can process your order.

Similarly, a POST request sends data from one app or website to another to trigger an action, like logging a purchase or creating a new record. It’s a simple way for systems to pass information to each other and "do something" with it, such as sending a confirmation email after a form is filled out, or sending that information to a tool like Coda, which can automatically log it in a table.

Trigger your automation with the Coda API

The triggerWebhookAutomation endpoint in the Coda API allows you to programmatically trigger automations within a specific Coda document. Here is the documentation for this API endpoint.

To use the API endpoint, you’ll need to find your automation rule ID.

First, turn on developer mode on your account page. You can find this setting under Labs > Enable Developer Mode.

Once you’ve toggled that on, you can find the automation rule ID by clicking on the three-dots menu for a given rule.

copy rule id for automation.gif

FAQs

I’m seeing a 202 response to the POST request, but nothing happened.

A 202 response to the POST request only guarantees that the automation trigger was queued for processing. Depending on a few factors (e.g. how many other API requests your doc is processing), there may be a delay from when the POST request is made and when the results of the automation occur.

Do the API limits apply to webhook-triggered automations?

Yes. The webhook is currently implemented as an API endpoint, so Coda’s API limits still apply. Doc size must be below the maximum doc size to use the API, and the requests are subject to the API rate limiting.

I need to use an unauthenticated webhook endpoint. Can I do that?

If you require unauthenticated webhook endpoints we recommend using Zapier webhooks as an intermediary between your service and the Coda webhook. At this time, our webhook endpoint only supports POST requests with the proper Bearer Authentication.


Related resources

Did this answer your question?