All workflows using webhooks will start in response to a trigger. To trigger a workflow using a webhook, you need to configure the webhook which will start your workflow in Contractbook when an event you specify occurs in another application.
Webhook request is received trigger allows you to trigger the automation from the outside by making an HTTP POST request to the URL generated by that trigger and map the data coming from the request’s payload to the named variables that can be used in the subsequent actions.
Receive Webhook requests (and use them as a Trigger)
Choose Automations from the top main menu in Contractbook app and click on Create new button.
Then select Webhook request is received from the drop-down list of available trigger options for the automation setup:
Then proceed with the Automation action configuration in the window which will automatically open on the right-hand side of the screen:
- You can generate a unique URL to which other services can make POST requests
- You can then specify the paths to the fields in the data payload and assign specific variable names to them
How to configure your webhook trigger in the Automation Builder?
The external service you choose to create and configure your webhook needs to provide you with the ability to make an HTTP POST request to Contractbook as soon as a certain event occurs.
Contractbook will generate a unique request URL for your workflow in the trigger event of the automation setup, and you can simply copy the generic URL and paste it in the external service (or tool) with which you want to integrate Contractbook.
You can then configure your webhook to give information to Contractbook via HTTP type of request. Any data your webhook sends to Contractbook can be referred to in the following workflow steps by constructing variables.
Create custom variables
To create a custom variable, you have to add a key-value pair in the in-app Automation Builder as a text-based variable.
You can define your own variables to use in subsequent actions based on the data that you send together with your webhook requests. To do that, you have to specify the label of the variable and the path to the field in the data payload whose value should be assigned to that variable. Specify paths using the object dot notation (for example object1.object2,array[0].field).
Get your web request URL
The automation starts when an HTTP request to the given URL is received.
Request URLs start with https://api.contractbook.com/automations/webhooks/contractbook/ and are followed by a randomized string of characters.
Be sure to keep your request URL secure, as anyone with the link will have the ability to trigger your workflow.
Regenerate a webhook URL
If a webhook’s URL gets exposed or needs to be changed for any reason, follow the steps below:
- Open the webhook automation flow you have configured in the in-app Automation Builder
- Click on the small icon next to the URL field
- Select Generate new URL and save your changes
How to test webhook triggers in the Automation Builder?
If you want to test Webhook triggers you do not have to specify any paths to fields, you can instead simply publish the automation without specifying any fields. The payload of any requests made can be seen in the automation history.
If you still need additional information or assistance, reach out to us at any time by contacting our Support Team.
Comments
0 comments
Please sign in to leave a comment.