A large portion of daily work still originates from email. Requests, approvals, document submissions, and follow-ups often arrive as unstructured messages rather than structured tasks. While task management tools are widely available, most action items are still created manually by copying information from emails into those systems.
This manual step introduces friction. It interrupts focus, consumes time, and increases the risk of missed deadlines. Important instructions may be buried in long threads or expressed in vague language, such as “end of the week” or “by Friday.”
This project explores a practical solution: an agentic AI workflow that reads incoming emails, understands whether action is required, and automatically creates structured tasks inside a Notion database. The system is orchestrated using n8n and relies on AI agents for decision-making and task extraction.

In many professional environments, email remains the primary source of incoming work, while task tracking happens in separate tools. This disconnect creates operational challenges. Action items often remain buried in inboxes, and users must manually interpret emails, create tasks, assign deadlines, and set priorities.
This process is repetitive and error-prone. Under heavy email load, important tasks can be forgotten or delayed. Traditional automation tools attempt to solve this with rule-based logic, but rules struggle with unstructured language and context-dependent intent. Emails rarely follow consistent patterns, and deadlines are often expressed in relative terms.
This makes the problem better suited to an AI-driven, agentic approach that can reason about intent rather than rely on fixed keywords.
The objective of this project was to design a deterministic and explainable agentic workflow capable of monitoring incoming emails, deciding whether an email requires action, extracting structured task information, and automatically storing tasks in a database. The system also includes safeguards such as duplicate detection and safe handling of ambiguous deadlines.
Instead of building a chatbot, the focus was on creating an autonomous system that can make decisions and take actions within a controlled workflow.
This solution goes beyond simple automation because it incorporates multiple decision-making components, conditional routing, and tool interactions.
An email triage agent first analyzes incoming messages and decides whether they contain an actionable task. If the email is informational, the workflow ends immediately. If action is required, a second agent extracts structured task details such as the title, description, deadline, and priority.
The workflow then uses conditional logic to determine whether to create the task, skip it, or route it differently based on the presence of a deadline or detection of duplicates. This combination of reasoning, decision-making, and tool usage qualifies the system as an agentic AI workflow rather than a simple script.
The system is composed of four layers:
A Gmail trigger in n8n activates whenever a new email arrives. The email content is retrieved and normalized into structured text.
Two specialized agents are used:
This layer manages:
It ensures predictable and explainable behavior.
Tasks are created in a Notion database using the Notion API.

The system uses a modular and lightweight stack:
This stack enables flexibility, scalability, and future extensibility.
The workflow begins when a new email arrives in the inbox. The Gmail trigger activates the automation and retrieves the full message. The system then extracts the plain-text body and normalizes important fields such as subject and sender.
This cleaned data is sent to the email triage agent. The agent determines whether the message requires action. If the email is informational, the workflow ends at this stage.
If action is required, the task extraction agent processes the email and produces a structured JSON output containing the task title, description, deadline, and priority. The workflow then parses this output and applies deadline-handling logic.
Before creating the task, the system generates a unique source key based on the task title and deadline. It checks the Notion database to determine whether the task already exists. If a duplicate is found, the workflow stops. Otherwise, a new task is created automatically.
Consider the following email:
“Please submit the documents by tomorrow.”
The system processes the message and produces:
The task is then created automatically in the Notion database without manual input.
During development, several edge cases required additional safeguards.
One issue involved ambiguous phrases such as “at the earliest.” Early versions attempted to convert these into specific dates, resulting in incorrect outputs. This was resolved by setting the deadline to null and increasing the priority instead.
Another challenge involved duplicate task creation when similar emails were processed. The system now generates a unique source key and checks the Notion database before creating any new task.
These guardrails help ensure predictable and explainable behavior.
This type of automation is particularly useful for professionals who receive a high volume of task-related emails. By automatically converting emails into structured tasks, the system reduces manual data entry, prevents missed deadlines, and improves workflow consistency.
Freelancers, consultants, project managers, and knowledge workers can benefit from such a system, as it reduces the cognitive load associated with managing action items across multiple email threads.
The current implementation can be extended in several ways. Future versions may include:
These improvements would move the system closer to a fully autonomous productivity assistant.
This project demonstrates how agentic AI workflows can bridge the gap between communication and task management systems. By combining email ingestion, AI reasoning, and structured task creation, the system reduces manual effort and helps prevent missed action items.
Rather than relying on rigid rules, the workflow uses AI to interpret intent while still maintaining deterministic logic and guardrails. This balance between reasoning and control makes the system both practical and explainable.
As agentic automation continues to evolve, systems like this can become a core component of modern productivity environments, reducing inbox overload and ensuring that important work is never lost inside email threads.
