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:
-
Understand Variables
-
The Call a web service - Wait for callback action uses a dynamic IP address that cannot be determined before using the action.

In the simplest form possible, a web service can be defined as a means of communication between two machines over a network, exchanging machine-readable file formats such as JSON.
In Nintex Workflow Government Edition, you can integrate web services in your workflows by using the Call a web service - Wait for callback action. For example, you have a workflow that requires retrieving the current weather information of a specific location. By using a third-party API platform such as OpenWeatherMap, you can access current weather data to fulfill your workflow requirements. See Call a web service - Wait for callback.
For more information about web service, see Web Service wiki.

JSON is JavaScript Object Notation, a flexible syntax for storing textual information in a structured way. It is one of the primary standards for transmitting information across the internet.
JSON is built of:
- Key-value pairs, where a key is matched by a colon to a specific value, like "title" : "Gone with the Wind".
- Objects, where multiple key-value pairs are grouped together as a unit between a set of curly braces {}.
- Arrays, where a set of objects or key-value pairs are grouped into a list between a set of square brackets [].
Objects and arrays can be nested inside of each other, creating an extremely flexible data structure:
{
"products": {
"food": [
{
"category": "fruit",
"name": "apple",
"type": "Red Delicious",
"price": 2.95
},
{
"category": "deli",
"name": "fish",
"type": "salmon",
"price": 7.99
}
],
"homewares": {
"item" : "towel",
"color": "blue",
"size" : "bath",
"price": 12.95
}
}
}
Jump to:
Configure the Call a web service - Wait for callback action
-
Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.
- In URL, type your request URL or select a variable that holds your request URL.
- Select a Request type.
- In Request headers, type your request headers or insert a variable that stores the headers of your HTTP request.
- In Request content, type your request content or insert a variable that stores the content of your HTTP request.
- 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.
- Insert the Callback URL variable.
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.
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
.
-
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.
|
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.
|
Object |