Webhooks
Webhooks are user-defined HTTP & HTTPS callbacks that are triggered when a particular event occurs at the source site. When the event occurs, the source site makes an HTTP or HTTPS request to the URL specified.
In simple words, webhook lets you to quickly perform actions in another service based on the changes happening to your transactions and records within Zoho Expense. A webhook is used to send out an event notification to another service.
Once you’ve configured the URL, Zoho Expense will post the event as a JSON to your webhook URL. For example, if a report is reimbursed in Zoho Expense, then a notification is sent to the specified URL.
Create a Webhook
You can create a webhook for any change in transaction status or when a transaction is created or modified.
- Click Admin View.
- Go to Settings on the left sidebar.
(OR)
Click the Gear icon at the top right side. - Click Actions under Automation.
- Switch to the Webhooks tab.
- Click + New Webhook on the top right corner.
- Enter the name and select the module for your webhook.
- Enter a description.
- Next, enter the URL (URL of the external service provider’s API) and select the types of event for which the webhook has to be triggered.
- Enter the next set of fields.
- The fields are described below:
Field Name Description Method Select type of API method: POST, PUT, or Delete. By default, the system selects the POST method.
POST: Requests that the data sent must be considered as new.
PUT: Requests that the data sent should be considered as a modified version of the one already present.
DELETE: Requests that the data be deleted.Authorization Type Select how you want to authorize access to the external service provider’s URL.
General: Select this type if you want to create this webhook with basic authorization, API authorization, or without any authorization.
Connections: Select this type if you want to use a connection that was created between Zoho Expense and a third-party app to authorize this webhook.Custom Parameters You can add custom parameters. In the webhook such as AuthToken, Security Token, API Key, etc. based on which the URL will be appended. Enter the required parameter under Parameter Name and the corresponding value under Parameter Value. If you wish to add multiple parameters, select + Add Custom Parameters. Entity Parameters Append All Parameters: Select this option to send all parameters from Zoho Expense to the external service.
Append Selected Parameters: Select this option to send selected parameters from Zoho Expense to the external service.URL Preview The URL generated for this webhook will be displayed here.
- The fields are described below:
- Click Save.
Edit Webhook
You can make changes to an already scheduled task. To edit:
- Click Admin View.
- Go to Settings on the left sidebar.
(OR)
Click the Gear icon at the top right side. - Click Actions under Automation.
- Switch to the Webhooks tab.
- Hover over the webhook you want to edit and click the More icon next to the webhook.
- Click Edit and make the necessary changes.
- Click Save.
Delete Webhook
To delete a webhook:
- Click Admin View.
- Go to Settings on the left sidebar.
(OR)
Click the Gear icon at the top right side. - Click Actions under Automation.
- Switch to the Webhooks tab.
- Hover over the webhook you want to delete and click the More icon next to the webhook.
- Click Delete.
- In the popup that opens, click Delete again to delete the webhook.