Webhooks allow you to trigger certain actions whenever an endpoint is triggered. They can be chained together as well as run in parallel to create complex workflows and operations.
We support a variety of 3rd party integrations. You can perform actions such as send messages, trigger deploys, execute serverless functions and much more.
Example: Send a message on Slack whenever a new entry is created in the Leads table.
Top Level Properties
Property | Description |
---|---|
Name | The name of the table. Can be any arbitrary value. |
Type | The type of resource. It can be either list type or an individual table. Learn More |
Webhook Types
We support a variety of 3rd party integrations. We bucket them essentially into 5 categories
-
MESSAGE
Send a message whenever a particular endpoint is triggered.
We currently support Slack, Mailgun, Twilio for sending messages. The message to be sent can refer to any of the previous webhook's data through template strings. Just pass them as handlebar variables and they will be replaced with the data when triggered.
Example message that uses variables:
A new lead was created! Name:
email:Supported Providers:
-
BUILD
Trigger a build whenever a particular endpoint is triggered. Particularly useful when integrating with JAMStack. We support a plethora of providers. Click on the links to read recipes on how to use them.
Supported Providers
-
FUNCTION
Execute a function on AWS Lambda or Google Cloud whenever a particular endpoint is triggered.
The function is called with the data from the endpoint that triggered it along with the results from the all the webhooks preceding it.
Supported Providers:
-
MUTATION
Execute another mutation from within your Canonic project. This allows you to chain multiple mutations and webhooks together.
The mutation must be called with the right parameters. Consider using a Lambda before it normalize the data as necessary.
Recipes:
-
CUSTOM
Run arbitrary code in a secure vm environment. This allows you to integrate virtually any modern service in existence. Just call their respective APIs from the code. Read More
BETA ALERT: This is an in-progress beta feature. Please avoid using it in sensitive use cases.
Recipes:
Creating a Webhook
Create a webhook by clicking on the + button next to the mutation you want to add the webhook to.
You will see a new webhook pop up on the graph with the the properties panel for the webhook visible on the right side. Fill out the properties. Once done, close the properties panel to save your changes.
Editing a Webhook
You can edit a webhook by clicking on the webhook node on the graph. The properties panel will open up where you can edit all necessary properties.
Note: Some properties are editable but are not recommended to be edited once you go live with your project as they can cause loss of data. You will be shown a warning when performing such actions.
Note Although changes are saved automatically, they must be published for them to reflect in the Docs and be available for consumption.
Deleting a Webhook
A webhook can be deleted by simply right clicking on the webhook and selecting delete.
Caution! This is a dangerous action and can cause permanent loss of data once the graph is published.
Chaining Webhooks
You can chain multiple webhook together. To execute another webhook after the previous webhook completes, click on the "+" button on the right side of the webhook to create another webhook that would be chained to the previous one.
To run another webhook in parallel, click on the plus button on the left, near the previous webhook to create one in parallel.