Webhooks

Webhooks

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

Configure Webhooks

  1. Navigate to your project and click Issues.
  2. Select Issue settings from the displayed options.
  3. Select Webhooks.
  4. Click Add Webhook at the top right corner.
  5. In Webhooks page, specify all the necessary parameters.
  6. Click Save.

List of fields in Webhook configuration 

Field NameDescriptionData typeConstraint
Name

Specify the Webhook name.

Text

100 characters

URL to notify

Specify the REST API URL of the third-party application.

URL1000 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.
Text3000 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.,
Text3000 characters
Preview URL

Preview the complete webhook URL to notify the third-party application.

Read-onlyRead-only

Associate Webhooks to a business rule

  1. In Business Rules, navigate to Rule details -> Criteria -> Actions.
  2. In Actions, click Call Webhooks.
  3. Click  to create a new Webhook or click  to call an existing Webhook for the business rule.
  4. Click Save Rule.

Learn More about configuring business rules.

Test webhook integration

  1. Add test data in Zoho Projects according to your business rule criteria.
  2. In your application check for the update / data received from Zoho Projects via a webhook notification.
  3. If there is an error or data mismatch, modify your webhook settings in Zoho Projects.
  4. 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

  • Only 10 Issue related parameters and 5 Custom parameters are allowed per Webhook.
  • One issue related parameter in user defined format(xml, json..) is allowed.
    • Sample issue related parameter in user defined format: <issue-data><title>${Issue.IssueTitle}</title><key>${Issue.IssueKey}</key></issue-data>
  • Webhook is triggered only through a business rule i.e. when a business rule is executed, the associated webhook is called.
  • Only one webhook is associated to a business Rule whereas multiple business rules are mapped to the same webhook.
  • Only 1000 webhook calls are allowed per day.
  • A failed webhook execution is not retried.
  • Webhook is deactivated when the webhook call fails continuously for 10 attempts.
  • No mail notification is sent if the webhooks call threshold is reached for the day or if the webhook is disabled due to continuous failure.
  • Webhook failures are audited and the Webhook Failures page displays only the last 100 failures.

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:

  1. Bulk SMS
  2. Clickatell
  3. Screen Magic
  4. Valueleaf
  5. Solutions Infini

You can buy SMS credits and API details from the above vendors.

 Step 2: Configure Webhook

In the Webhooks page, specify the following details:

URL to notify:

  1. 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:

  1. Business Rule Name - Show Stopper 
  2. Execute on - Field Update - Severity
  3. Criteria : Severity is Showstopper and Status is not Closed
  4. Action :
    • Is It Reproducible - Always
    • Assign to - Developer
    • Call Webhook - Choose the webhook created in the previous step
  5. 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.



    • Related Articles

    • Webhooks

      A webhook is a HTTP callback or push API that automatically sends real time notifications to third party applications. These notifications are sent when you perform a set of events. You can access webhooks only if you are on the professional plan. ...
    • Webhooks

      Webhooks facilitates communication with third-party applications by sending instant web notifications every time an event occurs in Zoho Recruit. With Webhooks, you can configure HTTP URLs and associate them in workflow rules to automate the entire ...
    • Webhooks

      Webhooks facilitates communication with third-party applications by sending instant web notifications every time an event occurs in Zoho Workerly. With Webhooks, you can configure HTTP URLs and associate them in workflow rules to automate the entire ...
    • Manage Webhooks

      Overview of webhooks Webhooks facilitate automated HTTP notifications. These notifications are triggered in third-party applications when a predefined action is performed by the user. Business Uses of Webhooks Webhooks can be used to collaborate with ...
    • How to create webhooks

      Webhooks is a feature that lets you collect real-time data or information from other applications and websites over the web. This feature is simple and easy to implement. The websites that you need information from are hooked to a URL which is setup ...