Skip to main content
RapidDev - Software Development Agency
retool-integrationsRetool Native Resource

How to Integrate Retool with Slack

Connect Retool to Slack using the native Slack Resource in the Resources tab. Authenticate with OAuth 2.0, then use the query editor to post messages, list channels, and trigger Slack notifications from buttons or Retool Workflows. The entire setup takes under 10 minutes and requires no API endpoint memorization.

What you'll learn

  • How to add a Slack Resource using OAuth 2.0 in the Retool Resources tab
  • How to use the native Slack query editor to post messages and list channels
  • How to trigger Slack notifications from button clicks in a Retool app
  • How to build a Retool Workflow that sends scheduled Slack alerts
  • How to configure shared vs. per-user OAuth credentials for team-wide Slack access
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner15 min read10 minutesCommunicationLast updated April 2026RapidDev Engineering Team
TL;DR

Connect Retool to Slack using the native Slack Resource in the Resources tab. Authenticate with OAuth 2.0, then use the query editor to post messages, list channels, and trigger Slack notifications from buttons or Retool Workflows. The entire setup takes under 10 minutes and requires no API endpoint memorization.

Quick facts about this guide
FactValue
ToolSlack
CategoryCommunication
MethodRetool Native Resource
DifficultyBeginner
Time required10 minutes
Last updatedApril 2026

Why Connect Retool to Slack?

Retool apps are powerful data dashboards and operational tools, but the value multiplies when they can push notifications and alerts into the communication channels your team already lives in. Connecting Retool to Slack lets you build apps where clicking a 'Approve' button sends a Slack message to the relevant team, or where a daily Retool Workflow posts a morning digest of key business metrics directly to your #operations channel.

The Slack native connector in Retool handles the OAuth handshake for you, stores tokens securely server-side, and provides an operation dropdown that lists the most common Slack API actions — no need to look up endpoint paths or authentication header formats. This makes it accessible to developers and non-developers on your team alike, while still giving advanced users the ability to pass custom payloads and use Block Kit for richly formatted messages.

Beyond one-off notifications, the combination of Retool Workflows and Slack is particularly powerful for operational alerting. You can schedule a Workflow to query your database, check for anomalies or threshold breaches, and post a formatted Slack alert only when conditions are met — all without running any external infrastructure. This turns Retool into a lightweight monitoring and alerting system on top of your existing data sources.

Integration method

Retool Native Resource

Retool includes a dedicated Slack connector that authenticates via OAuth 2.0 and surfaces common Slack actions — post messages, list channels, upload files — through a dropdown interface in the query editor. All requests are proxied server-side through Retool's backend, so your Slack tokens never reach the browser. Optionally, shared OAuth credentials allow the entire team to post from a single Slack identity.

