I built this system because I wanted to move past basic chatbots and create a truly integrated, "agentic" workflow that actually lightens my cognitive load. By leveraging n8n as a headless orchestrator, I’ve engineered a custom bridge between Slack and my Google Workspace that doesn't just respond to text, but actively manages my professional life—handling everything from complex calendar conflict resolution and Gmail triage to automated note-taking in Google Docs. Along the way, I tackled the "engineering debt" of building in a production environment, solving for recursive API loops with bot-filtering logic and curing "AI jet-lag" by synchronizing system timezones. The result is a private, loop-proof Executive Assistant that understands context, respects my specific constraints, and acts as a centralized brain for my daily operations.
Here is a technical summary of the architecture and the engineering lessons learned during the build.
The project is built on an Event-Driven Architecture using n8n as the orchestrator. It bridges the gap between unstructured human input (Slack) and structured API outputs (Google Workspace).
Production Webhooks: To move beyond local testing, we deployed via a Production URL (Cloudflare-tunnelled or static IP). This required a shift from synchronous "Test" executions to asynchronous "Production" executions.
The Slack "Loop" Logic: A critical technical hurdle was the Recursive Trigger. Since the bot listens to the whole channel, its own outgoing message triggers a new incoming webhook.
The Fix: We implemented a conditional logic gate that inspects the JSON payload for a bot_id. If the key exists, the execution terminates immediately (O(1) complexity), preventing a stack overflow of messages.
Instead of a linear script, we used an Agentic Model. The AI doesn't just "run"; it "reasons."
Functional Tooling: We mapped Google Calendar, Gmail, and Google Docs as Tools (essentially dynamic functions) that the LLM can call.
Prompt Engineering: We moved from "be a good assistant" to a System Role Definition that enforces constraints (EST timezone, JSON-to-Plain-English parsing, and conflict-checking logic).
Even with an LLM, date math is brittle. We discovered that "Today" is a moving target depending on the System Timezone (UTC) vs. the Workflow Timezone (EST).
Lesson: Never trust the LLM to do relative date math (e.g., "next Friday"). The solution was to force a Date & Time tool call to anchor the AI to the server's local time before it queries the Calendar API.
We explored moving beyond simple API calls into Vector Databases.
Lesson: To turn local notes into "Brain Power," you need to bridge the gap between a local filesystem and the AI's context window. This involves Chunking (breaking files into pieces), Embedding (turning text into vectors), and Upserting those into a Vector Store for semantic search.
Working with Google Cloud taught us about OAuth Scopes.
Lesson: Permissions are granular. Just because an app can read a Calendar doesn't mean it can write to a Doc. Adding functionality requires a "re-handshake" to update the https://www.googleapis.com/auth/ strings in the credential header.
Component
Technical Solution
Why it matters
Interface
Slack Events API
Provides real-time, bi-directional event stream.
Logic Gate
bot_id Filter
Prevents infinite loops and unnecessary API costs.
Context
System Prompting
Enforces strict tone and minimizes "AI Hallucinations."
State
Simple Memory Node
Allows the AI to remember the previous message in the thread.