Webhooks enable Servis.ai to manage workflows based on real-time events from third-party systems that support HTTP callback notifications. This approach eliminates the need for polling external systems for updates.
Key Features of Webhooks:
- Immediate Event Capture: Define incoming HTTP webhooks to instantly capture external integration-related events as they occur within Servis.ai.
- Flexible Request Handling: Support for both GET and POST HTTP requests ensures compatibility with various external systems
By leveraging webhooks, you can streamline your integration processes, ensuring timely and efficient data handling within Servis.ai.
User Permissions: Only Admins or App Admins can add new webhooks.
In this tutorial, we will cover the following topics:
Navigate to Webhooks
Go to Settings > Integrations > Webhooks.
Create New Webhook
Click the 'Add Webhook' button.
This will open the webhook creation page.
1. Name
Give your Webhook a name
2. Description
Add a description. We recommend that it be something easy to identify.
3. URL
The URL field is greyed out, as it is a system field. This means that Servis.ai will automatically create an URL for your webhook.
4. APP
Up next, there is the App field. If you go to the Webhook settings page through your App it will be specified here. If you are an admin, you can choose between your existing Apps.
5. Method
There are two supported methods for Webhooks:
METHOD | DESCRIPTION |
GET | Requests Data. |
POST | Sends Data. |
6. Type
You can choose between two types:
-
Synchronous Webhooks:
- Real-time communication.
- Sender waits for an immediate response.
- Suitable for scenarios requiring immediate feedback.
-
Asynchronous Webhooks:
- Delayed communication.
- Sender doesn't wait for a response.
- Suitable for scenarios where response delays are acceptable.
7. Automation
If you are using your Webhook in an Automation, then you will need to select it in the Automation field.
What is the Response Section?
When a third-party service or external system sends a request to your webhook, your system must return an HTTP response. This response typically includes:
- Status Code – Indicates whether the request was successful or encountered an error.
- Headers – Provide additional context or metadata about the response.
- Response Body (Optional) – Contains any data your system needs to return.
In the Add Webhook window, the Response section allows you to define how your system should reply, ensuring seamless communication between services. In this article, we’ll explore its key components and why they matter.
Webhook for Automations
You can use your webhook as a trigger for your automations.
-
Create the Automation First: Begin by setting up your automation. This is essential because, during the webhook creation process, you'll need to specify which automation the webhook will trigger.
-
Create the Webhook First: After your automation is in place, proceed to create the webhook. In the webhook settings, there's a field where you can select the previously created automation.
Alternative Approach:
- If you create the webhook before the automation, you'll need to edit the webhook later to associate it with the newly created automation. This involves updating the webhook's settings to specify the appropriate automation.
Webhooks in Workflows
You can use Webhooks in Workflows to add support for 'Message Received' Events within them. This will allow you to pause/continue workflows through webhook-based triggers.
Use Nested References with Automations
You can nest information in your webhook for use with an automation. For example, you could create an automation that would use the nested information to create a new contact record within Servis.ai.
Here's an example of nested contact values contained in a webhook.
"root":{
"body":{
"contact":[
0:{
"firstName":"Jed"
"lastName":"Webhook"
"email":[
0:{
"work":"Forest.Stamm10@gmail.com"
}
1:{
"personal":"Serena@personal.com"
}
]
}
1:{
"firstName":"Littel"
"lastName":"Webhook"
"email":[
0:{
"work":"Virginie.Schumm60@hotmail.com"
}
1:{
"personal":"Robel@personal.com"
}
]
}
]
}
The webhook can then reference an automation that's set up to read the nested values and post them to a contact record in Servis.ai.
When creating your Automation choose the "Create Record" action.
In the settings for the action, you can reference the webhook nested values in the 'Value' field.
View/Edit Existing Workflows
1. Search
Use the search box to find a specific webhook. This works best if you know the name of the webhook.
2. Filter
Set up custom filters so that you only see the webhooks that meet your specific parameters. You can then save your view for later use.
3. Columns
Many of the columns allow you to sort by simply clicking on them. For example, sort by the 'method' or 'type' by simply clicking on the column title.
4. Show Deactivated
Click this checkbox to see all webhooks that have been deactivated. You can reactivate them by clicking on the 'options' menu and selecting 'activate'.