Skip to content
Weavz
Menu

Connect a customer’s Slack account from your product

Use this path when your product owns the customer experience. Keep the Weavz API key on your backend, map your customer to a stable end-user identity, and issue a connection link for that user.

For a SaaS engineer embedding customer-owned Slack access into a product.

What needs to be in place

  • A Weavz workspace with Slack configured for `per_user` connections and your backend API key stored server-side.
  • A stable customer ID from your product. Create or retrieve that end user in the intended workspace before issuing a connect URL.
  • If the workspace has multiple Slack aliases or OAuth app policies, identify the intended workspace integration for the connect-token request.
  • An available Slack OAuth app path for the integration and an authorized product origin for the connection popup.

For a product workflow, configure integrations and end-user connections for your product. A workspace template can provide a starting setup; your backend maps signed-in customers to end-user identities and runs the task through the API or SDK.

Work through the selected sources

The exact actions available depend on the integrations and actions enabled in the workspace. These steps keep the task bounded to the account and records you selected.

  1. Map the signed-in customer

    From your trusted backend, create or retrieve the Weavz end user using your product’s stable customer identifier. Do not trust an ID supplied only by the browser.

  2. Create a customer-scoped connect URL

    Use the end-user connect-token API or SDK for the Slack integration. Return only the short-lived connect URL to the authenticated customer’s session.

  3. Complete authorization

    Open Hosted Connect from the customer’s click and let them authorize Slack. Show a connected state only after the flow confirms completion.

  4. Verify the connection

    Optionally list the customer’s Slack channels with a read action. Execute later actions using the correct workspace and end-user identity.

App actions and developer details

Action names and inputs

These details help when configuring or implementing the task. You can follow the guide without starting from the action identifiers.

  • slack.list_channels

    Optional read-only validation after authorization, using the customer’s connection.

A product-builder task

Replace bracketed details with the records and scope you chose. Review the returned result against its sources.

Example instruction

This is a product-builder implementation guide, not an AI-client prompt. In your backend, map the authenticated product customer to their Weavz end-user identity, create a Slack connect token for that end user, and return the connect URL only to that customer’s session. After Hosted Connect confirms completion, show the connected state. Keep the API key server-side. Do not treat a URL being opened as proof of authorization.

Backend connect-token call

Keep this call on your backend. Resolve the signed-in product customer to the correct end user before creating the URL.

// Run on your backend after resolving the authenticated customer to an end user.
const { connectUrl } = await client.endUsers.createConnectToken(
  endUser.id,
  { integrationName: 'slack' },
)

// Return this URL only to the current customer's authenticated session.
return { connectUrl }

What the result contains

A Slack connection linked to the right customer identity, with the product controlling which signed-in user can request or use it.

Keep the source trail with it

Record the product customer key, Weavz workspace and end-user mapping, connect-session outcome, and later action result in your own product observability. Do not log the API key or expose it in the browser.

Keep drafts and writes separate

Creating a connect token and completing OAuth are explicit setup operations. Slack reads or writes are separate actions. If you add a smoke test, use a read-only action first and pass the authenticated customer identity on execution.

If a source or connection is missing

If authorization fails, keep the state disconnected and show the provider error or reconnect path. Recheck the workspace/end-user mapping and Slack authorization. Do not retry a write action to test a failed connection.

Reference workspace template: Everyday Agent Workspace.

Integrations

  • Slack

    The customer authorizes the Slack account they want your product to use.

Solution

Embedded integrations

How this task fits a broader app-access workflow.

Industry

SaaS and AI products

Related workflows by team and operating context.

Reference only: it demonstrates Slack in a personal AI workspace. This customer connection flow uses the API and end-user identity instead; it does not require the customer to create a workspace or configure a personal AI client.