This page describes the “Send web request” action. To start a workflow with a web request, use the “Web request received” trigger.
The “Send web request” action can be used to send a web request to an external server. This could be your own endpoint or the endpoint of another service accepting web requests.

Restrictions

The action currently has the following restrictions:
  • you can only use synchronous requests
  • only endpoints using https are supported
  • an authentication header can be passed, but no other headers
  • only GET and POST methods are currently supported
  • only JSON payloads are currently supported
If you have different requirements for your particular automation, please reach out to us directly via our Support Portal to tell us more about your request. If you don’t have access, please contact your account administrator for assistance.

Sending the request

Configure the following inputs to set up the action:
InputDescription
MethodsGET or POST. No payload will be sent for GET requests.
Target URLThe external server to send the request to. Only https endpoints are supported.
PayloadThe JSON payload for POST requests. There is only partial validation available if a proper JSON payload is constructed as the values are replaced only during runtime of the workflow. Use the Workflow Runs to debug the actual request passed and response received in case of problems.
Custom headersYou can set additional headers to be sent if necessary. You must not use this for API keys or other authorization methods, as the credentials will be visible in the Workflow Run view. Instead, set credentials and authorization header name when configuring the App itself.
Fail action on unsuccessful requestBoolean (default: True). Determines how the workflow handles failed web requests. When True, the workflow stops on failure; when False, it continues execution even if the request fails.
Example request with a placeholder for some variables. Use the variable selector to assign outputs from different blocks when creating this request.
JSON
{
  "customRequestType": "RECOMMENDATION_ENGINE",
  "paymentId": "[PAYMENT_ID]",
  "orderId": "[ORDER_ID]",
  "customerId": "[CUSTOMER_ID]",
  "ruleDescription": "Get recommendation on how to proceed after a payment was created."
}

Handling the response

The following response data is available in the output of the trigger:
OutputDescription
Response BodyThe payload, available as “unstructured data” if the response contains JSON.
Response content-typeThe content type of the response (e.g., application/json).
Response statusThe HTTP status code of the response.
SuccessBoolean indicating whether the request was successful (2xx status).
You can pass this data to another workflow block using the variable selector. For the Response Body, you must specify the path to the variable you want to use.
Condition example

Condition example

It is also possible to use that data to build conditions in the same way.
Condition example

Condition example

Failure handling

Requests may time out and fail if no response is received within 30 seconds. If a use case requires a longer duration, then this synchronous action is not the right approach. Consider splitting the request and using the “Web request received” trigger to continue. If the request fails due to a timeout or any other non-2xx response, the workflow run will be marked as Failed by default. You can change this behavior by setting Fail action on unsuccessful request to False, allowing the workflow to continue execution even when the request is unsuccessful.
Handling unsuccessful request example

Handling unsuccessful request example

Learn more about debugging workflow runs.

Example flow

An example use of the send web request action could be to use an internal recommendation engine before authorizing a payment. If the response contains a “recommendation” field with a value “PROCEED”, then the payment flow continues, otherwise the payment gets declined.
Send web request action example

Send web request action example

Start automating