REFERENCE
Developer Reference
Authentication, APIs, SDKs, Flow Agent processors and parameter resolution, in full.
HTTP Request
Make an HTTP request to an external API and bring the response into the flow.
HTTP Request is the processor that calls an external API over HTTP.
Basic usage
HTTP Request sends a request built from the configured URL, method, headers and body, and stores the response in the
httpResponsevariable for later processors. Use it for data integration, third-party services, webhooks, external authentication and anything else that talks to another system.Configuration
The node's property panel:
Name
The name shown on the canvas, used to identify this processor within the workflow.
Description
Explains what this processor is for, making the workflow easier to read.
Properties
URL (required)
The address to send the request to. Supports Literal, Expression and Template value types; see Expression introduction — resolving values.
Method (required)
The HTTP method: GET, POST, PUT, DELETE, PATCH and others.
Parse JSON (required)
Whether to parse a JSON response automatically. Off by default. When on, the
httpResponseobject gains ajsonfield.Body
The request body, usually for POST and PUT. Supports Literal, Expression and Template value types; see Expression introduction — resolving values.
Header
Additional HTTP request headers. Add as many as you need; Authorization and Content-Type are the common ones.
Underneath, headers are not a separate field. This processor sends every config key that is not
url,method,bodyorparseJsonas an HTTP header, using the key itself as the header name. Written as a Workflow CRD:- name: url
value: "https://api.sendgrid.com/v3/mail/send"
- name: method
value: POST
- name: parseJson
value: "false"
- name: Content-Type
value: application/json
- name: Authorization
expression: '"Bearer " + vars.sendgridApiKey'That also means a header value supports Expression like any other config, so a key can live in a workflow variable and be composed here rather than hardcoded.
Relationships
Success
When the response status is 200, the workflow continues from this connection point. An
httpResponsevariable is produced with these fields:Field Type Description statusCodenumberThe HTTP status code bodystringThe response body as a raw string jsonobjectThe parsed JSON object, when Parse JSON is on headersobjectThe response headers Failure
When the request fails (any status other than 200) or a network error occurs, the workflow continues from this connection point and a
prevErrorvariable holds the error.Output: httpResponse
On success the response lands in a variable called
httpResponse-- the name is fixed and cannot be changed -- and always has three fields:Field Contents httpResponse.statusCodeHTTP status code httpResponse.bodyThe response body, as a raw string httpResponse.headersResponse headers With
Parse JSONon there is a fourth,httpResponse.json, holding the parsed body.A worked example
Look up one to-do item by the number the user typed, then send back its title.
Field Value URL Expression: 'https://dummyjson.com/todos/' + prevMessageMethod GETParse JSON on The Push Message after it takes
httpResponse.json.todoas an Expression.For a POST, set Method to
POST, build Body with an Expression (JSON.stringify({ name: userName }), say), and addContent-Type: application/jsonunder Header.Notes
- The URL needs its protocol (
http://orhttps://). - A response status of 400 or above goes to Failure, with the status and body in the error.
- With Parse JSON on, a body that does not parse is not a failure: the node still takes Success, it just leaves
httpResponse.jsonunset. Check for it rather than assuming it is there. - Body and Header both accept Expressions, so flow variables can be carried into the request.
- The URL needs its protocol (