Gilfoyle-persona Slack chatbot with AI agent tools
Loading workflow…
Workflow Description
This workflow receives Slack messages via a POST Webhook, filters out bot messages with an IF node, and passes the message text to an AI Agent running GPT-4 that role-plays Gilfoyle from Silicon Valley with a blunt, sarcastic personality. The Agent has SerpAPI and Wikipedia tools for lookups when needed, keeps per-channel conversation history via a window buffer memory keyed by channel ID, and finally sends the Agent output back to the originating Slack user as a direct message via a Slack node.
How it works
- 1.A Webhook listens for POST requests on the slack-gilfoyle path from Slack events.
- 2.An IF node checks the bot_id field to discard bot messages and only process human messages.
- 3.The message text is passed to the Agent with a system message defining Gilfoyle's cynical, cutting persona.
- 4.The Agent uses GPT-4 as its language model with window buffer memory keyed by channel ID (context window of 30).
- 5.The Agent may invoke SerpAPI and Wikipedia tools to look up information when necessary.
- 6.The Agent output is sent as a Slack direct message to the user who posted the original message.
Use cases
- A team Slack assistant that answers questions with a distinctive sarcastic persona.
- Fetching information from Wikipedia and web search without leaving Slack.
- A reference example for building an AI-agent Slack bot with per-channel conversation memory.
Requirements
- A Slack app configured with Event Subscriptions that deliver message events to the n8n Webhook URL.
- Slack API credentials configured in n8n for the message-sending node.
- OpenAI API credentials for the Chat OpenAI node (gpt-4 model).
- SerpAPI credentials for the search tool; the Wikipedia tool requires no credentials.
Setup and testing in n8n
- Activate the workflow and set the Webhook URL in the Slack app's event subscription settings.
- Post a text message as a user in a subscribed channel and verify a Gilfoyle-style reply arrives as a direct message.
- Post a message from another bot and confirm it is ignored via the No Operation branch.
- Ask a question requiring lookup and verify the Agent invokes the SerpAPI or Wikipedia tool.
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (14)
Webhook
Webhook
Slack
Slack
Chat OpenAI
OpenAI
Window Buffer Memory
Memory Buffer Window
Wikipedia
Tool Wikipedia
No Operation, do nothing
No Op
Is user message
If
Sticky Note
Sticky Note
SerpAPI
Tool Serp Api
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Agent
Agent
Source and license
Sticky Note
Fresh workflows, straight to your inbox
Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.
- New workflows
- Clear overviews
- Setup guides