Skip to main content
RapidDev - Software Development Agency
retool-integrationsREST API Resource

How to Integrate Retool with Flock

Connect Retool to Flock using a REST API Resource with an OAuth access token. Send automated notifications to Flock channels via Incoming Webhooks or the Bot API, and build alert dispatch tools that post messages to Flock when operational events occur — deploy completions, error spikes, or sales milestones — directly from Retool apps and Workflows.

What you'll learn

  • How to create a Flock Incoming Webhook or Bot API integration and configure it in Retool
  • How to post formatted messages and attachments to Flock channels from Retool queries
  • How to build an alert dispatch tool that sends notifications based on operational triggers
  • How to use Retool Workflows to schedule and automate Flock notifications
  • How to structure Flock message payloads with rich formatting for readable alerts
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner14 min read15 minutesCommunicationLast updated April 2026RapidDev Engineering Team
TL;DR

Connect Retool to Flock using a REST API Resource with an OAuth access token. Send automated notifications to Flock channels via Incoming Webhooks or the Bot API, and build alert dispatch tools that post messages to Flock when operational events occur — deploy completions, error spikes, or sales milestones — directly from Retool apps and Workflows.

Quick facts about this guide
FactValue
ToolFlock
CategoryCommunication
MethodREST API Resource
DifficultyBeginner
Time required15 minutes
Last updatedApril 2026

Build Flock Alert and Notification Tools in Retool

Teams using Flock for internal communication often want Retool dashboards to push notifications to the right Flock channels automatically — alerting the engineering team when a deployment completes, notifying sales when a large deal closes, or sending daily digest messages with operational metrics. Retool makes this straightforward by connecting to Flock's API, enabling both on-demand notifications triggered by user actions and scheduled automated messages via Retool Workflows.

Flock offers two integration methods. Incoming Webhooks are the simplest approach — you create a webhook URL in the Flock App Directory, and any HTTP POST to that URL posts a message to the configured channel without additional authentication. The Flock Bot API provides more capabilities: create a bot user, authenticate with an OAuth token, and post messages to any channel the bot has access to, fetch channel lists, or send direct messages to specific users. For most Retool notification use cases, Incoming Webhooks provide sufficient functionality with minimal setup.

Common Retool apps built with Flock include: one-click alert dispatch panels where support teams post incident notifications to the engineering Flock channel, daily operations digest Workflows that send scheduled summary messages with key metrics each morning, deployment notification tools that post to the #deployments channel when a Retool-triggered deploy completes, and sales milestone notifiers that post to #wins when a deal above a threshold is closed from the CRM dashboard.

Integration method

REST API Resource

Flock supports two integration approaches: Incoming Webhooks (simplest, webhook URL only, no auth required) for one-way message posting, and the Flock Bot API (OAuth token authentication) for full two-way integration. Configure a Retool REST API Resource targeting Flock's API, use the webhook URL or OAuth token to post messages, and build notification workflows that send alerts from Retool directly to Flock channels. All requests are proxied server-side through Retool.

Prerequisites

  • A Flock account with access to a workspace where you can create app integrations
  • An Incoming Webhook URL created via the Flock App Directory, or a Bot API token from a Flock bot application
  • The name of the Flock channel where notifications should be posted
  • A Retool account with permission to create Resources

Step-by-step guide

1

Create a Flock Incoming Webhook

Log into your Flock account at dev.flock.com or via the Flock application. Navigate to the Flock App Directory by clicking on your workspace name in the top-left, then selecting 'App & Integrations' or going directly to dev.flock.com. Search for 'Incoming Webhooks' in the app directory and click on it. Click 'Add to Flock' to add the Incoming Webhooks integration to your workspace. In the configuration screen, select the channel where you want to post messages using the channel dropdown — this determines which Flock channel receives messages sent to this webhook. Give the webhook a descriptive name like 'Retool Alerts' and optionally upload a custom icon. Click 'Save' to create the webhook. Flock generates a unique webhook URL in the format 'https://api.flock.com/hooks/sendMessage/TOKEN_HERE'. Copy this complete URL — it includes the authentication token and is everything needed to post messages. If you need to post to multiple channels, create separate webhooks for each channel and store each URL separately.

