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:read and chat: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_mention events.
- 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.