cd /news/ai-agents/turn-slack-into-your-team-s-ai-resea… · home topics ai-agents article
[ARTICLE · art-109846] src=blog.apify.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Turn Slack into your team's AI research analyst with Apify MCP

Apify has published a tutorial showing how to build an AI research agent in Slack using its Model Context Protocol (MCP) server, which connects to Apify Actors for live web data extraction. The workflow, built on n8n, lets teammates tag @Research Analyst to get answers like competitor pricing or Reddit sentiment summaries directly in the thread. Apify's MCP server enables the agent to select specialized scraping tools and return structured, analyzed data rather than just links.

read15 min views6 publishedAug 25, 2026
Turn Slack into your team's AI research analyst with Apify MCP
Image: Blog (auto-discovered)

If you use X, you’ve probably seen people tag @grok

to verify a claim or summarize a thread without leaving the conversation.

Team research requests should feel just as effortless. But a “quick” competitor pricing check or Reddit sentiment summary can easily turn into an hour of switching tabs, collecting data, and writing up findings.

Here, you’ll learn to build an AI research agent directly in Slack. It connects to Apify through MCP, selects the right scraping tools, gathers live web data, and returns a clear answer in the original thread with context for follow-up questions.

What makes the Apify MCP server useful for research agents? #

You could connect a generic web search tool to an agent, and it would work well for basic lookups. The real difference is the depth of the answers you can get back. If you ask a search tool what users are complaining about in product reviews, it may simply return links to review pages for you to inspect yourself.

An agent connected to the Apify MCP server can go further. It can identify the target platform, select a specialized Actor, and extract reviews or conversations as structured data that it can analyze, count, and summarize.

Instead of stopping at page links, Apify Actors can retrieve specific reviews, pricing details, and discussions from platforms such as Shopify, G2, and Reddit, including sites that are almost impossible to access with generic search tools.

If you’re new to MCP, Apify’s Model Context Protocol explainer covers the standard. A hands-on guide to using MCP with Apify Actors walks through the client-server setup with practical examples.

You can also watch this video walkthrough to connect Apify Actors to an AI agent through MCP and see the workflow in action.

Summary of what you’ll build #

You'll build an n8n workflow that connects five components. It starts with a Slack trigger that listens for bot mentions in any channel and passes the request to an AI agent, which analyzes the question and determines how to respond.

The agent connects to an Apify MCP server, granting it access to a set of Actors that it can select and run dynamically as needed. Simple memory keeps follow-up questions tied to the right context, while a Slack reply node sends the final answer back to the original thread.

End-to-end, the flow looks like this: a teammate asks, @Research Analyst, what does Competitor X charge for its Pro plan?

n8n captures the mention, the agent determines that it needs live web data, calls the appropriate Actor through MCP, processes the results, and replies in the same thread with the pricing details and source links.

Prerequisites #

You'll need the following before you start. Phase 1 walks through setting up each:

Phase 1: Set up your accounts and tokens #

Step #1: Get your Apify API token

  • Sign up at https://apify.com/if you don’t have an account, then open Apify Console. - In the left sidebar, click Settings, then select** API & Integrations**. - Under Personal API tokens, copy your default token, or click** Add new token**to create one and name itslack-analyst

. - Paste it somewhere safe; you’ll need it when you connect the Apify MCP server in Phase 4.

This token lets the agent run Actors through your Apify account. Apify bills all usage to that account, so your teammates can start using the agent immediately without creating their own Apify accounts.

Contact sales

Step #2: Create your OpenAI API key

  • Go to https://platform.openai.com/and sign in or create an account. - Open API keys from the left sidebar. - Click Create new secret key, name itslack-analyst

, leavePermissions set toAll, and click** Create secret key**. - Copy the key and paste it somewhere safe.

  • Open Billing underSettings, add a payment method, and buy a small amount of credit. $5 is enough for testing.

This key lets the model analyze each question, select the appropriate Actor, and generate the final response. OpenAI bills API usage separately from ChatGPT subscriptions, so you’ll need to enable API billing on your developer account even if you already subscribe to ChatGPT Plus.

