💡

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 Jira Service Desk 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.

Example request with a placeholder for some variables. Use the variable selector to assign outputs from different blocks when creating this request.

1234567
{    "customRequestType": "RECOMMENDATION_ENGINE",    "paymentId": "[PAYMENT_ID]",    "orderId": "[ORDER_ID]",    "customerId": "[CUSTOMER_ID]",    "ruleDescription": "Get recommendation on how to proceed after a payment was created."}
json
copy

Handling the response

If the response to the request contains a JSON payload, then this payload is available as "unstructured data" in the output of the trigger.

You can pass this data to another workflow block using the variable selector and specifying the path to the variable that should be used.

Condition example

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

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 snychronous action is not the right approach. Consider splitting the request and using the "Web request received" trigger to continue.

If the request fails, either by resulting in a timeout or any other non-2xx response, then the workflow run will be marked as . 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

Start automating