Block 1 - Slack Trigger
- Type / Role
- n8n-nodes-base.slackTrigger - slackTrigger
- Config choices
- Version 1
This workflow integrates Google Analytics 4 (GA4) with Slack, enabling users to query their website data using natural language inside a dedicated Slack chan...
n8n-nodes-base.slacktrigger, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.googleanalyticstool, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.slack, n8n-nodes-base.stickynote
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Adil Khan.
Original n8n.io sourceThis workflow integrates Google Analytics 4 (GA4) with Slack, enabling users to query their website data using natural language inside a dedicated Slack channel. An AI Agent interprets user queries, fetches relevant reports from GA4, and responds in Slack as a reply.
How it works When a user sends a message in a specified Slack channel, the workflow is triggered. The message is filtered to remove @bot mentions, and then passed to an AI Agent. The AI Agent, powered by a Google Gemini Chat Model and utilizing conversational memory (to have back-and-forth with user on follow up questions, limit of 10), determines if the user's query requires data from Google Analytics 4. If so, it leverages a pre-configured GA4 tool to fetch the necessary report (e.g., page views, users, conversions for a specific date range). Finally, the AI Agent's response, containing the requested data, is sent back to the original Slack channel as a reply.
Setup Steps Slack Trigger: Configure the Slack API credential and specify the channel n8n should monitor for new messages.
Credentials: Create and configure the following credentials in n8n:
Slack API: For sending and receiving messages.
Google Analytics 4: For accessing GA4 reports. Requires a Google Cloud Project with the Analytics Data API enabled and a Service Account Key (JSON).
Google Gemini Chat Model: For the AI Agent's intelligence. Requires an API key from Google AI Studio.
AI Agent System Prompt: Craft a robust system prompt for the AI agent. This prompt should define the agent's role, constraints (e.g., "do not estimate or lie on data, if GA4 is unavailable, inform so"), and guidance on mapping natural language metrics/dimensions to GA4 equivalents (e.g., "when the user mentions 'leads', they mean 'conversions' in GA4").
Slack Reply: Ensure the final Slack "Send a message" node is configured to reply to the original channel, providing the data in a clear, concise format.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Query GA4 data with Google Gemini AI in a Slack channel |
|---|---|
| Complexity | intermediate |
| Nodes | 8 |
| Categories | Market Research, AI Chatbot |
| Author | Adil Khan |
| Published | 27 Jan 2026 |
Use the JSON export at /data/workflows/13038/13038.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
This workflow integrates Google Analytics 4 (GA4) with Slack, enabling users to query their website data using natural language inside a dedicated Slack chan...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Chatbot use case.