Building flows
Init
A setup request that runs before the flow's main pass and can capture a credential from the response.
The init node sends one HTTP request before the flow's main pass runs. Reach for it when the flow needs something up front, like a short-lived token, and let it store a value from the response as a named credential that later nodes reference through config.auth.
Spec
| Field | Meaning |
|---|---|
method | Required. One of GET, POST, PUT, PATCH, DELETE. |
url | Required. The request URL. |
headers | Optional. A map of header name to value. |
body | Optional. The request body. |
url and body accept {{slug.field}} references. See How data moves.
Capturing a credential
Set config.captureCredentials to read values out of the response and store each one under a credential name. A later node names that credential with config.auth. See Connecting integrations.
| Field | Meaning |
|---|---|
name | The credential name to store the value under. |
fromPath | The path in the response to read the value from. |
field | The field name to hold the value inside the stored credential. |
{
"slug": "auth_setup",
"type": "init",
"spec": {
"method": "POST",
"url": "https://api.example.com/token",
"body": { "client_id": "..." }
},
"config": {
"captureCredentials": [{ "name": "example_key", "fromPath": "access_token", "field": "token" }]
}
}