The Digital Transformation Playbook

Inbox To Insight

โ€ข Kieran Gilmurray

Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.

0:00 | 18:58

The inbox is where good work goes to die, so we set out to build an agent that rescues your time and turns email chaos into clear action. We walk through a minimum viable toolchain that small teams can master fast, then ship a working email triage agent that classifies intent, routes messages to the right systems, and lays the groundwork for smart replies.

TLDR / At a Glance:

  • mapping the platform shift to agentic AI
  • code-first vs low-code toolchain choices
  • LangChain for chains, LangGraph for graphs
  • vector databases as semantic memory
  • n8n workflow for Gmail, models, routing
  • Airtable for configuration and analytics
  • email triage perceive-think-act loop
  • production needs for execution, errors, monitoring, security
  • roadmap from single-task to multi-step workflows

We start by drawing a hard line between reactive chatbots and true agents that perceive, think, and act. From there, we weigh code-first control against low-code speed: Python with LangChain and LangGraph for custom, stateful orchestration, or n8n and Airtable for visual workflows and business-owned configuration. Youโ€™ll hear how chains handle linear tasks, how graphs enable branching and shared state, and why vector databases act as memory palaces that understand meaning rather than matching keywords.

The build centres on a simple loop. Perceive an incoming email, think by constraining the model to clean categories like sales, support, billing, or general, then act by triggering the right integration. We show how Airtable separates rules from workflow so a manager can reroute leads with a single field change, and how logging every message creates real-time analytics for accuracy, volumes, and trends. Finally, we map what it takes to go from prototype to production: secure API execution, robust error handling, monitoring dashboards, and compliance baked into the stack.

If you want practical AI that saves hours today and scales tomorrow, this walkthrough gives you the blueprint. 

Like some free book chapters?  Then go here How to build an agent - Kieran Gilmurray

Want to buy the complete book? Then go to Amazon or  Audible today.

Support the show


๐—–๐—ผ๐—ป๐˜๐—ฎ๐—ฐ๐˜ my team and I to get business results, not excuses.

โ˜Ž๏ธ https://calendly.com/kierangilmurray/results-not-excuses
โœ‰๏ธ kieran@gilmurray.co.uk
๐ŸŒ www.KieranGilmurray.com
๐Ÿ“˜ Kieran Gilmurray | LinkedIn
๐Ÿฆ‰ X / Twitter: https://twitter.com/KieranGilmurray
๐Ÿ“ฝ YouTube: https://www.youtube.com/@KieranGilmurray

๐Ÿ“• Want to learn more about agentic AI then read my new book on Agentic AI and the Future of Work https://tinyurl.com/MyBooksOnAmazonUK


SPEAKER_00:

