π Run a Slack research agent with OpenAI and Apify MCP tools
β‘ 6 views Β· π Internal Wiki & Knowledge Base
Description
Quick overview
This workflow listens for Slack @mentions, uses an OpenAI chat model plus Apify web research tools to answer the question with cited sources, and replies in the same Slack thread while keeping short-term context for follow-up questions.
How it works
- Triggers when the Slack app is mentioned in a channel the bot has joined.
- Cleans the mention text to extract the userβs research question.
- Uses an OpenAI-powered agent with per-thread memory to plan the research and generate an answer.
- Calls Apify MCP tools (including the RAG Web Browser and Google Search scraper, and other Apify Actors as needed) to gather live web data and source URLs.
- Posts the synthesized response back to Slack in the original thread.
Setup
- Create and install a Slack app with
app_mentions:readandchat:write, then connect its Bot Token to both Slack nodes. - Add an OpenAI API key and select the model you want to use in the OpenAI chat model node.
- Add an Apify API token as an HTTP Bearer credential and assign it to the Apify MCP tools node endpoint.
- Copy the webhook URL from the Slack Trigger node and register it in your Slack appβs Event Subscriptions for
app_mentionevents. - Update the agentβs system prompt with your team/company context so it can answer questions that reference internal product details.
Requirements
- Slack, Apify and OpenAI account
Customization
- Swap the preloaded Actors in the MCP endpoint URL to match your domain, such as Reddit, review sites, or e-commerce scrapers. Tighten the system prompt with product facts, tone rules, or a per-channel gating check.
π Nodes Used
Slack, AI Agent, OpenAI Chat Model, Simple Memory, Slack Trigger, MCP Client Tool
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File