Webhook is a developer-friendly module that facilitates automated HTTP notifications to third party applications from Zoho Projects.
Using Webhooks , you can configure your own HTTP URLs and associate
them to specific business rules in order to automate the entire
notification process related to issues. To know more about Webhooks,
please refer to WebHooks.org
- Navigate to your project and click Issues.
- Select Issue settings from the displayed options.
- Select Webhooks.
- Click Add Webhook at the top right corner.
In Webhooks page, specify all the necessary parameters.
- Click Save.
List of fields in Webhook configuration
Field Name | Description | Data type | Constraint |
Name | Specify the Webhook name. | Text | 100 characters |
URL to notify | Specify the REST API URL of the third-party application. | URL | 1000 characters |
Method | Select the type of API method - POST or GET. By default, the POST method is selected. | Radio button | - |
Append issue parameters | - Append parameters in two ways - either using the standard format or user defined format (xml, json, etc.,).
- Specify the parameter name. And specify the corresponding parameter value chosen from the issue fields.
- These parameters are significant in triggering the webhook to the third party.
| Text | 3000 characters |
Append custom parameters | - Specify the parameter name and the corresponding value for the webhook.
- This key / value pair is mainly used to send the Auth tokens, api key etc.,
| Text | 3000 characters |
Preview URL | Preview the complete webhook URL to notify the third-party application. | Read-only | Read-only |
Associate Webhooks to a business rule
- In Business Rules, navigate to Rule details -> Criteria -> Actions.
- In Actions, click Call Webhooks.
Click
to create a new Webhook or click
to call an existing Webhook for the business rule.
- Click Save Rule.
Learn More about configuring business rules.
Test webhook integration
- Add test data in Zoho Projects according to your business rule criteria.
- In your application check for the update / data received from Zoho Projects via a webhook notification.
- If there is an error or data mismatch, modify your webhook settings in Zoho Projects.
- Continue testing until you get the desired results from Zoho Projects to your Application.
Webhooks supports both Issue related Parameters (Issue title, Status, Assignee etc.,) and Custom Parameters.
Known limitations
Error codes
When the execution of a Webhook fails, one of the following error messages is displayed in Zoho Projects:
HTTP Status Codes
- 400 Bad Request - Often missing a required parameter.
- 401 Unauthorized - No valid Auth Token.
- 402 Request Failed - Parameters were valid but request failed.
- 404 Not Found - The requested item doesn't exist.
- 500, 502, 503, 504 Server errors - Something went wrong on the third-party application.
- Error Code 1 - Temporarily unable to connect to the API server. You
need to check API server logs and firewall settings for our requests
sent from Zoho Projects.
Custom Errors
- Internal process failure - When the webhook is not executed due to errors while processing the webhook.
- Day limit reached - When the company reaches the maximum limit for the day.
Business Scenario
Send SMS alerts to Project Owners.
Purpose
When an issue is marked as a Show Stopper in your
Issue Tracker, you can send an SMS with the issue title to the project
owner by associating a webhook to a business rule.
Pre-requisite
- Account in SMS gateway service
- Permission to access Business Rules & Webhooks
Procedure
Step 1: Create an account in SMS Gateway
In your SMS gateway service, create an account and get the following details to configure webhook:
- API URL
- Username
- Password
- API Id
Currently Zoho has partnered with the following SMS Gateway providers:
- Bulk SMS
- Clickatell
- Screen Magic
- Valueleaf
- Solutions Infini
You can buy SMS credits and API details from the above vendors.
In the Webhooks page, specify the following details:
URL to notify:
- http://<IP Address>/smsgateway/post - POST method
Parameters in User Defined Format:
Param Name - Text
Param Value -
Hi ${Issue.ProjectOwner},
Following Issue is marked as ${Issue.Severity}.
${Issue.IssueKey} - ${Issue.IssueTitle}
Due on ${Issue.DueDate}
Custom Parameter (Name = Value):
user = <gateway_user_name>
password = <api_password>
api_id = <gateway_unique_api_id>
to = <user_mobile_number>
In the above user-defined and custom parameter, we have used Clickatell gateway for demonstration purpose.
Step 3: Set up a Business Rule
Create a business rule with the following specifications:
- Business Rule Name - Show Stopper
- Execute on - Field Update - Severity
- Criteria : Severity is Showstopper and Status is not Closed
Action :
- Is It Reproducible - Always
- Assign to - Developer
- Call Webhook - Choose the webhook created in the previous step
- Save the business rule. Learn More about creating business rules.
Step 4: Test your integration
Add a test issue in the project and assign it to a developer. Also, change the value of Severity to Show Stopper. This will trigger the webhook associated with the above rule and the project owner will receive an SMS alert with the Issue title, Severity, and Due date.