Webhook enables communication between third-party applications and Zoho Circuit. With webhooks, you can make API calls and notify the applications whenever an action takes place in Zoho Circuit.
Set up webhooks in the following three steps:
- Create a Webhook
- Integrate Webhook to a Circuit
- Test your Integration
Create a Webhook
To create a Webhook:
Log in to the Zoho Circuit console.
Click +Create New in the top-right corner, then select Webhook. The Create New Webhook page will appear.
- Specify a unique Name for the Webhook.
In URL to notify, enter the API URL of the third-party application.
- Select the type of API Method -GET or POST. By default, the system selects the GET method.
- Add a Description for the webhook.
- Under Custom Parameters, specify the parameter name and parameter value. These parameters will be sent to the third-party application while triggering the webhook. Custom Parameters are optional fields.
- Specify the Custom Headers with header name and header value. The configured headers will be appended to the API request while triggering the webhook. Custom Headers are also optional fields.
- Click Create.
The webhook is listed under Settings [] → Developer Space → Webhooks.
Integrate Webhook to a Circuit
To integrate a webhook to a circuit:
- Log in to Zoho Circuit console and select Circuits from the top menu.'
- Select the circuit you'd like to modify, then click the Edit icon [].
In the displayed circuit, drag and drop the Webhook state from the Functional States pane on the left.
- Enter a unique name for the webhook state.
- Select the Previous State and Next State between which the new webhook state has to be added, then click Create.
- Under Configuration on the right, you can optionally edit the state Name.
- Type 'Webhook' is selected by default. Select the Webhook Name to be added to the circuit from the drop-down list.
- The Next State selected during state creation is displayed. If you'd like to change it, select a state from the dropdown.
Specify the
Error Handling options for the state. To learn more about Error Handling,
click here.
- Under Input / Output on the right, enter Input Path, Output Path and Result Path. To learn more about I/O paths, click here.
- In addition to the Custom Parameters and Custom Headers configured for the Webhook, define dynamic parameters and headers specific to this webhook state and this Circuit using 'Add Parameter' and 'Add Header'.
- Add Parameter - Specify the parameter name and parameter value. These parameters will be sent to the third-party application while triggering the webhook.
- Add Header - Specify the header name and header value. The configured headers will be appended to the API request while triggering the webhook.
- Click Save.
Test your Integration
To test your integration,
- After saving your circuit, click Test Run at the top.
- Specify the test data as Input JSON for your test run, then click Next.
- Name your test run by providing a unique name for this execution.
- Click Run. To learn more about Executions, click here.
- Check for the data received from Zoho Circuit through the Webhook notification in your application.
- If there is a failure or data mismatch, modify your webhook settings in Zoho Circuit.
- Repeat this test until you get the required data from Zoho Circuit to your application.