Incoming Webhooks

Incoming webhooks is a method of bringing information from a third-party service or an API request to Zoho Spend on occurrence of an event. In Zoho Spend, you can use the action performed in the third-party service as a trigger to perform a task in Zoho Spend.

Here are some scenarios to explain this better:

Scenario 1: Zylker is a company that manufactures fabric. When the procurement team places a purchase order for raw materials, the details are shared in the production team’s group. The message has a Received button, which the production manager can click once the materials are delivered. On clicking the button, an incoming webhook is triggered and the expense for the purchased materials is automatically recorded in Zoho Spend.

Scenario 2: Patricia, the marketing manager at Zylker, organizes a corporate event where the company’s vendors and suppliers visit her booth. She collects the details of vendors who provide quotes for services or materials. After the event, she sends them a form to submit their vendor details and quotations. When a vendor fills in the form and clicks Submit, an incoming webhook is triggered, and the vendor’s information is automatically added to Zoho Spend for easy tracking of purchase requests and procurement.

Create Incoming Webhooks

You can create multiple incoming webhooks based on the functions you prefer to execute in Zoho Spend.

To create an incoming webhook:

  • Go to Settings on the left sidebar.
    (OR)
    Click Settings in the top right corner of the page.
  • Click Incoming Webhooks under Developer & Data.
  • Click + New Incoming webhooks on the top right corner of the page.
  • Enter the Name and Description for the Incoming Webhook.
  • Enter a function using Deluge in the editor below.
  • Click Save.

The OAuth URL and ZAPI Key URL will be generated and displayed in a pop-up. You can copy the URL from the pop-up.

You can also copy the URLs by clicking the down arrow next to the incoming webhook name in the list page.

Insight: If you re-generate the webhook URL, you’ll have to replace the old URL with the new URL in all the places it has been used. You can regenerate the URL by clicking the Regenerate button in the Edit Incoming Webhook page.

Warning: Ensure that only an authorised user has access to the URL. If exposed, any user who has access to the URL can access the data.

You can now configure the URL in the third party application to set up incoming webhooks. If you wish to add any attributes in the script, you can do so at the time of the API call.

  • Header: The header of the API request.
  • Params: Parameters are the variable parts of the script given by the third-party API request.
  • Body: It is a string that contains the request data of the API call.

Once configured, the incoming webhook will be created.

Now, when an activity takes place in the third-party application, the incoming webhook will be triggered and the action mentioned in the function will be executed.

View Logs

You can view the list of all the incoming webhooks that have been executed in Zoho Spend under the View Logs section from the Incoming webhooks’ edit page.

Edit Incoming Webhooks

You can edit the incoming webhooks that you have created in Zoho Spend. Here’s how:

  • Go to Settings on the left sidebar.
    (OR)
    Click Settings in the top right corner of the page.
  • Click Incoming Webhooks under Developer & Data.
  • Click the down arrow next to the incoming webhook that you want to edit.
  • Click Edit.
  • Make the necessary changes and click Save.

Delete Incoming Webhooks

You can delete the incoming webhooks that you have created in Zoho Spend. Here’s how:

  • Go to Settings on the left sidebar.
    (OR)
    Click Settings in the top right corner of the page.
  • Click Incoming Webhooks under Developer & Data.
  • Click the down arrow next to the incoming webhook that you want to delete.
  • Click Delete.
  • Confirm your action by clicking Delete again in the pop-up.