Skip to content

Tutorials

Tutorial: connect an integration

Connect a REST API and Slack, test the connections, keep the credentials safe, and call them from a workflow with Call API / Reference. Includes OAuth 2.0 connections.

Last updated 3 min read Edit this page on GitHub
On this page

Goal: connect a REST API and Slack, then post a Slack message from a workflow with data from the API.

You need: View, Create, Edit and Test integrations, and Manage references (integrations.*). Owner, Admin and Manager have them.

Time: about 20 minutes.

Integrations are under Build › Integrations. The page has the tabs Integrations, References, Connectors, Objects and MCP servers. A reference is one call you can make (for example Get customer or Send Message). Workflows, forms and agents call references, never the raw API.

The Integrations page with connected services
Integrations: each connection, its status and its references.

1. Connect a REST API#

  1. Select New integration.
  2. Enter a Name, choose REST API, and enter the Base URL, for example https://api.example.com. It must use HTTPS.
  3. Choose Authentication: API Key (a Header name and the key), Bearer Token, Basic Auth (user:pass), OAuth 2.0 (configure after creation) or None.
  4. Select Test connection. It sends a GET to the base URL with your credentials. Many APIs answer 404 at the root even when the key is right, so a 404 is not always a problem.
  5. Select Create integration.
  6. On the integration's page, add references: by hand, or import an API spec with Import → API spec (OpenAPI, Swagger, Postman)…. See References and OpenAPI import.

2. Connect Slack from a preset#

Connectors are ready-made integrations with their references already written.

  1. Open the Connectors tab and pick Slack.
  2. Paste the Bot User OAuth Token (xoxb-…) and select Continue. Optionally set the Default Channel.
  3. Select Test Connection. It should say which Slack workspace it connected to.
  4. Choose the references to create (Generate all, or pick some), then select Enable Connector.

You now have an integration called Slack (Connector) with references like Slack: Send Message.

The Connectors tab has presets for messaging (Slack, Microsoft Teams, SendGrid, Twilio, Gmail, Exchange Online), databases (PostgreSQL, SQL Server, MySQL, Snowflake, MongoDB, Oracle Database and more), storage, e-signature, CRM and AI providers. Databases are always added from Connectors. See Connectors.

3. Keep the credentials safe#

  • Keys, tokens and passwords are encrypted when they are stored (with the instance's ENCRYPTION_KEY). They are never sent back to the browser.
  • Workflows never see the credentials. A step calls a reference, and the reference adds the credentials from its integration.
  • Prefer an integration with Call API / Reference over the HTTP Request step for anything that needs a key. HTTP Request keeps its auth settings in the workflow itself.
  • Each integration has its own permissions (who can view, edit and run it) at the bottom of its page.

4. Call it from a workflow#

  1. Open a workflow and add Call API / Reference from the palette.
  2. Search for Get customer (from your REST API) and select it.
  3. Under Inputs, map each input to a value, for example {{form.customer_id}}. Fill in every input you need.
  4. Under Outputs → variables, tick the fields you want as variables.
  5. Add a second Call API / Reference step, label it Post to Slack, and pick Slack: Send Message. Set channel to #support and message to New request from {{get_customer_response.name}}.

After a call, the full response is {{<step label>_response}} and the HTTP status {{<step label>_status}}. The step label is lower-cased with spaces as underscores: Get customer gives {{get_customer_response}}. A failed call (say a 404) does not stop the workflow, so branch on the status when it matters. Use Insert data or the Data tab to pick these values instead of typing them.

Call API / Reference nodeJSON
{
  "id": "notify",
  "type": "call_reference",
  "label": "Post to Slack",
  "position": { "x": 400, "y": 300 },
  "config": {
    "reference_id": "<id of Slack: Send Message>",
    "input_mappings": {
      "channel": "#support",
      "message": "New request from {{get_customer_response.name}}"
    },
    "output_mappings": { "ts": { "enabled": true, "variableName": "slack_ts" } }
  }
}

5. Connect with OAuth 2.0 (optional)#

For APIs that use OAuth sign-in (authorization code with PKCE):

  1. Create the integration with OAuth 2.0 (configure after creation).
  2. On its page, select Edit in Connection Settings. Enter the Client ID, Client Secret, Authorization URL, Token URL and Scopes.
  3. In the provider's app settings, register the redirect URL https://<your-app>/api/connectors/oauth/callback.
  4. Select Connect and approve the access. The page shows ✓ Connected. Tokens refresh automatically; if access is revoked, select Reconnect.

Salesforce, Google Drive, Dropbox and the e-signature connectors fill in the OAuth endpoints for you. See OAuth connections.

What you built#

  • A REST API integration with references, and a Slack connector.
  • A workflow that calls one, maps its response into a variable, and posts it to Slack.

Next steps#

Was this page helpful?