Pro tip: Treat Flock Incoming Webhook URLs as secrets — anyone with the URL can post messages to your channel. Store the complete webhook URL in Retool's configuration variables rather than hardcoding it in query bodies. Do not share webhook URLs publicly or commit them to version control.

Expected result: You have a Flock Incoming Webhook URL that, when POSTed to with the correct JSON payload, posts a message to your selected Flock channel.

2

Create the Flock REST API Resource in Retool

In Retool, navigate to the Resources tab and click 'Create New'. Select 'REST API' from the resource type list. For the Incoming Webhook approach, set the Base URL to 'https://api.flock.com'. Under Authentication, select 'None' — the webhook URL itself contains the authentication token as a path segment. Under Headers, add 'Content-Type: application/json'. Click 'Save Resource' and name it 'Flock'. Next, store your webhook configuration in Retool Settings → Configuration Variables: add 'FLOCK_WEBHOOK_TOKEN' with the token portion of your webhook URL (the part after /hooks/sendMessage/), and mark it as secret. If you are using the Flock Bot API instead of Incoming Webhooks, store your OAuth access token as 'FLOCK_BOT_TOKEN'. For the Bot API, add an 'Authorization: Bearer {{ retoolContext.configVars.FLOCK_BOT_TOKEN }}' header to the resource configuration. The complete webhook path for queries will be '/hooks/sendMessage/{{ retoolContext.configVars.FLOCK_WEBHOOK_TOKEN }}'.

resource-config.json
1{
2 "Base URL": "https://api.flock.com",
3 "Headers": {
4 "Content-Type": "application/json"
5 },
6 "Note": "Webhook token included in path: /hooks/sendMessage/{token}. Bot API adds Authorization: Bearer {token} header."
7}

Pro tip: If you plan to use multiple Flock channels, consider storing the channel-specific webhook URLs as separate configuration variables (FLOCK_WEBHOOK_ALERTS, FLOCK_WEBHOOK_DEPLOYMENTS) rather than a single generic token. This makes routing messages to the correct channel explicit and easy to configure.

Expected result: The Flock REST API Resource is saved with the API base URL. Configuration variables for webhook tokens are stored as secrets.

3

Post a basic notification to a Flock channel

Create a new query using the Flock resource to post a message via the Incoming Webhook. Set the method to POST and the path to '/hooks/sendMessage/{{ retoolContext.configVars.FLOCK_WEBHOOK_TOKEN }}'. Set the body type to JSON. The Flock Incoming Webhook accepts a JSON body with a 'text' field for the message content. Flock supports basic markdown-like formatting: use *text* for bold, _text_ for italic, and <flock://user/USER_ID|@Username> for user mentions. The 'text' field supports newlines using for multi-line messages. Test this query first with a simple message — POST a body of '{ "text": "Test message from Retool" }' to verify the webhook is working and messages appear in the correct Flock channel. Once the basic connection works, add dynamic content by binding the message text to form inputs or query results using Retool's {{ }} expression syntax in the query body.

basic-message-query.json
1// POST /hooks/sendMessage/{webhook_token}
2// Body (JSON):
3{
4 "text": "{{ messageInput.value || 'Test message from Retool' }}"
5}

Pro tip: Flock's Incoming Webhook 'text' field renders HTML entities — if your message contains special characters like < > &, they will display correctly in Flock's client. For user mentions, you need to know the Flock user ID, which is available via the Bot API's /v2/contacts.list endpoint if you need programmatic mention lookup.

Expected result: The query posts a message to the configured Flock channel. The message appears in Flock within a few seconds.

4