Step #3: Create the Slack app

The bot your team mentions is a custom Slack app installed directly in your workspace. Slack recently updated this process to use templates, so the setup route will look different now if you have built apps in the past:

  • Go to https://api.slack.com/apps/and clickCreate New App. - In the Create new app dialog, chooseStarter app underStart with a template, then click** Continue**. - Name the app something your team will naturally type, such as Research Analyst

, and select your workspace. - On the review screen, click Create and Install. - The success screen displays the Slack command-line interface (CLI) and steps to run the app locally. Skip these steps and click Go to App Settings. - In the left sidebar, open OAuth & Permissions and scroll toBot Token Scopes. Confirm that these three scopes are present, and click** Add an OAuth Scope**to add any that are missing:app_mentions:read

,chat:write

, andchannels:history

. - If you added scopes, Slack shows a banner asking you to reinstall the app; click it and approve.

  • Scroll up and copy the Bot User OAuth Token. It starts withxoxb-

. Paste it somewhere safe.

These scopes let the bot receive mentions, post replies, and read messages in public channels it has joined. The Simple Memory node configured later preserves conversational context. The starter template includes basic event handling, but in Phase 4, you’ll point the app’s event subscriptions to your n8n webhook instead.

Phase 2: Set up your n8n Cloud workspace #

This project requires a public web address (URL) for your n8n instance so Slack can deliver mention events through a webhook. n8n Cloud provides a secure public URL by default, so we’ll use it.

Step #1: Create your workspace

  • Go to https://n8n.io/and clickGet started for free. - Fill in your name, email, and a password to create the admin account. No credit card is needed for the trial.
  • Choose an account name.
  • Answer the short onboarding questions, verify your email if prompted, and n8n will open a new workspace editor for you.

Phase 3: Configure the Apify MCP server #

The Apify MCP server lets you preload specific Actors as always-available tools. You can also enable Actor discovery so the agent can find and run additional Actors when needed.

  • Go to https://mcp.apify.com/and sign in with your Apify account. - Under Preloaded Actors, click** Add Actors**and select two useful defaults:RAG Web Browserfor searching the web and reading pages, andGoogle Search Results Scraperfor questions about search rankings. - Turn on Actor discovery and management. This lets the agent search Apify Store at runtime when neither preloaded tool fits. - Scroll up and copy the Apify MCP server URL.

Preloaded Actors provide a guided pathway for the agent. When handling tasks, the agent can autonomously discover and run any tool. This discovery process enables it to prioritize reliable, cost-effective tools, steering it away from the unpredictable nature of a store search while retaining access to a wide range of options.

Phase 4: Build the workflow #

Step #1: Configure the Slack Trigger node

  • In the n8n editor, click Add workflow in the top-left corner, then name the workflow. - On the empty canvas, click Add first step, search forslack trigger

, and selectSlack. - Expand Triggers, then select** Bot / App Mention**. - Open Credential, then select** Create New Credential**. - Paste the bot token into Access Token and the app’s signing secret intoSignature Secret. You can find the signing secret under** App Credentialson the Slack app’s Basic Informationpage. - Turn on Watch Whole Workspace. - Save the workflow with Cmd/Ctrl + S, then click Publishin the top-right corner. - Expand Webhook URLs at the top of the node, open theProduction** tab, and copy the URL. It contains your workspace’s publicapp.n8n.cloud

address.

The signing secret secures the public webhook by verifying that incoming events are authentic. Watch Whole Workspace lets the bot respond in any channel it has joined, but only when someone mentions it. Publish the workflow now so Slack can validate the production URL, and publish again after future edits to update the live version.

Step #2: Register the webhook with Slack

Open your Slack app’s settings at https://api.slack.com/apps/ and stay there for this step.

  • In the left sidebar, open Socket Mode and make sure it’s turned off. - Open Event Subscriptions in the left sidebar and turn onEnable Events. - Paste the production webhook URL into Request URL. - Under Subscribe to bot events, click** Add Bot User Event**, then addapp_mention

