Call a web service - Wait for callback

Use the Call a web service - Wait for callback action A tool for building the processes, logic, and direction within workflows. Actions are the steps the workflow performs to complete a process. to make asynchronous HTTP requests and wait for a response from a service provider's API call. This action allows workflow instances to wait until a callback is received, ensuring the process continues only after a specific event occurs. You can output the response content, response headers as variables in a single object. The response content is returned in JSON format.

For example, let's say you have a workflow that interacts with an external service. It uses the Call a web service - Wait for callback action to send an asynchronous HTTP request to the external API, including a callback URL. After sending the request, the workflow pauses and waits for the external service to process it and send a callback to the specified URL. When the callback is received, confirming the action is complete, the workflow resumes and processes the remaining actions. This approach ensures the workflow manages external operations efficiently and without interruptions.

Before you begin:

Jump to:

Configure the Call a web service - Wait for callback action

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.

  2. In URL, type your request URL or select a variable that holds your request URL.
  3. Select a Request type.
  4. In Request headers, type your request headers or insert a variable that stores the headers of your HTTP request.
  5. In Request content, type your request content or insert a variable that stores the content of your HTTP request.
  6. Select or create an Output object under Web services. You can now access the Callback URL and the Response object that contains Response content, Response headers. You can use these variables later in your workflow.
  7. Note: You can use the Response content variable in a Query JSON action to extract information from the response content. See Query JSON for more information.

  8. Insert the Callback URL variable.

Use the Callback URL variable in the Call a web service - Wait for callback action

The Call a web service - Wait for Callback action includes a Callback URL variable. This variable becomes available after adding the action to the workflow designer. The Callback URL variable can be added to any of the following input fields: URL, Request Header, or Request Content. When the action is executed, a Callback URL is generated.

For example: https://us.nintex.io/event/api/callback/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?sig=xxx.

Important: 
  • Include the Callback URL variable manually to ensure the callback completes successfully and the workflow continues. If you don’t, the system automatically adds it to the Request Header field.

  • Place the callback variable correctly to receive callbacks. If the variable is placed incorrectly, the instance might stay in a waiting state.

  • To add the Callback URL variable, click Insert on the field header, go to Web Services, select the Callback URL variable, and click Insert.

Place the Callback URL variable in the input field that matches the API requirements of the service provider.

For example:

  • Add it to the URL field: https://www.example.com?callback=

  • Include it in the Request Header: callback:

  • Add it into the Request Content: {"callback": ""}

Call a web service - Wait for call back action fields and selections

Field

Description

Variable

URL

Uniform Resource Locator (URL) used to call a web service. Accepts any combination of typed text and inserted variables.

Text, Decimal, Integer, Boolean, DateTime
Request type

The method of HTTP request to be performed on an identified resource.

  • HTTP Get: requests to retrieve data.
  • HTTP Put: requests to store an entity under the supplied URI (Unified Resource Identifier).
  • HTTP Post: requests that the server accept your data.
  • HTTP Patch: requests to apply partial modifications to a resource.
  • HTTP Delete: requests to delete a specified resource.

Learn more about HTTP request methods.

n/a
Request headers HTTP header to be used in the request. Accepts any combination of typed text and inserted variables. Text, Decimal, Integer, Boolean, DateTime, Collection
Request content The message content of your HTTP request. Accepts any combination of typed text and inserted variables. Text, Decimal, Integer, Boolean, DateTime, Collection
Output

Contains the server's response details, such as the response content, header, and status code.

  • Response content: Content of the server's response.

  • Response headers: Headers of the server's response.

Object