Build rich formatted alert messages with attachments

Flock's Incoming Webhook supports richer message formatting via the 'attachments' array in the JSON body. Attachments allow adding a colored sidebar, title with link, description text, and structured views with multiple fields. This is ideal for structured alerts where you want to show multiple data points clearly. The attachment object accepts 'color' (hex color code for the left border — use #FF0000 for red/critical, #FF8C00 for orange/warning, #00AA00 for green/success), 'title' (link text), 'description' (body text), and 'views' for structured field display. Build a JavaScript query that constructs the full message payload by combining static template structure with dynamic values from form inputs or other query results. The dynamic content — incident severity, affected system, timestamp — comes from Retool component values bound via {{ }} expressions in the query body JSON.

rich-alert-message.json
1// POST /hooks/sendMessage/{webhook_token}
2// Body (JSON) for a rich incident alert:
3{
4 "text": "🚨 Incident Alert: {{ incidentTitle.value }}",
5 "attachments": [
6 {
7 "color": "{{ severitySelect.value === 'P1' ? '#FF0000' : severitySelect.value === 'P2' ? '#FF8C00' : '#FFCC00' }}",
8 "title": "{{ incidentTitle.value }}",
9 "description": "{{ incidentDescription.value }}",
10 "views": {
11 "widget": [
12 {
13 "type": "text",
14 "text": "*Severity:* {{ severitySelect.value }}\n*System:* {{ systemSelect.value }}\n*Reported by:* {{ current_user.fullName }}\n*Time:* {{ new Date().toLocaleString() }}"
15 }
16 ]
17 }
18 }
19 ]
20}

Pro tip: Keep message text concise for Flock — long messages do not collapse in Flock the way they do in Slack. Put the essential details (severity, system, brief description) in the attachment title and color, and link to detailed information in your Retool dashboard rather than including all details in the message.

Expected result: The formatted alert message appears in Flock with a colored left border matching severity, structured fields showing incident details, and the message text as a summary header.

5

Build a Retool Workflow for scheduled digest notifications

Create a Retool Workflow to automate daily or weekly Flock digest messages without manual intervention. Navigate to Retool Workflows and click 'Create Workflow'. Add a Schedule trigger and set the cron expression — for a daily 9 AM message, use '0 9 * * 1-5' (weekdays at 9 AM UTC, or adjust for your timezone). Add Resource Query blocks to fetch the metrics you want to include: yesterday's order count and revenue from your database, active support ticket counts from your ticketing tool, or any other KPIs from connected Resources. Add a JavaScript Code block to format these metrics into a Flock message payload, calculating percentage changes versus the previous period and constructing the attachment JSON. Add a final Resource Query block targeting the Flock resource with POST to the webhook path, using the formatted payload from the JavaScript block as the body. Click 'Publish' to activate the Workflow. The digest will post automatically on schedule without any manual trigger.

daily_digest_builder.js
1// JavaScript block: format daily digest message
2const ordersData = getOrders.data;
3const ticketsData = getTickets.data;
4
5const todayOrders = ordersData.today_count || 0;
6const yesterdayOrders = ordersData.yesterday_count || 0;
7const orderChange = yesterdayOrders > 0
8 ? Math.round(((todayOrders - yesterdayOrders) / yesterdayOrders) * 100)
9 : 0;
10const changeEmoji = orderChange >= 0 ? '📈' : '📉';
11
12return {
13 text: `📊 Daily Ops Digest — ${new Date().toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' })}`,
14 attachments: [
15 {
16 color: '#0066CC',
17 description: [
18 `*Orders:* ${todayOrders} ${changeEmoji} (${orderChange > 0 ? '+' : ''}${orderChange}% vs yesterday)`,
19 `*Open Tickets:* ${ticketsData.open_count || 0}`,
20 `*Resolved Today:* ${ticketsData.resolved_today || 0}`
21 ].join('\n')
22 }
23 ]
24};