. - Click Save Changes and approve the reinstall if Slack prompts you to.

If Slack can’t verify the Request URL, confirm that Socket Mode is off and the workflow is published. The icon next to Publish should be green, not yellow.

Step #3: AI Agent node

  • On the Slack Trigger node, click the + on its output dot.
  • Search ai agent

and select the AI Agent operation. Rename it toResearch analyst

. - Set the Source for Prompt dropdown to "Define below".

  • Switch the Prompt field to Expression mode and paste {{ $json.text.replace(/<@[^>]+>\s*/g, '').trim() }}

. - Scroll down to Options and click Add Option, then choose System Message. - Paste the prompt below into the text box that appears.

You are a research analyst working inside a company Slack workspace. Teammates mention you with research questions, and you answer them using live web data gathered through your Apify tools.

Tool strategy: for general questions, search the web and read the most relevant pages with the RAG Web Browser. For questions about what ranks in search, use the Google Search Results Scraper. If the question targets a specific platform your preloaded tools don't cover, such as Reddit, a review site, a job board, or an e-commerce store, search the Apify Store for a suitable Actor, check its input schema, and run it with conservative limits. Keep result limits small: 10 to 20 items is enough to answer most questions.

If a message contains a URL, fetch and read that URL rather than searching for it.

Answer rules: synthesize, don't dump. Lead with the direct answer, then the key supporting facts, then the source links. Always include the URLs you drew from. If you could not find reliable data, say so plainly rather than guessing. If a question is too ambiguous to research, ask one short clarifying question instead of running tools.

Formatting: you are writing for Slack, which does not render standard Markdown. Use Slack formatting only: *single asterisks* for bold, hyphens for bullet lists, and raw URLs or <url|label> for links. Never use headings, tables, or double-asterisk bold. Keep answers under 300 words unless the question genuinely needs more.

Team context: you work for [your company], which sells [your product] at [your pricing]. Use this whenever a question references "us", "ours", or "our product". If a question needs a company fact this context doesn't contain, say so plainly instead of guessing.

The prompt expression cleans up incoming text before it reaches the AI agent. Slack adds internal formatting whenever someone mentions the bot, so this step removes that noise and ensures the agent reads only the actual question.

The system message serves as the bot’s core instruction set. It includes rules that help avoid unnecessary web searches, control costs, and format responses correctly for Slack.

The team context block gives the bot essential information about your company, including who you are and what you sell. This helps it compare competitors against your product more naturally, while a strict rule prevents it from inventing details you haven’t provided.

Step #4: Attach the chat model

  • Click the + under the AI Agent's Chat Model connector and add OpenAI Chat Model.
  • Click the Credential to open the dropdown, then choose Create New Credential, paste your OpenAI key, and click** Save**. - Click the Model field, leave it on "From list", and select a current tool-calling model. GPT-5.6 Terra is a strong choice for this task.

Choosing the right AI model matters because your agent makes decisions in real time. It needs to determine which tools to use, when to call them, and when it has enough information to stop searching. Cheaper models may handle basic writing well, but they can struggle with more complex tool choices, which can waste credits and produce inconsistent results.

Start with a capable model so you can validate the workflow with fewer issues. Once everything works reliably, you can test cheaper models to reduce costs. You can also swap in a different model later if you prefer its reasoning or writing style.

Step #5: Give the agent memory to store context

  • Click the + under the AI Agent's Memory connector and add Simple Memory.
  • Set Session ID to "Define below".
  • Switch the Key field that appears to Expression mode and paste {{ $('Slack Trigger').item.json.thread_ts || $('Slack Trigger').item.json.ts }}

.

This expression uses Slack timestamps to keep each thread as a separate conversation. When a teammate asks a follow-up question in the same thread, the bot can recall the context from the earlier messages. Without this setup, the bot could mix conversations from across the workspace into one shared memory, making follow-up responses confusing and unreliable.

Step #6: Connect the Apify MCP server as the agent's tool

  • Click the + under the AI Agent's Tool connector, search mcp

