Connectors
How Actions and external Datasets authenticate to outside systems without holding their credentials.
A Connector authenticates an Action’s requests, and an external Dataset’s catalog requests, to an outside system, so the Action’s code never holds the credential. A Connector does only authentication: it provides no Tables or Datasets.
Placeholders
A Connector has a fixed, non-secret placeholder, __TRACTORBEAM_CONNECTOR_<NAME>__. An Action puts the placeholder in a header of a request to one of the Connector’s origins, and Tractorbeam replaces it with the connection’s credential.
External Datasets
An external Dataset can name a Connector as its catalog’s credentials. Tractorbeam sends the connection’s credential to the catalog as its bearer token. The catalog must be at one of the Connector’s origins, and the Connector must be a Workspace Connector: every reader of the Dataset shares its pin.
Connections
A connection is an authorized account of a Connector, which supplies the credential for each request. A Connector’s connection option says whose account it is:
"workspace", the default: the Workspace has one connection, and every Invocation uses it. Connecting it needs theconnectors:writepermission."personal": each user connects their own account, and an Invocation uses the connection of the user it acts for. An Invocation acting for someone without a connection fails withCONNECTOR_NOT_CONNECTED; it never uses another user’s connection or a Workspace one. A scheduled Action runs as a service user, so it can’t list a personal Connector. Connecting your own needs onlyconnectors:read.
export const github = connector("github", { provider: "github", connection: "personal" });
Each Action Invocation lists the connections its latest attempt used in connections, with the user who connected each account.
You connect a Connector through the provider’s sign-in, with an API key, or with an OAuth 2.0 client’s ID and secret, as the provider allows. In the Console, open the Connector’s provider from Connectors; from the CLI, run tractorbeam connect <connector>.
Providers
A Connector’s provider names one of the providers WorkOS Pipes offers, by its slug, such as slack or hubspot. The Console lists every provider, with how each connects, under Connectors → Providers, and opens each one in a panel with its Connectors and its OAuth app. A provider with a fixed API host gives the Connector its origins by default; a provider whose host differs for each customer, such as salesforce, needs origins.
A provider’s sign-in uses an OAuth app registered with the provider. Some providers use Tractorbeam’s own app. For the rest, the Workspace registers its own app with the provider and sets it once, and every Connector naming the provider uses it. Once an Apply commits a Connector naming the provider, the provider’s panel in Connectors shows the redirect URI to register and sets the app. Connecting a Connector whose sign-in waits for the app starts there. tractorbeam provider get-oauth-app <provider> shows the same redirect URI, and the CLI sets the app too:
tractorbeam provider set-oauth-app hubspot --client-id <client-id>
Setting it needs connectors:write. The CLI reads the client secret at a hidden prompt, or from standard input.
A credential is the secret value, such as an API key or an OAuth access token, that a connection or a Secret supplies. A rotated key or a refreshed token is a new credential for the same connection.