Connectors
A connector is a set of ready-made actions of one service. An action is run by the HTTP worker, so no extra worker is needed. Use the HTTP worker of version 2.0 or later.
Built in: Slack, Microsoft Teams, Telegram, Google Chat, Google Sheets, GitHub, Jira and a generic webhook.
Connections
A connection tells a connector where to go and which secrets to send. Create one on the Settings → Connectors page.
- A connection belongs to a project. Jobs of that project use it by name.
- Credentials are kept in project secrets. The connection holds their names only.
- The base URL can be changed, for example for GitHub Enterprise. Teams and Google Chat have none: their webhook address is the secret.
- Jobs that use a disabled connection fail before they are sent to a worker.
Permissions: ConnectorManagement.List, .Create, .Update and .Delete, per project. A connection decides which secret is sent where, so creating one, or changing its address, authentication, settings or secrets, also needs SecretManagement.Update.
Using an action
Create a job of the HTTP worker (HttpRequestSenderJob) with this job data:
{
"connector": { "connection": "team-slack", "action": "sendMessage", "version": 1 },
"input": { "channel": "#ops", "text": "Backup finished" }
}
Nothing else in the job data is read. Without version the newest version of the connector is used.
In a workflow, a Task step points to that job and its input fills in the rest:
{ "input": { "text": "Order {{ steps.order.result.id }} is ready" } }
The result of the job is the JSON of the response, so later steps can read steps.notify.result.ts. A response over 100 000 characters, or one that is not JSON, is returned as the HTTP worker's usual summary.
The request is built when the job is sent to a worker. Until then the job data, the logs and the dashboard hold the short form above. If the input does not match the action's schema, nothing is sent and the occurrence fails with the reason.
Errors and retries
Each connector knows how its service reports errors, for example Slack's "ok": false. Errors that a retry cannot fix fail the job at once. Requests that only read are retried on timeouts, 429 and 5xx; others on 429 and 503 only, so that nothing is done twice. When a workflow step has a retry policy, that policy is used instead.
What input cannot do
Input only fills in values. It cannot add headers or properties, change the host, leave the path, follow a redirect or bring in a {{secret:…}} reference; such a call is refused. The HTTP worker's security settings apply to every request.
Whoever can create or trigger jobs in a project can use its connections with any input.
Testing an action
On the Settings → Connectors page, the play button of a connection runs one action with the input you type, and shows the status and the result. The test sends the real request. It runs on the HTTP worker as an occurrence of the job Connector tests, which the page creates in the project the first time. That job never runs on its own. A test needs ConnectorManagement.Update and ScheduledJobManagement.Trigger, and an active HTTP worker.
The page also shows the job data that makes the same call, ready for a job or a workflow step.
Importing an OpenAPI document
Import OpenAPI turns an OpenAPI 3 document into a connector of the project, with one action per operation. Upload the file (JSON or YAML) or give its address. Importing again under the same key adds a version; jobs keep the version they name.
- JSON or YAML. YAML anchors, aliases and tags other than the standard ones are refused, so a document cannot expand itself.
- An address is read only when it is public: private, loopback and link-local addresses are refused, and redirects are not followed.
- Up to 5 MB, 64 levels of nesting, 500 operations, 2 000 followed references and 20 000 schema parts once the references are inlined.
- A
$refmust point into the document itself (#/…). A schema that contains itself is left open at that point. - Path, query and header parameters and a JSON or form body become the input. Headers that HTTP or authentication own (
Authorization,Host,Cookie, …) are left out. - Security schemes become authentication choices: bearer and OAuth 2 as a bearer token, basic, and API keys.
- The first server becomes the base URL of new connections. The connection keeps its own copy, so a later version of the document cannot send the secrets elsewhere.
- Importing needs
ConnectorManagement.CreateandSecretManagement.Update. An imported connector can be deleted when no connection uses it.
Google Sheets
Sheets needs an OAuth client. Put its id in the connection, and the client secret and a refresh token with the spreadsheets scope in secrets. The HTTP worker fetches an access token for every request.