Pro tip: Retool Workflows run in UTC. If your team expects the digest at 9 AM in a specific timezone, adjust the cron schedule to account for the offset — for US Eastern Time (UTC-5 standard, UTC-4 daylight), use '0 14 * * 1-5' to post at 9 AM EST.

Expected result: The Workflow is published and runs automatically on the configured schedule. A formatted digest message appears in the Flock channel each morning without manual intervention.

Common use cases

Build an incident alert dispatcher for the engineering team

Create a Retool panel for the on-call team that allows posting formatted incident alerts to the engineering Flock channel with one click. The form includes fields for incident title, severity level, affected systems, and initial description. Submitting the form posts a richly formatted Flock message with the incident details, a direct link to the relevant monitoring dashboard, and the name of the person posting the alert — replacing the manual process of copying and pasting into Flock.

Retool Prompt

Build a Retool incident notification tool with a form for incident title, severity (P1/P2/P3), affected system, and description. Clicking 'Post Alert' sends a formatted message to the #incidents Flock channel via the Incoming Webhook, including the severity as a color-coded attachment and the Retool dashboard URL for investigation.

Copy this prompt to try it in Retool

Create a daily operations digest Workflow

Build a Retool Workflow that runs every morning at 9 AM and queries key operational metrics from multiple data sources — orders fulfilled, support tickets opened and closed, revenue for the previous day, and active incidents. Format these into a structured Flock message and post it to the #ops-digest channel, giving the whole team a daily snapshot without requiring anyone to manually compile the report. The Workflow handles data fetching, number formatting, and message dispatch automatically.

Retool Prompt

Create a Retool Workflow that runs daily at 9:00 AM, queries yesterday's metrics from the orders database (total orders, revenue, top product), queries Zendesk for ticket volume, formats a digest message, and posts it to the #daily-digest Flock channel. Include comparison percentages vs. the previous day.

Copy this prompt to try it in Retool

Build a deployment notification tool

Create a Retool deployment management panel where engineers trigger production deployments via a Retool action. When the deployment action completes successfully, automatically post a notification to the #deployments Flock channel showing what was deployed, who deployed it, the deployment time, and a link to the deployment log. On failure, post to #alerts with the error details and a link to the failed job.

Retool Prompt

Build a Retool deployment panel where engineers select a service and click Deploy. On success, post a Flock message to #deployments with the service name, version, deployer, and timestamp. On failure, post to #alerts with the error details. Use Retool's query event handlers for success/failure routing.

Copy this prompt to try it in Retool

Troubleshooting

POST to webhook URL returns 200 but no message appears in Flock channel

Cause: The webhook URL was created for a different channel than expected, the webhook integration has been disabled or deleted in the Flock App Directory, or the message payload is missing the required 'text' field.

Solution: Verify the webhook URL in the Flock App Directory: navigate to your workspace integrations and check that the Incoming Webhook is still active and points to the intended channel. Confirm the query body includes the 'text' field — Flock requires this field in the webhook payload. Test with a minimal payload '{ "text": "test" }' to rule out payload formatting issues.

Messages appear in Flock but special characters or formatting are displayed incorrectly

Cause: The JSON body contains unescaped special characters, or Flock's markdown formatting syntax is different from what is expected. Flock uses its own formatting syntax that differs from Slack's mrkdwn.

Solution: In Retool query bodies, ensure strings with newlines use \n (escaped), not literal line breaks. For bold text in Flock, use *text* (asterisks). Avoid using backticks for code formatting in Flock webhooks — they are not universally supported. For user mentions, use the Flock-specific format <flock://user/USER_ID|Display Name> rather than @username. Test formatting with a simple message before building complex templates.

Workflow Flock notification does not fire on the scheduled trigger

Cause: The Workflow has not been published (only saved), the schedule trigger has a syntax error in the cron expression, or the Workflow failed silently on a previous block before reaching the Flock notification block.