Chapter 4. Your Minimum Viable Tool Chain and Hello World AI Agent. You've mapped the landscape and seen why Agentic AI is a platform shift on par with mobile. You can now tell the difference between a reactive chatbot and a truly agentic system that plans, tools, and acts. Next, we build your minimum viable toolchain. A focused stack that small teams can master quickly, without the need for enterprise budgets. Then we put it to work by shipping a lean Python agent that tackles a real cost center for most organizations. Intelligent email triage. The aim is not to make you a programmer, it is to give you the technical literacy to choose the right tools, lead the build, and scale agent initiatives with confidence. Our Hello World isn't a toy script that prints a line. It's a working email triage agent, one that reads incoming customer emails, infers intent, and either routes them to the right team or drafts a smart reply. In other words, a first agent that delivers real value on day one. Selecting the right toolchain for your business. You face a choice, code first or low code. Both can get your agent off the ground, but they set very different long-term trajectories. Code first is like laying down your own transport system. It is expensive at the start, but built exactly for your city and infinitely scalable. Low code is more like public transit. It is quick to board and easy to use, but you're always limited to the routes that someone else has chosen. The code first path, maximum control, maximum potential. The natural choice here is Python. Its syntax reads almost like plain English, which makes it the go-to language for AI. Simple to learn, powerful to scale. That's why it dominates agent development. Langchain, Lang Graph, Python frameworks to orchestrate agentic systems. Langchain is the toolkit for building AI workflows step by step. Think, pull in data, split it into chunks, summarize it, then use the summary to answer questions. It's modular. Loaders bring in content, splitters divide text. Chains manage flow, and memory maintains context for chat apps. You can even mix models inside the same workflow. Lang Graph takes this further. It's built for multi-agent, stateful systems where workflows aren't straight lines, but evolving conversations. Instead of a single chain, you get a graph. Nodes as actions, edges as transitions. That means loops, branching paths, and the ability to circle back when conditions change. The killer feature, shared state management. Every agent can access the same context and task list, making it perfect for dynamic systems like a task manager that adapts to new user requests on the fly. Langchain equals chains. Great for clean, linear tasks like data retrieval, processing, output. Langgraph equals graphs, built for complex, adaptive interactions where context shifts midstream. For our email triage agent, Langchain provides a head start with ready-made components for email handling, API connections, Google AI, OpenAI, Anthropic, and built-in orchestration features such as error recovery and human escalation. Vector databases, contextual memory for intelligent decisions. Vector databases serve as sophisticated memory palaces for AI systems, storing and organizing information to enable AI to gain an understanding of context, relationships, and meaning rather than just exact word matches. This is possible because vector embeddings represent information in a way that captures meaning and relationships, enabling searches based on similarity rather than exact wording. Vector databases are the memory palaces of AI. Instead of storing information like a filing cabinet, they organize knowledge so systems can recall meaning and relationships, not just keywords. Here's how. When text enters an AI model, it's converted into vector embeddings, lists of numbers that capture semantic essence. For example, budget might be 6.8, 1.9, 4.4, 2.2. Affordable might be 6.6, 2.0, 4.7, 1.99. Because these vectors sit close together in numerical space, the system knows they're related, even without exact word matches. That's why a query like Ways to Save Money on a Family Vacation can return a document titled Affordable Holiday Destinations for Parents with Kids. A traditional keyword search would miss it. In short, traditional DBs equals filing cabinets, retrieve only if the word matches. Vector DBs equals expert librarians, understand the meaning, and find contextually relevant answers. This capability turns AI from a keyword matcher into a reasoning partner. This kind of logic is only practical with LLMs. In traditional programming, we would have to manually list every possible keyword or variation that someone might use, which would quickly become unfeasible or even impossible, as languages are so rich and diverse. LLMs generate embeddings that capture meaning, allowing the system to generalize and find relevant content without an exhaustive list of keywords. Traditional databases, which depend on keyword-based searches, function like filing cabinets organized alphabetically. They retrieve documents if the search terms match the content. Vector databases are more like librarians who understand the meaning behind each document and can find relevant information based on context, even when the wording differs. Low-code alternatives N8N Visual Workflow Builder with AI integration. N8N is automation you can see. You build workflows on a canvas, dragging nodes like Lego bricks, one for Gmail, one for an AI model, one for Slack. Connect them with lines, and you've built a live system. For an email triage agent, the flow is simple. One, trigger, a Gmail node, OAuth secured, fires whenever a new email arrives. Two Brain. The content goes to an AI node, Gemini, open AI, or anthropic, with a prompt to detect intent. Three. Decision. A router node classifies the result sales inquiry, support request, etc. Four. Each branch triggers the right outcome. A sales inquiry, for example, creates a Salesforce lead and alerts the sales team in Slack. Results A no code orchestration layer that turns incoming emails into instant, intelligent action. With N8N, you can spin up this entire agent in an afternoon without writing a single line of code. Operations teams don't have to wait on developers. They can design, adjust, and own their own AI-driven workflows. The result? Incredible operational agility and responsiveness at startup speed. Airtable. The flexible backend. Airtable is often called a spreadsheet on steroids. For our agent, it's both the control center and the dashboard. 1. Configuration hub. Hard coding rules into workflows is brittle. By storing them in Airtable, business teams can make changes instantly without requiring developers.company.com. You hire Alex. A manager edits one field in Airtable to reroute leads to Alex at Company.com. From that moment, every lead lands in Alex's inbox without touching N8N or code. This cleanly separates logic, the workflow, from configuration, the rules. 2. Monitoring and analytics layer. Airtable also doubles as a visibility platform. Every processed email is locked, including the sender, subject, AI detected intent, and the action taken. With Airtable views, you can track volumes, sales versus support inquiries, spot customer trends, flag misclassifications for review. The result, not just automation, but real-time business intelligence. Often described as a spreadsheet on steroids, Airtable is a user-friendly relational database. For our agent, it plays two crucial roles. 1. The configuration hub. Where should the agent's rules live? In a code for setup, routing logic, e.g., if intent equals billing question, then forward to finance at, would be hard-coded. That's inflexible and brittle. By storing them in Airtable, business teams can make changes instantly without requiring developers. Our N8N workflow can query Airtable to decide the correct action based on the AI's classification. This means that business users can update a record in Airtable to change the workflow without needing to touch N8N or code. If your sales process changes, a manager can simply edit a field in Airtable to reroute leads. For example, suppose your sales inquiry emails currently go to sales at company.com, but you've just hired a new rep who should handle all inbound leads instead of editing the N8N workflow. A manager can simply edit a field in Airtable to reroute leads. For example, suppose your sales inquiry emails currently go to sales at company.com, but you've just hired a new rep who should handle all inbound leads. Instead of editing the N8N workflow, a manager can simply update the forward to field in Airtable from sales at company.com to alex at company.com. From that moment on, every new lead is automatically routed to Alex. No developer needed. This cleanly separates logic, the N8N workflow, from configuration, the rules. 2. The monitoring and analytics layer. Airtable also doubles as a visibility platform. Every process email is logged, including the sender, subject, AI detected intent, and the action taken. With Airtable views, you can track volumes, sales versus support inquiries, smot customer trends, flag misclassifications for a view. The result not just automation, but real-time business intelligence. A production system must not be a black box. By logging every processed email into Airtable, we can create a lightweight monitoring platform. Each record can capture the sender, subject, AI classified intent, and action taken. This gives instant visibility into how the agent works. Airtables views and dashboards track volumes, e.g., sales versus support inquiries, spot patterns in customer communication, and even review cases where the classification may need correction. And even review cases where the classification may need correction. This transforms the workflow from a simple automation into a source of actionable business intelligence. Comparative framework making this strategic choice Decision Factor Code First Python Langchain Initial Setup Time two to four weeks with technical team monthly operating costs seventy to two thousand dollars plus scales with volume customization ceiling unlimited Build anything Skills Required Python developers DevOps expertise scalability handles millions of emails efficiently Integration Flexibility Connect to any system via APIs Maintenance Overhead requires technical team for updates Vendor lock in risk Own your code and data Low code N8N Airtable Initial Setup Two to four days with business users Monthly operating costs thirty to two thousand dollars plus scales with usage customization ceiling limited by platform capabilities skills required business analysts process knowledge scalability platform limits may require upgrades integration flexibility limited to supported connectors maintenance overhead platform handles infrastructure vendor lock in risk dependent on platform continuity code first adoption is appropriate when developing AI first products requiring sophisticated reasoning, managing high transaction volumes with cost optimization goals, integrating proprietary models or custom AI logic, operating in regulated industries with defined compliance needs, supported by technically capable teams with DevOps maturity, seeking to differentiate competitively through AI capability, low code adoption is appropriate when requiring rapid deployment of business process automation, engaging non-technical teams or working with limited development resources, connecting standard SaaS platforms and enterprise applications, operating under constrained budgets or resources, prioritizing reliability and vendor support over customization, piloting AI concepts before committing significant investment, building the agent, the business problem, death by a thousand emails. Every company has them. Support at Sales at Info at They serve as the digital front doors for customers, partners, and prospects. For a small business, these inboxes are manageable. For a growing enterprise, they become productivity black holes. Consider this. The average professional spends 28% of the day in email for a non-sales or support role. That's a distraction. For support staff, much of that time is wasted on manual triage, reading, interpreting, and forwarding messages. A five-person team managing a shared inbox can burn through 2,000 plus hours a year and over$100,000 in pay just sorting mail. That's time that could be spent solving problems, closing deals, or serving customers. Our solution How the Agent Thinks About Email Intent. Our agent's code will mimic the decision-making process of professionals. Its logic follows the classic perceive, think, act loop. 1. Perceive. The agent ingests the raw text of a new email. Think. A classification function applies a structured prompt to the language model. The model is constrained to return one of four intents sales inquiry, technical support, billing question, or general inquiry. The system validates the result and defaults to general inquiry when responses fall outside these categories, providing consistency and control. 2. Act The route email function maps each intent to action. Sales go into the CRM. Billing goes to finance. Support routes to the right queue. This simple loop can turn a chaotic inbox into an intelligent, automated workflow. Caveats From Hello World to Production. What we've built is a proof of concept. It is powerful, but not yet enterprise grade. To reach production, your team would layer on several essentials. Execution capability. At present, the AI outputs intended actions. A production grade agent would integrate with business applications through secure APIs to execute tasks, such as creating Zendesk tickets, updating Salesforce records, or interfacing with financial systems. Error management. Robust error handling would be necessary to address external system downtime or API features, ensuring service continuity. Monitoring and reporting. Enterprise systems require transparency. Every action would be logged and surfaced in a performance dashboard, capturing metrics such as email volume, classification accuracy, and processing time. Security and compliance. Integration into the corporate IT environment would involve authenticated access to email, secure storage of API keys and credentials, and adherence to organizational data governance and security standards. These measures transform the prototype from a working demonstration into a production ready enterprise capability. The difference is not intelligence, it's integration, resilience, and trust. Conclusion: You've seen the journey from a costly inbox bottleneck to a working agent, powered by real code. Along the way, you've learned the essentials, i.e., why tool chain choices matter, how prompts shape outcomes, and how an agent can perceive, think, and act. But let's be clear, this agent solves one problem, and one problem only. It classifies and routes emails. Valuable, yes, but only the first rung of the latter. What happens when processes demand more? Imagine an agent that not only classifies but also searches your knowledge base, summarizes key points, and drafts a personalized reply, ready to be sent. That's where we go next, expanding from a single task agent to a multi step workflow using Langchain.