You're drowning in repetitive tasks. Emails need sending. Tasks need logging. Calendar events need creating. Each one takes 2-3 minutes, but they add up to hours every week. What if you could just tell an AI assistant "Send John the proposal" or "Add this to my task list" and it actually happened? That's exactly what this n8n workflow does. You'll learn how to build a ChatGPT-powered automation system that executes real actions across Gmail, Notion, and Google Calendar using natural language commands. The complete JSON template is included at the end.
The Problem: Context Switching Kills Productivity
Business owners and executives lose 3-5 hours weekly switching between apps to complete basic tasks. You're in a meeting, someone mentions action items, and you have to:
Current challenges:
- Open Gmail, compose email, format it, send it (3-4 minutes per email)
- Switch to Notion, navigate to the right database, fill in fields, set properties (2-3 minutes per task)
- Jump to Google Calendar, find the right time slot, add details, invite attendees (2-4 minutes per event)
- Remember which app does what and where everything lives
- Lose your train of thought during every context switch
Business impact:
- Time spent: 15-20 hours monthly on administrative overhead
- Cost: $2,000-5,000 in lost productivity (at $100-150/hour executive rate)
- Mental load: Constant interruptions prevent deep work and strategic thinking
The real cost isn't just time—it's the cognitive burden of managing multiple systems when you should be focused on high-value decisions.
The Solution Overview
This n8n workflow creates a natural language interface between ChatGPT and your productivity tools. You describe what you want in plain English through a custom GPT, and n8n translates that into actual API calls that send emails, create tasks, and schedule events. The system uses a webhook trigger to receive commands from ChatGPT, processes the intent and parameters, then routes to the appropriate service integration. It's a single automation that replaces dozens of manual workflows, turning "I need to..." thoughts into completed actions in under 5 seconds.
What You'll Build
This automation system handles three core productivity workflows through conversational commands. Here's the complete capability set:
| Component | Technology | Purpose |
|---|---|---|
| Command Interface | Custom GPT | Natural language input processing |
| Webhook Receiver | n8n Webhook Node | Accepts structured commands from ChatGPT |
| Email Automation | Gmail API | Sends formatted emails with subject, body, recipients |
| Task Management | Notion API | Creates database entries with properties and metadata |
| Calendar Integration | Google Calendar API | Schedules events with times, attendees, descriptions |
| Logic Router | n8n Switch Node | Directs commands to correct service based on action type |
| Error Handling | n8n Error Workflow | Catches failures and returns actionable feedback |
Key features:
- Send emails to single or multiple recipients with custom formatting
- Create Notion tasks with due dates, priorities, and custom properties
- Schedule Google Calendar events with automatic timezone handling
- Process multiple commands in a single conversation
- Return confirmation messages with links to created items
- Handle errors gracefully with specific troubleshooting guidance
Prerequisites
Before starting, ensure you have:
- n8n instance (cloud account at n8n.io or self-hosted version 1.0+)
- ChatGPT Plus subscription (required for custom GPT creation)
- Gmail account with API access enabled
- Notion workspace with API integration configured
- Google Calendar with API credentials
- Basic understanding of JSON structure (for customizing parameters)
- 30-45 minutes for initial setup and testing
Step 1: Configure the Webhook Trigger
Your workflow starts with a webhook that receives commands from ChatGPT. This is the entry point for all automation requests.
Set up the Webhook node:
- Add a Webhook node as your trigger
- Set HTTP Method to POST
- Set Path to
/assistant-command(or your preferred endpoint) - Authentication: None (ChatGPT will send a verification token in the payload)
- Response Mode: "When Last Node Finishes" (ensures ChatGPT gets confirmation)
Node configuration:
{
"httpMethod": "POST",
"path": "assistant-command",
"responseMode": "lastNode",
"options": {}
}
Why this works:
The webhook acts as a bridge between ChatGPT's function calling and your n8n workflow. When you tell your custom GPT "Send an email to Sarah," ChatGPT formats that as structured JSON and POSTs it to this webhook. The webhook captures the action type (send_email, create_task, create_event) and all parameters (recipient, subject, body, etc.) in a single payload. Setting response mode to "lastNode" ensures ChatGPT waits for your workflow to complete before responding to you, so you get real-time confirmation that your email was sent or task was created.
Step 2: Route Commands to the Right Service
After receiving the webhook payload, you need to determine which action to take and route to the appropriate integration.
Configure the Switch node:
- Add a Switch node after the webhook
- Set Mode to "Rules"
- Create three routing rules based on the
actionfield from the webhook payload
Routing logic:
{
"rules": {
"rules": [
{
"operation": "equal",
"value": "send_email",
"output": 0
},
{
"operation": "equal",
"value": "create_task",
"output": 1
},
{
"operation": "equal",
"value": "create_event",
"output": 2
}
]
}
}
Why this approach:
The Switch node evaluates {{ $json.action }} from the webhook payload and routes execution to one of three branches. This keeps your workflow clean and maintainable—each service integration is isolated in its own execution path. As you add more capabilities (like summarizing emails or updating contacts), you simply add new rules to the Switch node rather than rebuilding the entire workflow. The rule-based approach also makes debugging easier since you can test each branch independently.
Step 3: Implement Gmail Integration
The email branch sends formatted messages through your Gmail account using the Gmail API.
Configure Gmail node:
- Add a Gmail node connected to Switch output 0
- Set Operation to "Send Email"
- Map webhook fields to Gmail parameters:
- To:
{{ $json.to }} - Subject:
{{ $json.subject }} - Message:
{{ $json.body }}
- To:
- Enable HTML formatting if needed
- Add your Gmail credentials via OAuth2
Node configuration:
{
"operation": "send",
"sendTo": "={{ $json.to }}",
"subject": "={{ $json.subject }}",
"message": "={{ $json.body }}",
"options": {
"attachments": "={{ $json.attachments }}"
}
}
Why this works:
The Gmail node uses OAuth2 authentication to send emails on your behalf without storing your password. The ={{ }} syntax tells n8n to dynamically insert values from the webhook payload—when ChatGPT sends {"to": "john@example.com", "subject": "Q4 Proposal"}, n8n automatically populates those fields. This approach supports multiple recipients (comma-separated), CC/BCC fields, and even attachments if you extend the webhook schema. The HTML option lets you format emails with bold text, links, and lists by having ChatGPT include HTML markup in the body parameter.
Common issues:
- Gmail API not enabled → Go to Google Cloud Console, enable Gmail API, create OAuth2 credentials
- "Insufficient permissions" error → Ensure your OAuth scope includes
https://www.googleapis.com/auth/gmail.send - Emails going to spam → Add SPF/DKIM records to your domain (for custom domains) or send from your primary Gmail address
Step 4: Implement Notion Integration
The task branch creates database entries in your Notion workspace with full property support.
Configure Notion node:
- Add a Notion node connected to Switch output 1
- Set Resource to "Database Page"
- Set Operation to "Create"
- Select your target Notion database
- Map webhook fields to Notion properties:
- Title:
{{ $json.task_name }} - Due Date:
{{ $json.due_date }} - Priority:
{{ $json.priority }} - Status: "Not Started" (default)
- Title:
Node configuration:
{
"resource": "databasePage",
"operation": "create",
"databaseId": "your-database-id",
"properties": {
"Name": {
"title": [{"text": {"content": "={{ $json.task_name }}"}}]
},
"Due Date": {
"date": {"start": "={{ $json.due_date }}"}
},
"Priority": {
"select": {"name": "={{ $json.priority }}"}
}
}
}
Why this approach:
Notion's API requires specific JSON structure for each property type. The node handles this complexity automatically—you just map your webhook fields to Notion properties. The database ID connects to your specific task database (find it in the Notion URL: notion.so/workspace/DATABASE_ID). This structure supports all Notion property types: text, numbers, dates, selects, multi-selects, people, relations, and formulas. You can extend this to automatically assign tasks to team members, link to projects, or calculate deadlines based on priority.
Variables to customize:
databaseId: Your Notion database ID (32-character alphanumeric string)Status: Change default status to "To Do", "Backlog", or your custom statusproperties: Add custom properties like "Project", "Tags", "Estimated Time"
Step 5: Implement Google Calendar Integration
The calendar branch creates events with automatic timezone handling and attendee management.
Configure Google Calendar node:
- Add a Google Calendar node connected to Switch output 2
- Set Operation to "Create Event"
- Select your target calendar
- Map webhook fields:
- Summary:
{{ $json.event_title }} - Start Time:
{{ $json.start_time }} - End Time:
{{ $json.end_time }} - Description:
{{ $json.description }} - Attendees:
{{ $json.attendees }}
- Summary:
Node configuration:
{
"operation": "create",
"calendarId": "primary",
"start": {
"dateTime": "={{ $json.start_time }}",
"timeZone": "America/New_York"
},
"end": {
"dateTime": "={{ $json.end_time }}",
"timeZone": "America/New_York"
},
"summary": "={{ $json.event_title }}",
"description": "={{ $json.description }}",
"attendees": "={{ $json.attendees }}"
}
Why this works:
Google Calendar API requires ISO 8601 datetime format (2024-01-15T14:00:00-05:00). Your custom GPT should be configured to output dates in this format, or you can add a Function node before this step to convert natural language dates ("tomorrow at 2pm") into ISO format. The timeZone parameter ensures events appear at the correct time regardless of where you or your attendees are located. Attendees are automatically sent email invitations with calendar file attachments—they can accept or decline directly from their inbox.
Step 6: Build the Custom GPT Interface
Your ChatGPT custom GPT translates natural language into the structured JSON your webhook expects.
Create your custom GPT:
- Go to ChatGPT → Explore GPTs → Create
- Name it "Personal Assistant" or your preferred name
- Add this system prompt:
You are a personal assistant that helps execute tasks through automation. When the user asks you to send an email, create a task, or schedule an event, you call the appropriate function with the correct parameters.
For emails: Extract recipient(s), subject, and body from the user's request
For tasks: Extract task name, due date (ISO format), and priority (Low/Medium/High)
For events: Extract title, start time, end time, description, and attendees
Always confirm what you're about to do before executing.
Add three custom actions (functions) that POST to your n8n webhook:
send_email: Parameters: to, subject, bodycreate_task: Parameters: task_name, due_date, prioritycreate_event: Parameters: event_title, start_time, end_time, description, attendees
Set the webhook URL to your n8n webhook endpoint
Why this approach:
Custom GPTs with function calling give you a conversational interface that feels natural while maintaining the structure needed for API calls. When you say "Email the proposal to john@acme.com with subject 'Q1 Strategy'", the GPT extracts those parameters, formats them as JSON, and POSTs to your webhook. The confirmation step prevents accidental actions—ChatGPT will say "I'm about to send an email to john@acme.com with subject 'Q1 Strategy'. Should I proceed?" This gives you a chance to catch mistakes before they execute.
Workflow Architecture Overview
This workflow consists of 8 core nodes organized into 4 main sections:
- Command reception (Node 1): Webhook receives structured commands from ChatGPT custom GPT
- Routing logic (Node 2): Switch node directs to appropriate service based on action type
- Service integrations (Nodes 3-5): Gmail, Notion, and Google Calendar nodes execute actions
- Response handling (Nodes 6-8): Format confirmation messages and return to ChatGPT
Execution flow:
- Trigger: Custom GPT sends POST request when you issue a command
- Average run time: 2-4 seconds (depends on API response times)
- Key dependencies: Gmail API, Notion API, Google Calendar API must all be authenticated
Critical nodes:
- Webhook Trigger: Captures action type and all parameters from ChatGPT
- Switch Node: Routes execution to correct service integration branch
- Service Nodes: Execute actual API calls to Gmail, Notion, or Google Calendar
- Response Node: Returns confirmation with links to created items
The complete n8n workflow JSON template is available at the bottom of this article.
Critical Configuration Settings
Gmail Integration
Required fields:
- OAuth2 credentials: Create in Google Cloud Console under APIs & Services
- Scopes needed:
gmail.send,gmail.compose - Redirect URI: Your n8n instance URL +
/rest/oauth2-credential/callback
Common issues:
- "Invalid grant" error → Reauthorize OAuth connection in n8n credentials
- Rate limiting → Gmail allows 100 emails per day for free accounts, 2000/day for Workspace
Notion Integration
Required fields:
- Integration token: Create at notion.so/my-integrations
- Database ID: Found in database URL (32-character string after workspace name)
- Database must be shared with your integration
Common issues:
- "Object not found" → Share your database with the integration (Share menu → Add integration)
- Property type mismatch → Ensure webhook sends correct format (date as ISO string, select as exact name)
Google Calendar Integration
Required fields:
- OAuth2 credentials: Same Google Cloud project as Gmail
- Scopes needed:
calendar.events - Calendar ID: "primary" for main calendar, or specific calendar ID for shared calendars
Variables to customize:
timeZone: Change to your local timezone (e.g., "America/Los_Angeles", "Europe/London")calendarId: Use specific calendar ID to create events in shared team calendarssendUpdates: Set to "all" to notify attendees, "none" to create silently
Testing & Validation
Test each component independently:
Webhook test: Use Postman or curl to send test JSON directly to webhook URL
curl -X POST https://your-n8n.app/webhook/assistant-command \ -H "Content-Type: application/json" \ -d '{"action":"send_email","to":"test@example.com","subject":"Test","body":"Testing"}'Gmail test: Verify emails arrive in recipient inbox (check spam folder)
Notion test: Confirm task appears in database with all properties set correctly
Calendar test: Check event shows at correct time with proper timezone
Common troubleshooting:
- Webhook returns 404 → Verify webhook path matches custom GPT action URL exactly
- No response from n8n → Check workflow is activated (toggle in top-right corner)
- Wrong data in output → Add a "Set" node before service nodes to log webhook payload and debug
Running evaluations:
Test with edge cases: multiple recipients, special characters in subject lines, all-day events, tasks without due dates. Your workflow should handle missing optional parameters gracefully by using default values or skipping those fields.
Production Deployment Checklist
| Area | Requirement | Why It Matters |
|---|---|---|
| Error Handling | Add Error Trigger workflow that catches failures | Prevents silent failures—you'll know immediately if an email didn't send |
| Monitoring | Set up n8n workflow execution logging | Track usage patterns and identify which actions are most common |
| Rate Limiting | Implement request throttling for high-volume use | Prevents hitting API rate limits (Gmail: 100/day, Notion: 3 requests/sec) |
| Security | Add webhook authentication token validation | Prevents unauthorized access to your automation endpoint |
| Documentation | Add sticky notes to each node explaining its purpose | Reduces modification time from hours to minutes when you revisit later |
| Backup | Export workflow JSON weekly | Protects against accidental deletions or breaking changes |
Real-World Use Cases
Use Case 1: Executive Assistant Replacement
- Industry: Professional services, consulting
- Scale: 50-100 commands per week
- Modifications needed: Add expense tracking (create Notion entries for receipts), meeting prep (pull calendar for next 3 days and summarize)
Use Case 2: Sales Follow-Up Automation
- Industry: B2B sales, account management
- Scale: 20-30 emails daily
- Modifications needed: Add CRM integration (Salesforce/HubSpot), template library for common email types, automatic follow-up scheduling
Use Case 3: Project Management Hub
- Industry: Software development, creative agencies
- Scale: 100+ tasks weekly across multiple projects
- Modifications needed: Add Notion relations to link tasks to projects, automatic Slack notifications when high-priority tasks are created, integration with GitHub for technical tasks
Use Case 4: Personal Productivity System
- Industry: Knowledge workers, entrepreneurs
- Scale: 10-20 actions daily
- Modifications needed: Add email summarization (pull unread emails and create digest), contact management (update Google Contacts from conversations), habit tracking (log daily activities to Notion)
Customizing This Workflow
Alternative Integrations
Instead of Gmail:
- Outlook/Office 365: Use Microsoft Graph API node—requires Azure app registration, supports shared mailboxes
- SendGrid: Better for transactional emails at scale—handles 100,000+ emails/month, requires API key
- Postmark: Use when deliverability is critical—99%+ inbox rate, detailed analytics
Instead of Notion:
- Airtable: Better for relational data and complex views—swap Notion node for Airtable node, requires base ID and table name
- Todoist: Simpler task management—use Todoist node, supports projects, labels, priorities
- ClickUp: Full project management—requires workspace ID, supports custom fields, time tracking
Instead of Google Calendar:
- Outlook Calendar: Use Microsoft Graph API—supports shared calendars, room booking
- Calendly: For scheduling meetings—create availability blocks, send booking links
Workflow Extensions
Add email summarization:
- Add a Schedule node to run daily at 8am
- Connect to Gmail node with operation "Get Many" (filter: is:unread)
- Add OpenAI node to summarize email content
- Send summary to Slack or email
- Nodes needed: +4 (Schedule, Gmail, OpenAI, Slack/Gmail)
Add contact management:
- Create new action "update_contact" in custom GPT
- Add Google Contacts node to create or update entries
- Parse conversation context to extract phone, email, company
- Nodes needed: +3 (Switch rule, Function to parse, Google Contacts)
Add task reorganization:
- Create action "list_stale_tasks" that queries Notion
- Filter for tasks older than 30 days with status "Not Started"
- Use OpenAI to suggest reorganization (archive, reprioritize, break into subtasks)
- Return suggestions to ChatGPT for your review
- Nodes needed: +5 (Notion query, Function to filter, OpenAI, Format response)
Scale to handle more data:
- Add Redis/Supabase for caching frequent requests (e.g., calendar availability)
- Implement batch processing for multiple commands in one message
- Add queue system (Bull/RabbitMQ) for high-volume scenarios
- Performance improvement: 5x faster for 10+ commands per minute
Integration possibilities:
| Add This | To Get This | Complexity |
|---|---|---|
| Slack integration | Send confirmations to Slack channel instead of ChatGPT | Easy (2 nodes) |
| Airtable sync | Maintain task database with better reporting | Medium (4 nodes) |
| Zapier webhook | Trigger 1000+ other app integrations | Easy (1 node) |
| OpenAI summarization | Auto-generate meeting notes from calendar events | Medium (3 nodes) |
| Supabase database | Store execution history and analytics | Medium (5 nodes) |
| Twilio SMS | Send confirmations via text message | Easy (2 nodes) |
Get Started Today
Ready to automate your personal productivity workflows?
- Download the template: Scroll to the bottom of this article to copy the n8n workflow JSON
- Import to n8n: Go to Workflows → Import from File, paste the JSON
- Configure your services: Add OAuth credentials for Gmail and Google Calendar, create Notion integration token
- Build your custom GPT: Follow Step 6 to create the ChatGPT interface with your webhook URL
- Test with sample commands: Try "Send a test email to yourself" to verify the complete flow
- Deploy to production: Activate the workflow and start using your AI assistant
Need help customizing this workflow for your specific business needs? Schedule an intro call with Atherial at atherial.ai/contact.
