Connectors are step functions for workflows that behave like Slack functions for services external to Slack. They take inputs and perform work for you when added as steps to your workflows.
Connector functions are a new addition to Slack automations. We recommend understanding the systems and APIs you're integrating with before setup.
Auth strategy | Capabilities |
---|---|
user | Can use end-user authentication via OAuth |
vars | Requires workspace environment variables for authentication |
Connectors use either OAuth or workspace environment variables to handle authentication.
Most connectors rely on end-user authentication. These connectors reply on an access token input parameter that you as a developer configure while adding the connector as a step in a workflow.
The first authentication strategy is called END_USER
. This strategy is supported by most connectors.
// An example access token property for a Salesforce connector:
salesforce_access_token: {
credential_source: "END_USER"
}
When a connector's access token credential source is set to END_USER
, the
auth token of the user who started the workflow will be used in the connector
step.
In cases like this, when a user starts a workflow from a shortcut link, the user will be prompted to connect their third-party service account via an OAuth flow. All of this— except for when they are sent to a browser to complete the authentication flow—happens inside their Slack client.
You do not need to do anything else besides set the credential_source
to END_USER
to configure end-user authentication for a connector.
Connectors that rely on workspace environment variables to handle authentication will require workspace admins to set these up before the connector can be used in a workflow.
Admins can set workspace environment variables for connectors that require them from within Workflow Builder, in the Manage Integrations section.
To open the Manage Integrations section, open Workflow Builder and access the additional options menu to the right of the Create Workflow button.
Creating your own connectors opens many more interoperability possibilities. We're not quite ready to enable developers to build their own connectors, but we'd love to hear from you if you're interested and patient.
In the meantime, we recommend building custom functions that call APIs with external authentication.