How to make a POST call using webhook
I have a use case where I want to trigger a UiPath Automation if any row gets added to a smartsheet. I went through the webhook documentation but in the create webhook function, we can pass just a URL for the "callbackurl" key. Since I have to make a POST call, I have a list of input paramters in the request body (plus the authorization header) and all this can't be squeezed into one url. How to go about it?
Answers
-
To call other third-party service's API when there are changes to Smartsheet, you use Smartsheet Webhook. I have not used the UiPath API, but I am currently using Google Sheets API to interact with Google Sheets.
Here's a general outline of how you can set up this workflow:
Set up a custom webhook receiver URL
The webhook receiver acts as an intermediary between Smartsheet and a third-party service. This application will receive the webhook events from Smartsheet and process them accordingly. I use GCP cloud functions, a serverless cloud service.
Configure the webhook in Smartsheet.
In the Smartsheet API, create a webhook by providing the URL of the webhook receiver as the callback URL. This URL will receive the webhook events triggered by Smartsheet. (The scope of the event is now only sheet id, and you can use column id sub-scope.)
Define the logic in the webhook receiver.
Implement the logic to receive the incoming webhook event from Smartsheet in your custom webhook receiver. Extract the necessary information from the request payload and headers. In this process, you must access the sheet with the sheet id information and get the changed data, such as new rows or cell values.
Make a POST call to a third-party service Automation
After extracting the relevant information from the webhook event, construct a POST request to the third-party service endpoint. Include the required input parameters, authorization header, and other necessary details in the request body.
Trigger the third-party Service Automation.
Send the POST request to the third-party service endpoint, passing the extracted information as per your requirements. The request will trigger the desired process in a third-party service.
Using a custom webhook receiver as an intermediary, you can receive the webhook events from Smartsheet, extract the required information, and make a separate POST call to your third-party service endpoint with all the necessary parameters.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives