This is an action to initiate HTTP requests to external systems. A typical use case involves initiating a request to the ticketing tool (Freshdesk, Zendesk, Servicenow, etc) for ticket creation where your organization’s IT processes are handled.
Steps to creating HTTP Request Action
Step 1: In the Action step, choose HTTP Request and enter the cURL request in the text box.
Step 2: The supported variables are highlighted below the text box.
Step 3: The cURL request can be tested prior to moving forward with the setup to ensure that the response is as expected.
Step 4: The action status and the response is available in the workflow run history log.
Sample cURL Requests
Zendesk:
Ticket Creation Request
curl --location 'https://{domain}.zendesk.com/api/v2/tickets.json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {add token}' \
--data-raw '{
"ticket": {
"subject": "IT helpdesk - Onboarding Request",
"comment": {
"body": "The following user needs to be added on 1password: @Email @location"
},
"assignee_id": "902343506386"
}}'Freshdesk:
Ticket Creation Request
curl --location 'https://{domain}.freshdesk.com/helpdesk/tickets.json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {add token}' \
--data-raw '{ "helpdesk_ticket": { "description": "Details about the offboarding request...", "subject": "Support Needed...", "email": "tom@outerspace.com", "priority": 1, "status": 2 }, "cc_emails": "ram@freshdesk.com,diana@freshdesk.com" }'
ServiceNow:
Ticket Creation Request
curl --request POST \
--url https://{domain}.service-now.com/api/now/table/incident \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--user 'USERNAME:PASSWORD' \
--data '{
"short_description": "Exit Procedure",
"description": "Remove all application access to the following user @email",
"urgency": "2",
"impact": "2",
"caller_id": "john.doe"
}'