When to use this Flow type
Use this Flow type to call an HTTP endpoint and optionally send a user-defined payload.
This Flow can also be used if there is no payload at all and you want to call an HTTP endpoint using a configured method, for example, DELETE
.
Process
Step 1. Create an HTTP Connection that points to the API endpoint.
Step 2. When creating a Connection, define the Payload or skip to the next step.
To call the HTTP endpoint asynchronously, set the property Maximum Asynchronous HTTP Calls
to a value greater than zero (zero is the default).
Step 3. Start creating a new Flow on the Flows
page by clicking +
, and typing in HTTP
. Select Call
HTTP endpoint
.
Step 4. Select the Flow and enter an optional payload.
If you already entered the payload in the Connection created in step 2 or there is no payload to send, you don't have to enter the payload here.
You can use {tokens}
as part of the payload. Tokens will be automatically substituted on the values of the global variables at run time.
Example:
{
"id": "{id}",
"user": "{user}",
"firstName": "{first_name}",
"lastName": "{last_name}",
"dob": "{dob}"
}
There are two options for setting tokens:
- Setting global variables using JavaScript.
- Executing Flow in a loop, for example, database loop.
Step 5. Optionally enter the JavaScript or Python program in the Script
field. This program will be executed before sending a payload to the HTTP endpoint. You can use it to set the global variables that can be used as {parameters}
in the Payload or {tokens}
in the HTPP Connection. You can also use it to conditionally disable the Flow.
Comments
0 comments
Please sign in to leave a comment.