{"slug": "turn-slack-into-your-team-s-ai-research-analyst-with-apify-mcp", "title": "Turn Slack into your team's AI research analyst with Apify MCP", "summary": "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.", "body_md": "If you use X, you’ve probably seen people tag `@grok`\n\nto verify a claim or summarize a thread without leaving the conversation.\n\nTeam 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.\n\nHere, you’ll learn to build an AI research agent directly in Slack. It [connects to Apify through MCP](https://mcp.apify.com), selects the right scraping tools, gathers live web data, and returns a clear answer in the original thread with context for follow-up questions.\n\n## What makes the Apify MCP server useful for research agents?\n\nYou 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.\n\nAn 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.\n\nInstead 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.\n\nIf you’re new to MCP, Apify’s [Model Context Protocol explainer](https://blog.apify.com/what-is-model-context-protocol/) covers the standard. A hands-on guide to [using MCP with Apify Actors](https://blog.apify.com/how-to-use-mcp/) walks through the client-server setup with practical examples.\n\nYou can also [watch this video walkthrough to connect Apify Actors to an AI agent through MCP](https://www.youtube.com/watch?v=BKu8H91uCTg) and see the workflow in action.\n\n## Summary of what you’ll build\n\nYou'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.\n\nThe 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.\n\nEnd-to-end, the flow looks like this: a teammate asks, `@Research Analyst, what does Competitor X charge for its Pro plan?`\n\nn8n 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.\n\n## Prerequisites\n\nYou'll need the following before you start. Phase 1 walks through setting up each:\n\n- An\n[Apify account](https://console.apify.com/sign-up)(the free monthly credits cover everything in this tutorial). - An\n[OpenAI platform account](https://platform.openai.com/). - A Slack workspace where you have permission to\n[install apps](https://api.slack.com/apps/). - An\n[n8n Cloud account](https://app.n8n.cloud/register).\n\n## Phase 1: Set up your accounts and tokens\n\n### Step #1: Get your Apify API token\n\n- Sign up at\n[https://apify.com/](https://apify.com/)if you don’t have an account, then open Apify Console. - In the left sidebar, click\n**Settings**, then select** API & Integrations**. - Under\n**Personal API tokens**, copy your default token, or click** Add new token**to create one and name it`slack-analyst`\n\n. - Paste it somewhere safe; you’ll need it when you connect the Apify MCP server in Phase 4.\n\nThis 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.\n\n[Contact sales](https://apify.com/contact-sales)\n\n### Step #2: Create your OpenAI API key\n\n- Go to\n[https://platform.openai.com/](https://platform.openai.com/)and sign in or create an account. - Open\n**API keys** from the left sidebar. - Click\n**Create new secret key**, name it`slack-analyst`\n\n, leave**Permissions** set to**All**, and click** Create secret key**. - Copy the key and paste it somewhere safe.\n- Open\n**Billing** under**Settings**, add a payment method, and buy a small amount of credit. $5 is enough for testing.\n\nThis 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.\n\n### Step #3: Create the Slack app\n\nThe 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:\n\n- Go to\n[https://api.slack.com/apps/](https://api.slack.com/apps/)and click**Create New App**. - In the\n**Create new app** dialog, choose**Starter app** under**Start with a template**, then click** Continue**. - Name the app something your team will naturally type, such as\n`Research Analyst`\n\n, and select your workspace. - On the review screen, click\n**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\n**Go to App Settings**. - In the left sidebar, open\n**OAuth & Permissions** and scroll to**Bot Token Scopes**. Confirm that these three scopes are present, and click** Add an OAuth Scope**to add any that are missing:`app_mentions:read`\n\n,`chat:write`\n\n, and`channels:history`\n\n. - If you added scopes, Slack shows a banner asking you to reinstall the app; click it and approve.\n- Scroll up and copy the\n**Bot User OAuth Token**. It starts with`xoxb-`\n\n. Paste it somewhere safe.\n\nThese 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.\n\n## Phase 2: Set up your n8n Cloud workspace\n\nThis 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.\n\n### Step #1: Create your workspace\n\n- Go to\n[https://n8n.io/](https://n8n.io/)and click**Get started for free**. - Fill in your name, email, and a password to create the admin account. No credit card is needed for the trial.\n- Choose an account name.\n- Answer the short onboarding questions, verify your email if prompted, and n8n will open a new workspace editor for you.\n\n## Phase 3: Configure the Apify MCP server\n\nThe 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.\n\n- Go to\n[https://mcp.apify.com/](https://mcp.apify.com/)and sign in with your Apify account. - Under\n**Preloaded Actors**, click** Add Actors**and select two useful defaults:[RAG Web Browser](https://apify.com/apify/rag-web-browser)for searching the web and reading pages, and[Google Search Results Scraper](https://apify.com/apify/google-search-scraper)for questions about search rankings. - Turn on\n**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.\n\nPreloaded 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.\n\n## Phase 4: Build the workflow\n\n### Step #1: Configure the Slack Trigger node\n\n- In the n8n editor, click\n**Add workflow** in the top-left corner, then name the workflow. - On the empty canvas, click\n**Add first step**, search for`slack trigger`\n\n, and select**Slack**. - Expand\n**Triggers**, then select** Bot / App Mention**. - Open\n**Credential**, then select** Create New Credential**. - Paste the bot token into\n**Access Token** and the app’s signing secret into**Signature Secret**. You can find the signing secret under** App Credentials**on the Slack app’s** Basic Information**page. - Turn on\n**Watch Whole Workspace**. - Save the workflow with\n**Cmd/Ctrl + S**, then click** Publish**in the top-right corner. - Expand\n**Webhook URLs** at the top of the node, open the**Production** tab, and copy the URL. It contains your workspace’s public`app.n8n.cloud`\n\naddress.\n\nThe 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.\n\n### Step #2: Register the webhook with Slack\n\nOpen your Slack app’s settings at [https://api.slack.com/apps/](https://api.slack.com/apps/) and stay there for this step.\n\n- In the left sidebar, open\n**Socket Mode** and make sure it’s turned off. - Open\n**Event Subscriptions** in the left sidebar and turn on**Enable Events**. - Paste the production webhook URL into\n**Request URL**. - Under\n**Subscribe to bot events**, click** Add Bot User Event**, then add`app_mention`\n\n. - Click\n**Save Changes** and approve the reinstall if Slack prompts you to.\n\nIf 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.\n\n### Step #3: AI Agent node\n\n- On the Slack Trigger node, click the + on its output dot.\n- Search\n`ai agent`\n\nand select the AI Agent operation. Rename it to`Research analyst`\n\n. - Set the Source for Prompt dropdown to \"Define below\".\n- Switch the Prompt field to Expression mode and paste\n`{{ $json.text.replace(/<@[^>]+>\\s*/g, '').trim() }}`\n\n. - Scroll down to Options and click\n**Add Option**, then choose System Message. - Paste the prompt below into the text box that appears.\n\n```\nYou 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.\n\nTool 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.\n\nIf a message contains a URL, fetch and read that URL rather than searching for it.\n\nAnswer 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.\n\nFormatting: 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.\n\nTeam 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.\n```\n\nThe 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.\n\nThe 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.\n\nThe 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.\n\n### Step #4: Attach the chat model\n\n- Click the + under the AI Agent's Chat Model connector and add OpenAI Chat Model.\n- Click the Credential to open the dropdown, then choose\n**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.\n\nChoosing 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.\n\nStart 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.\n\n### Step #5: Give the agent memory to store context\n\n- Click the + under the AI Agent's Memory connector and add Simple Memory.\n- Set Session ID to \"Define below\".\n- Switch the Key field that appears to Expression mode and paste\n`{{ $('Slack Trigger').item.json.thread_ts || $('Slack Trigger').item.json.ts }}`\n\n.\n\nThis 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.\n\n### Step #6: Connect the Apify MCP server as the agent's tool\n\n- Click the + under the AI Agent's Tool connector, search\n`mcp`\n\n, and select the MCP Client Tool. - Paste the MCP server URL you copied in Phase 3 into the endpoint field.\n- Set Authentication to \"Bearer\", click the Credential dropdown, choose\n**Create New Credential**, paste your Apify API token, and click** Save**. - Leave Tools to Include on \"All\".\n\n### Step #7: Reply in the Slack thread\n\n- On the Research analyst node, click the + on its output dot.\n- Search\n`slack`\n\nand select the Send a message operation. Rename it to`Reply in thread`\n\n. - Select the Slack credential you created in Step #1.\n- Set Resource to \"Message\" and Operation to \"Send\".\n- Set\n**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 }}`\n\n- In the\n**Message Type dropdown,** set it to \"Simple Text Message\". - Switch the\n**Message Text** field to Expression mode and paste`{{ $json.output }}`\n\n. - Scroll to Options, click\n**Add Option**, and choose Reply to a Message. - Switch its Message Timestamp to\n**Reply To field** to Expression mode and paste`{{ $('Slack Trigger').item.json.thread_ts || $('Slack Trigger').item.json.ts }}`\n\n.\n\nReplying 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.\n\n## Phase 5: Test the complete workflow\n\n### Step #1: Ask a real question\n\n- In Slack, create a test channel.\n- Click the + next to Channels in the left sidebar, choose Create channel, and name it something like\n`research-analyst-test`\n\n. - Open the channel and click the message box at the bottom.\n- Type\n`/invite @Research Analyst`\n\nand press Enter. Slack will confirm when the bot has joined. - Send a real prompt:\n`@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.`\n\n- Back in n8n, open the workflow's Executions tab and click into the running execution.\n- 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.\n\n### Step #2: Test the memory with a follow-up\n\n- In the same thread, reply, mentioning the bot again:\n`@Research Analyst now do the same for their enterprise tier, and how does it compare to ours?`\n\n- 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.\n\nAlways 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.\n\n### Step #3: Test discovery with a question your preloaded tools can't answer\n\n- In a new message, ask:\n`@Research Analyst is anyone on Reddit talking about [your product] this week? Just the gist.`\n\nWatch 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.\n\n## Conclusion\n\nYou’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.\n\nSales representatives and product managers can pull live data on demand, while technical teams stay focused on deep work.\n\nAll this is possible by connecting Actors in [Apify Store](https://apify.com/store) to a simple workflow via MCP.\n\n## FAQs\n\n### Do my teammates need Apify or OpenAI accounts?\n\nNo. 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.\n\n### How does the agent decide which Actor to run?\n\nThe 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.\n\n### Can it answer questions about our internal data?\n\nNot with the tools configured in this tutorial. The [Apify MCP server](https://mcp.apify.com/) 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.", "url": "https://wpnews.pro/news/turn-slack-into-your-team-s-ai-research-analyst-with-apify-mcp", "canonical_source": "https://blog.apify.com/build-an-ai-research-assistant-in-slack/", "published_at": "2026-08-25 07:31:32+00:00", "updated_at": "2026-08-25 07:44:07.983149+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["Apify", "Slack", "n8n", "OpenAI", "MCP"], "alternates": {"html": "https://wpnews.pro/news/turn-slack-into-your-team-s-ai-research-analyst-with-apify-mcp", "markdown": "https://wpnews.pro/news/turn-slack-into-your-team-s-ai-research-analyst-with-apify-mcp.md", "text": "https://wpnews.pro/news/turn-slack-into-your-team-s-ai-research-analyst-with-apify-mcp.txt", "jsonld": "https://wpnews.pro/news/turn-slack-into-your-team-s-ai-research-analyst-with-apify-mcp.jsonld"}}