Webhook-Triggered Automations

Trigger automations with webhooks

Updated over a week ago

Setting up the rule

  1. Select “Webhook invoked” as the rule trigger.

    Screen Shot 2022-04-26 at 09.34.40.png
  2. Set up the rest of rule steps. You will be able to reference the webhook payload (JSON object) in later steps as Step 1 Result. For example, if the payload is {"message": "hello!"}, you can use ParseJSON([Step 1 Result].ToText(), "message") to get the message value.

Triggering the rule

  • The rule is triggered when you send a POST request to the URL provided in Step 1. You will need to provide an API token with write access to the doc using Bearer Authentication.

  • You can create a new API token from Step 1 of the rule builder or use an existing API token. You can reuse the same API token to trigger multiple rules in the same doc.

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

Tips & Tricks

  • The rule must be “on” in order for the webhook to trigger the rule execution.

  • If you turn on developer mode on your account page (under Labs > Enable Developer Mode), you can find the automation rule id by clicking on the three dot menu for a given rule.

    Screen Shot 2022-04-26 at 12.51.21.png

Technical Notes

  • The Webhook invoked URL pattern is a new trigger automation for Step 1.

  • 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 automation is run.

  • The webhook is currently implemented as an API endpoint, so the existing API limitations 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.

  • 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.

Did this answer your question?