Prerequisites

  • A Retool account (Cloud or self-hosted) with permission to add Resources
  • A Slack workspace where you have permission to install apps (Workspace Owner or Admin, or approval from one)
  • The target Slack channel already created (e.g., #alerts, #operations)
  • Basic familiarity with the Retool app builder — query editor and components

Step-by-step guide

1

Add a Slack Resource via OAuth 2.0

Open Retool and navigate to the Resources tab in the left sidebar (or go to your Retool home page and click Resources in the top navigation). Click the blue Add Resource button in the top right corner. In the resource type selector, scroll to the Communication section or use the search bar to find 'Slack'. Click the Slack option to open the configuration panel. You will see a configuration form with a Name field and an OAuth 2.0 Connect button. Give your resource a descriptive name like 'Slack - Production' or 'Slack Workspace'. Click the orange Connect with Slack button. A Slack OAuth consent screen opens in a new browser tab or popup window, listing the permissions Retool is requesting: posting messages, reading channel lists, and uploading files. Select the Slack workspace you want to connect from the dropdown at the top-right of the OAuth screen, then click Allow. Slack redirects back to Retool with a success confirmation and the resource configuration panel now shows a green 'Connected' badge. Under the Advanced options, you can optionally check 'Share OAuth 2.0 credentials between users' — enable this if you want all Retool users to post as a single shared bot identity rather than each user authenticating individually with their own Slack account. For operational alert apps, shared credentials are usually the right choice. Click Save Changes to finalize the resource.

Pro tip: If you need Retool to post as a bot with a custom name (e.g., 'Retool Bot'), enable 'Share OAuth 2.0 credentials' and authenticate with a dedicated Slack bot user or service account rather than a personal Slack account.

Expected result: A Slack resource appears in your Resources list with a green connected status. You can now select it as a data source in the Retool query editor.

2

Create a query to post a Slack message

Open or create a Retool app. In the bottom panel, click the + New button to create a new query. In the query configuration panel, select your Slack resource from the Resource dropdown. The query editor switches to show a Slack-specific interface with an Action Type dropdown. Click the Action Type dropdown and review the available operations: Post Message, List Channels, Upload File, Add Reaction, Get Channel Info, List Users, and more. Select Post Message to configure a message send operation. Fill in the required fields that appear: - Channel: Enter the channel name (e.g., #alerts) or a channel ID. You can hard-code a channel name or reference a Retool component with {{ select1.value }} to make it dynamic. - Message: Enter the message text. You can use Slack's mrkdwn formatting: *bold*, _italic_, `code`, and >blockquote. Use {{ }} expressions to include dynamic data from other queries or components, for example: 'New escalation: Order {{ table1.selectedRow.order_id }} from customer {{ table1.selectedRow.customer_email }} needs review.' - Optionally, expand the Advanced section to set a custom Bot Username (displayed sender name) and Bot Icon Emoji (e.g., :bell: for a notification bot). Set the query's Trigger mode to Manual (not Auto) since you only want messages sent when an action occurs, not on every app load. Click Run to test the query — switch to your Slack workspace and verify the message arrived in the target channel with the correct formatting and dynamic values.

Pro tip: Use Slack Block Kit JSON in the 'Blocks' field for richer message formatting — sections, dividers, buttons, and context blocks. This gives you more visual control than plain text messages.

Expected result: A Slack message appears in the target channel with the correct content and any dynamic values correctly interpolated from Retool components or query results.

3

Attach the Slack query to a button component

Now wire the Slack message query to a user interaction in your Retool app. In the Component panel on the left sidebar, drag a Button component onto the canvas. Click the button to open its configuration in the right-side Inspector panel. In the Inspector, find the Interaction section and click Add Event Handler. In the event handler configuration: - Event: select 'Click' (this is the default) - Action: select 'Trigger query' - Query: select your Slack post message query from the dropdown This creates a direct link so that every time a user clicks the button, the Slack query runs and posts the configured message. You can also add a second event handler after the Slack query succeeds — for example, triggering a database update query to log that the notification was sent, or showing a success notification using the 'Show notification' action with message 'Slack alert sent successfully'. For additional safety on destructive or high-impact actions, enable the Confirm before running toggle in the button's Interaction section. This shows a confirmation modal before the query executes. Customize the confirmation message to say something contextual like 'Post escalation alert to #operations-alerts?' so users clearly understand what will happen. Test the full flow: click the button in your app, confirm the action if prompted, and verify the Slack message arrives in the target channel. Check the query run history in the bottom panel to see the execution status and any error details.

Pro tip: Add a second event handler on the button that shows a Retool notification (Action: Show notification, Message: 'Slack message sent') so users get in-app feedback that the action completed, in addition to the message appearing in Slack.

Expected result: Clicking the button triggers the Slack query and a message appears in the Slack channel within seconds. The button remains usable and errors are surfaced cleanly in the Retool interface.

4

List Slack channels dynamically for a channel selector

If your app needs to let users choose which Slack channel to post to rather than hard-coding a destination, create a separate query that fetches the list of available channels. In the query editor, create a new Slack query and set Action Type to List Channels. This returns all channels in your Slack workspace that the OAuth app has access to. In the Advanced tab of this query, enable Run this query automatically when inputs change and set the Trigger to On page load. This ensures the channel list is loaded as soon as the app opens. Next, drag a Select component from the Component panel onto the canvas. In the component's Inspector, set: - Data source: {{ listChannelsQuery.data }} (replace with your actual query name) - Label: {{ self.name }} — uses the 'name' field from the Slack API response (the channel name like 'general', 'alerts') - Value: {{ self.id }} — uses the channel's Slack ID (recommended over name for reliability) Now update your Post Message query's Channel field to reference the Select component: {{ channelSelect.value }}. When users pick a channel from the dropdown, the Slack message query dynamically targets that channel. This pattern is useful for apps where different team members route alerts to different channels based on context.

channelListTransformer.js
1// JavaScript transformer to format channel list for a Select component
2// Add this as a query transformer on the List Channels query
3const channels = data; // raw Slack API response
4return channels
5 .filter(ch => !ch.is_archived) // exclude archived channels
6 .sort((a, b) => a.name.localeCompare(b.name)) // alphabetical order
7 .map(ch => ({
8 label: '#' + ch.name,
9 value: ch.id,
10 is_private: ch.is_private
11 }));

Pro tip: Use the channel ID (ch.id) as the value rather than the channel name. Channel names can be renamed in Slack, but IDs are permanent — your Retool app won't break if someone renames a channel.

Expected result: A Select dropdown in the app shows all active Slack channels. When a user selects a channel and clicks the Send button, the message is posted to the selected channel.

5

Build a scheduled Slack alert using Retool Workflows

For automated, scheduled notifications that run independently of any user being logged into the Retool app, use Retool Workflows. Navigate to the Workflows section in the Retool home page sidebar (look for the lightning bolt icon or 'Workflows' label). Click New Workflow to open the Workflow canvas. Click Add Trigger at the top of the canvas and select Schedule. Configure the schedule: select a frequency (Every day, Every week, or custom cron expression). For a daily 9 AM report, select 'Every day' and set the time to 09:00 in your appropriate timezone. A workflow can have multiple schedule triggers, so you could also add a Monday-specific trigger for a weekly summary. Click the + button to add the first block after the trigger. Select Resource Query block, then configure it: - Resource: your database (e.g., PostgreSQL resource) - Query: write the SQL to fetch the metrics you want to report Add a second block after the database query. Select Resource Query block again, this time choosing your Slack resource. Set Action Type to Post Message. In the Message field, reference the data from the first block using the block name syntax: 'Daily summary: {{ block1.data[0].total_signups }} new signups, ${{ block1.data[0].revenue }} revenue today.' Click Publish Release to activate the workflow. The schedule trigger will fire automatically at the configured time, run the database query, and post the Slack message — no user interaction required. Check the Runs tab in the Workflow editor to monitor execution history and debug any errors.

dailyMetricsQuery.sql
1-- SQL query for the database block in the Workflow
2-- Fetches yesterday's key metrics for the daily Slack digest
3SELECT
4 COUNT(CASE WHEN DATE(created_at) = CURRENT_DATE - 1 THEN 1 END) AS new_signups,
5 COALESCE(SUM(CASE WHEN DATE(created_at) = CURRENT_DATE - 1 THEN amount END), 0) AS revenue,
6 COUNT(CASE WHEN DATE(cancelled_at) = CURRENT_DATE - 1 THEN 1 END) AS cancellations
7FROM users
8LEFT JOIN orders ON users.id = orders.user_id;

Pro tip: Use Retool Workflow's error handling to send a Slack notification even when the workflow fails — add a global error handler block that posts to a #retool-alerts channel with the error message, so your team knows when the daily digest didn't run.

Expected result: The Workflow appears in the Published state. At the scheduled time, Retool automatically runs the database query and posts the formatted message to the Slack channel. The Runs tab shows a successful execution entry.

Common use cases

Build an order escalation panel with Slack alerts

Create a Retool dashboard that shows all pending orders from your database. When a support agent clicks the 'Escalate' button on a row, the app automatically posts a message to the #escalations Slack channel with the order details, customer name, and a deep link back to the Retool app. This eliminates manual copy-paste between tools and creates an audit trail in both Retool and Slack.

Retool Prompt

Build an admin panel that lists all pending orders from the PostgreSQL database, with an 'Escalate to Slack' button on each row that posts the order ID, customer email, and issue description to the #escalations channel, then updates the order status to 'escalated' in the database.

Copy this prompt to try it in Retool

Schedule a daily metrics digest to a Slack channel

Build a Retool Workflow that runs every weekday at 9 AM, queries your database for key business metrics (new signups, revenue, active users), formats the data into a structured Slack message using Block Kit sections, and posts it to your #daily-metrics channel. This keeps the whole team aligned without anyone needing to open the dashboard manually.

Retool Prompt

Build a Retool Workflow with a schedule trigger at 9 AM Monday-Friday that queries the database for yesterday's signups, revenue, and churn count, then posts a formatted Slack summary to #daily-metrics with emoji indicators for whether each metric is up or down vs. the prior day.

Copy this prompt to try it in Retool

User approval workflow with Slack notification

Build a Retool app for reviewing new user registrations that require manual approval. When a reviewer clicks 'Approve' or 'Reject', the app updates the user's status in the database and sends a direct message to the reviewer via Slack confirming the action was taken. A separate Workflow monitors for users pending review for more than 24 hours and posts a reminder to the #user-ops channel.

Retool Prompt

Create a user review panel that shows pending registrations with Approve and Reject buttons. On approval, update the users table status to 'active' and send a Slack DM to the current Retool user confirming the action. On rejection, mark the user as 'rejected' and post a note to #user-ops.

Copy this prompt to try it in Retool

Troubleshooting

OAuth connection fails with 'Redirect URI mismatch' or returns to Retool with an error banner

Cause: This typically occurs on self-hosted Retool instances where the BASE_DOMAIN environment variable is not set correctly, causing the OAuth redirect URL to not match what Slack expects.

Solution: On self-hosted Retool, ensure the BASE_DOMAIN environment variable is set to your Retool instance's public URL (e.g., https://retool.yourcompany.com). On Retool Cloud, this is handled automatically. If the issue persists, check that you are not blocking popups — the OAuth flow requires a popup window to open the Slack consent screen.

Post Message query returns 'channel_not_found' error even though the channel exists

Cause: Either the Slack app installed during OAuth does not have access to that channel (common with private channels), or you are passing the channel name without the # prefix when the Slack API expects just the name string, or you are using a channel name instead of the channel ID after a rename.

Solution: For private channels, the Slack app must be explicitly invited to the channel: in Slack, open the private channel, click the channel name at the top, go to Integrations > Apps, and add your Retool Slack app. For the channel field in the query, try using the channel ID (starts with C, found via List Channels operation) rather than the display name. Channel names can change; IDs do not.

Messages post successfully but appear as coming from a personal user name instead of a bot

Cause: OAuth credentials are not shared between users, so when individual team members trigger the query, it posts using their personal Slack OAuth token with their identity.

Solution: In the Slack resource configuration (Resources tab → click your Slack resource → Edit), check the 'Share OAuth 2.0 credentials between users' option, then re-authenticate with the Slack account you want to use as the shared posting identity. All subsequent posts from any Retool user will use that shared identity.

Retool Workflow Slack block fails with 'not_in_channel' error in production but works in testing

Cause: The Slack app authenticated during OAuth may have been installed with a different account in testing vs. production environments, or the workflow is using a different Retool resource environment that points to a different Slack app installation.

Solution: Check which Slack resource your Workflow block is referencing (click the block and verify the Resource dropdown). Ensure the Slack resource used in the Workflow has been re-authenticated and has access to the target channel. If using multiple resource environments (e.g., staging and production), verify each environment's Slack resource is connected.

Best practices

  • Use shared OAuth credentials for operational alert apps so messages appear from a consistent bot identity rather than individual team members' personal accounts.
  • Store the target channel IDs (not names) in Retool configuration variables (Settings → Configuration Variables) so you can change destinations without editing queries.
  • Add confirmation dialogs to buttons that trigger Slack messages — users should not accidentally spam channels by clicking twice.
  • Use Slack Block Kit JSON for formatted messages in operational contexts — structured blocks with sections, dividers, and context lines are far more readable than plain text at a glance.
  • Build Slack notification queries with Manual trigger mode (not Auto) to ensure they only run when explicitly invoked, not on every app state change.
  • Use Retool Workflows instead of app-level queries for scheduled Slack alerts — Workflows run server-side on schedule even when no user is logged in.
  • Always test Slack queries by posting to a private #retool-test channel before wiring them to production-facing buttons, to verify formatting and content before team members see the messages.
  • Handle query failures gracefully: in the button's event handler, add a failure handler that shows an in-app error notification so users know the Slack message did not send.

Alternatives

Frequently asked questions

Does Retool's Slack integration support Slack Block Kit for rich message formatting?

Yes. In the Post Message query, expand the Advanced section and find the Blocks field, where you can paste a JSON array of Block Kit block objects. Block Kit allows you to create structured messages with sections, dividers, markdown text, images, and context lines. This is the recommended approach for operational dashboards where at-a-glance readability matters.

Can I send Slack direct messages to individual users from Retool, not just channels?

Yes. In the Post Message query's Channel field, enter the user's Slack member ID (a string starting with 'U', found via the List Users operation). Slack will open a direct message conversation with that user and send the message. You can also use the user's email address in some configurations, but member IDs are more reliable.

What permissions does Retool's Slack OAuth app request?

Retool's Slack app requests scopes for posting messages (chat:write), listing channels (channels:read, groups:read, im:read, mpim:read), uploading files (files:write), and adding reactions (reactions:write). The exact scope list is displayed on the Slack OAuth consent screen during the connection flow. All requests are proxied server-side by Retool, so credentials never reach the browser.

How do I connect Retool to multiple Slack workspaces?

Create separate Slack Resources for each workspace — click Add Resource in the Resources tab, select Slack, authenticate with the second workspace, and give it a distinct name like 'Slack - Customer Success Workspace'. In your queries, select the appropriate resource from the Resource dropdown. Each resource maintains its own OAuth credentials independently.

Can I use Retool Workflows to send Slack messages without any user being logged into Retool?

Yes. Retool Workflows run server-side on schedule or via webhook trigger, completely independent of any user session. Configure a Workflow with a Schedule trigger, add a Resource Query block pointing to your Slack resource, and click Publish Release. The workflow will send Slack messages at the configured time even when no one is using the Retool app.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire Retool integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.