Create flexible automated workflows without the need for developers
Contractbook in-app automation builder offers you a variety of automation workflows and integrations with your tech stack that you can use to empower your contract management.
Connect Contractbook to your tech stack through our native integrations or our user-friendly webhooks interface. Increase collaboration and transparency in your organization.
Click on Automations from the top menu and open My automations page from the left-hand side. You can then choose Create New from the upper right-hand corner of the page:
Reach out to your Customer Success Manager or our Support Team if you want to learn more about the possibility of including webhooks access to your current subscription with us.
What are Webhooks?
A webhook can be described as a lightweight, event-based API that powers one-way data sharing across the web. Webhooks are an effective method for your applications to communicate with each other.
In essence, webhooks allow you to send real-time data from one application to another whenever a given event occurs.
How do Webhooks work?
Webhooks are different from APIs. While APIs need to pull data from a server periodically to stay up to date, webhooks simply push data to a unique URL as soon as a given event occurs. Therefore using webhooks is faster than using APIs and requires fewer configuration steps.
Webhooks are HTTP POST requests that carry a payload and are transmitted to a unique URL.
Using webhooks triggers and actions in our in-app Automation Builder lets you automatically receive or dispatch event-based messages related to your contracts inside Contractbook.
This means that you can build simple workflow automations between Contractbook and third-party applications, even if we do not have a native integration to these.
You can use webhook triggers and actions to achieve this:
Webhook Trigger → Receive data from a third-party application into Contractbook
Webhook Action → Push contract data from Contractbook to a third-party application
This allows you to:
- Automate manual work steps in your contract management process across applications
- Accomplish consistent data across all of your applications
- Eliminate the risk of manual errors and tedious manual work
As an example, you can set up an in-app automated workflow in which each time a contract is fully signed, a renewal request will automatically be sent to Google Calendar by fetching the exact renewal date of the signed contract.
- Trigger event: Contract is fully signed
- Action: Send a webhook request to Google Calender and create an event with the contract's title scheduled for the exact renewal date
- Data payload: Editable fields: Renewal date
You can purchase access to webhooks as a separate solution added on top of your Contractbook Foundation plan. It will allow you to integrate almost every possible tool to Contractbook, with several small exceptions.
If you need more technical documentation regarding the use of webhooks and public APIs, click here.
How to set up a webhook trigger?
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.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 set up a webhook action?
Send a webhook request action allows you to call a URL from the third party application (service) of your choice with a given data payload and additional headers like authorization tokens and more. This basically allows you to automatically call a third-party app with a specific URL and a data payload of your preference.
As a trigger event in this case, you are free to choose any of the available in the Automation Builder trigger events, such as a contract is fully signed, a draft is created, a draft is updated, a questionnaire is completed.
Send a webhook request (and use it as an Action)
You need to start off with the URL to call which can be found in the external third-party app which you want to integrate with.
Insert the relevant data in this first field and then proceed with the following configuration fields.
Use the Data payload section of the setup to add the field path and value and this way specify the payload which will be sent along with the HTTP request.
The final customization in this step of the configuration will be to specify headers that should be sent with the HTTP request. The default value for Content-Type header is application/json, but we also support application/x-www-fowm-urlencoded. In order to use it, you have to specify that header explicitly.
- Will always be POST requests
- Dynamic values from contracts can be sent in the webhook payload
- HTTP headers can be added as well (for Authorization and Content-Type)
- The default Content-Type is application/JSON, nevertheless, we do also support application/x-www-form-url encoded if that is being specified in the header instead
Note: Keep in mind that both webhook trigger and action can be combined with any other document-related Automation Builder triggers, such as draft created, draft updated, contract signed, filters, task actions, questionnaire completed, and others. This allows you to completely customize the workflow you want to achieve and to create even more powerful automations.
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.