Solution: Ensure the Workflow is Published (not just saved) — click 'Publish Release' after making changes. Check the Workflow run history for recent executions and look for failed blocks. Test the Workflow manually by clicking 'Run Now' to verify all blocks execute successfully before relying on the schedule trigger. Validate your cron expression at crontab.guru to confirm it matches the intended schedule.

Flock Bot API returns 'unauthorized' or 'forbidden' when posting messages

Cause: The Bot API requires OAuth authentication with a valid access token, and the bot has not been added to the target channel, or the token has expired or been revoked.

Solution: For Bot API integrations: ensure the Authorization header contains 'Bearer YOUR_TOKEN' and the token belongs to a bot that has been added as a member of the target channel. Flock bots must be explicitly invited to channels before they can post. If using channel_id in the API request, verify the bot has access to that channel. For Incoming Webhooks (the simpler approach), OAuth tokens are not needed — switch to webhooks if bot API configuration is proving difficult.

Best practices

  • Store Flock webhook URLs in Retool configuration variables as secrets — the complete webhook URL contains an authentication token and should not be hardcoded in query bodies or shared publicly
  • Create separate webhook integrations for different alert categories (incidents, deployments, daily reports) rather than routing everything to one webhook — this lets teams subscribe to only the channels relevant to them
  • Keep Flock message text concise and link to Retool dashboards for details — long messages with excessive data create noise in team channels and reduce engagement with legitimate alerts
  • Use color coding in attachments consistently across your tools: red for critical/P1, orange for warning/P2, green for success/resolved — this creates visual recognition that works even without reading the text
  • Add the posting user's name to alert messages using {{ current_user.fullName }} in Retool expressions — this accountability makes it clear who triggered the notification and provides a point of contact for follow-up questions
  • Use Retool Workflows for scheduled digest messages rather than running them from app queries — Workflows run server-side on schedule without requiring anyone to have the Retool app open
  • Implement rate limiting on manual alert dispatch buttons using Retool's query throttle settings — prevent users from accidentally spamming the Flock channel by clicking buttons multiple times

Alternatives

Frequently asked questions

Does Retool have a native Flock connector?

No, Retool does not have a native Flock connector. You connect using a REST API Resource with Flock's Incoming Webhook URL or Bot API OAuth token. The Incoming Webhook approach is the simplest for one-way notification use cases and requires minimal configuration compared to the full Bot API integration.

What is the difference between Flock Incoming Webhooks and the Bot API?

Incoming Webhooks are one-way — you can only post messages to a pre-configured channel. They require no OAuth setup, just a webhook URL. The Flock Bot API supports two-way interaction: posting to any channel the bot has access to, fetching channel lists, sending direct messages, and reading incoming messages. For Retool notification use cases, Incoming Webhooks are usually sufficient and much simpler to configure.

Can I post to multiple different Flock channels from one Retool app?

Yes. Create separate Incoming Webhooks for each channel in the Flock App Directory, store each webhook token as a separate Retool configuration variable (FLOCK_WEBHOOK_INCIDENTS, FLOCK_WEBHOOK_DEPLOYMENTS, etc.), and configure separate queries for each channel. You can also use a Select dropdown in your Retool app to let users choose the destination channel before posting.

Can Flock messages include images or file attachments from Retool?

Flock Incoming Webhooks support image attachments by including an 'imageURL' field in the attachment object pointing to a publicly accessible image URL. Direct file attachment via webhook is not supported — for sharing files, link to a publicly accessible URL (such as a Filestack or S3 file) in the message text or attachment description.

Are there rate limits on Flock Incoming Webhooks?

Flock enforces rate limits on webhook requests to prevent abuse, though specific limits are not publicly documented. For typical Retool notification use cases (occasional manual alerts and scheduled daily digests), limits are not a concern. If building a system that might post many messages in rapid succession, implement a minimum delay between posts and handle 429 responses by waiting before retrying.

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.