Global Action: Send an HTTP Request

The Send an HTTP Request Action enables users to make web requests to external APIs within their Workflows, allowing data transmissions to third-party services, retrieving data, or initiating other webhooks.

Configuring the Action

Field Name Description
Method The HTTP method for the request (GET, POST, PUT, PATCH, DELETE).
URL The URL to which the request will be sent.
Headers List of request headers, formatted as "Header Name: Value".
Body Data Body content of the request, formatted in JSON (for methods that require a body).
What do you want to do with the response? Select how to handle the response: Ignore, Process through a Workflow, or Handle the response using Custom Action code.

Handling the Response

Once the request is configured, choose an option for the response:

  • Ignore the response: No action will be taken once the response is received.
  • Run the response through a workflow: Channel the response data to another workflow.
  • Handle the response using Custom Action code: Apply custom Twig code in the Response field to process the incoming data.

Working Example

The following is a working example to retrieve current weather data from the National Weather Service weather API. No API Keys are needed to test this example. 

  • Method: GET
  • URL: https://api.weather.gov/gridpoints/BOX/70,76/forecast
  • Headers: None required.
  • Body Data: Not applicable for GET requests.
  • Response Handling: Choose to Handle the response using Custom Action code to parse the data.

Response

{% for period in response.properties.periods %}
{{ period.name}}
{{ period.detailedForecast }}
{% endfor %}

Example Rendered Response

This Afternoon 
Sunny, with a high near 46. Northeast wind 7 to 10 mph.  

Tonight 
Partly cloudy, with a low around 30. East wind 1 to 6 mph.  Saturday A slight chance of rain after 5pm. Cloudy, with a high near 44. Southeast wind 2 to 12 mph. Chance of precipitation is 20%.  

Saturday Night 
Rain. Cloudy, with a low around 37. Southeast wind 12 to 23 mph, with gusts as high as 36 mph. Chance of precipitation is 100%. New rainfall amounts between a half and three quarters of an inch possible.

Custom Actions

This Action is supported in Custom Actions. Refer to the Documentation.

Additional Documentation

Refer to the HTTP Requests section of the documentation.