, and select the MCP Client Tool. - Paste the MCP server URL you copied in Phase 3 into the endpoint field.

  • Set Authentication to "Bearer", click the Credential dropdown, choose Create New Credential, paste your Apify API token, and click** Save**. - Leave Tools to Include on "All".

Step #7: Reply in the Slack thread

  • On the Research analyst node, click the + on its output dot.
  • Search slack

and select the Send a message operation. Rename it toReply in thread

. - Select the Slack credential you created in Step #1.

  • Set Resource to "Message" and Operation to "Send".

  • Set Send Message To to "Channel". In the Channel field, set the selector on its left to "By ID", then switch the field to Expression mode and paste{{ $('Slack Trigger').item.json.channel }}

  • In the Message Type dropdown, set it to "Simple Text Message". - Switch the Message Text field to Expression mode and paste{{ $json.output }}

. - Scroll to Options, click Add Option, and choose Reply to a Message. - Switch its Message Timestamp to Reply To field to Expression mode and paste{{ $('Slack Trigger').item.json.thread_ts || $('Slack Trigger').item.json.ts }}

.

Replying in a thread instead of flooding the channel keeps each question paired with its answer and creates a clear conversation boundary. Teammates can ask, review, and follow up in one collapsible thread that stays easy to revisit later.

Phase 5: Test the complete workflow #

Step #1: Ask a real question

  • In Slack, create a test channel.
  • Click the + next to Channels in the left sidebar, choose Create channel, and name it something like research-analyst-test

. - Open the channel and click the message box at the bottom.

  • Type /invite @Research Analyst

and press Enter. Slack will confirm when the bot has joined. - Send a real prompt: @Research Analyst we have a call with a prospect on Hotjar tomorrow. Pull their current pricing tiers and the most common complaints in recent reviews.

  • Back in n8n, open the workflow's Executions tab and click into the running execution.
  • If the execution count rises but nothing ever reaches Slack, look at the Publish button before debugging anything else: a red dot on it means the live version is older than your canvas, so production ran your old snapshot. Publish and send the mention again.

Step #2: Test the memory with a follow-up

  • In the same thread, reply, mentioning the bot again: @Research Analyst now do the same for their enterprise tier, and how does it compare to ours?

  • The agent should resolve "their" from the thread, "ours" from the team context in the system message, re-research only what's new, and run the comparison.

Always tag the bot by name when asking follow-up questions. Keep permanent company information within the agent's system prompt, but include temporary details, such as current discounts, directly in your chat messages. If the bot becomes confused about the context, a quick adjustment to your thread memory will restore workflow operations.

Step #3: Test discovery with a question your preloaded tools can't answer

  • In a new message, ask: @Research Analyst is anyone on Reddit talking about [your product] this week? Just the gist.

Watch the execution log. Neither preloaded Actor covers Reddit, so you should see the agent search the Apify Store, inspect a Reddit scraper's details, and call it.

Conclusion #

You’ve built a solution to a bottleneck that often slows teams down. Instead of interrupting coworkers with routine research requests, teammates can get the data they need directly in Slack.

Sales representatives and product managers can pull live data on demand, while technical teams stay focused on deep work.

All this is possible by connecting Actors in Apify Store to a simple workflow via MCP.

FAQs #

Do my teammates need Apify or OpenAI accounts?

No. The workflow uses the API credentials you configured, so teammates don’t need separate Apify or OpenAI accounts. They only need access to a Slack channel that includes the bot.

How does the agent decide which Actor to run?

The system message tells the agent to use preloaded Actors first, then search the Apify Store when a question targets a platform that those Actors don't cover. The Apify MCP server exposes tools to inspect an Actor's schema before it runs one.

Can it answer questions about our internal data?

Not with the tools configured in this tutorial. The Apify MCP server connects the agent to Actors for public web search. To query private systems, you'd have to connect an authorized tool, such as a database query tool.

── more in #ai-agents 4 stories · sorted by recency
── more on @apify 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/turn-slack-into-your…] indexed:0 read:15min 2026-08-25 ·