{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "984b6aba-c9ea-4b12-9274-c8d479c2719f",
      "name": "MCP Server Trigger",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "notes": "\ud83d\ude80 MCP TRIGGER\n\nThis is the entry point for AI interactions with Gmail. The MCP (Model Context Protocol) trigger allows AI models to call any of the connected Gmail tools based on user requests.\n\nKey Features:\n\u2022 Enables natural language Gmail commands\n\u2022 Routes AI requests to appropriate Gmail operations\n\u2022 Provides context-aware email management\n\u2022 Supports complex multi-step email workflows",
      "position": [
        -1640,
        200
      ],
      "parameters": {
        "path": "fe5e5e6c-07d6-48c1-a1f8-d554bae77daf"
      },
      "typeVersion": 1.1
    },
    {
      "id": "64fd5646-c65b-4142-944f-7046a745690b",
      "name": "Gmail - Send Email",
      "type": "n8n-nodes-base.gmailTool",
      "notes": "\ud83d\udce7 SEND EMAIL\n\nCompose and send emails through AI commands. The AI extracts recipient, subject, and message content from natural language requests.\n\nUse Cases:\n\u2022 \"Send an email to john@example.com about the meeting\"\n\u2022 \"Compose a follow-up email to the client\"\n\u2022 \"Send a thank you note to the team\"\n\nAI Parameters:\n\u2022 To: Email recipient(s)\n\u2022 Subject: Email subject line\n\u2022 Message: Email body content",
      "position": [
        -1020,
        700
      ],
      "parameters": {
        "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {},
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c57c28ce-2353-4f18-b7db-91f508ebe4da",
      "name": "Gmail - Get Email",
      "type": "n8n-nodes-base.gmailTool",
      "notes": "\ud83d\udcd6 READ EMAIL\n\nRetrieve and read email content by message ID. Perfect for AI to analyze, summarize, or extract information from specific emails.\n\nUse Cases:\n\u2022 \"Read the latest email from Sarah\"\n\u2022 \"Get the content of message ID 123456\"\n\u2022 \"Show me the email about the project update\"\n\nReturns:\n\u2022 Full email content\n\u2022 Headers and metadata\n\u2022 Attachments information\n\u2022 Thread context",
      "position": [
        -800,
        600
      ],
      "parameters": {
        "operation": "get"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "d164fa99-97f4-4544-8ea6-c74ae06bb2b4",
      "name": "Gmail - Mark Unread",
      "type": "n8n-nodes-base.gmailTool",
      "notes": "\ud83d\udc41\ufe0f MARK AS UNREAD\n\nMark emails as unread to ensure they get attention later. Useful for emails that need follow-up or further action.\n\nUse Cases:\n\u2022 \"Mark that important email as unread\"\n\u2022 \"I need to revisit this email later\"\n\u2022 \"Flag this message for follow-up\"\n\nBest Practices:\n\u2022 Use for emails requiring action\n\u2022 Combine with labels for better organization\n\u2022 Great for creating manual reminders",
      "position": [
        -600,
        500
      ],
      "parameters": {
        "operation": "markAsUnread"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "d5712ba7-9db0-4203-b5b9-1a0ece642cce",
      "name": "Gmail - Add Labels",
      "type": "n8n-nodes-base.gmailTool",
      "notes": "\ud83c\udff7\ufe0f ADD LABELS\n\nOrganize emails by adding labels for better categorization and workflow management.\n\nUse Cases:\n\u2022 \"Label this email as 'Important'\"\n\u2022 \"Add 'Project-X' label to recent emails\"\n\u2022 \"Categorize this as 'Follow-up Required'\"\n\nAI Parameters:\n\u2022 Message_ID: Target email ID\n\u2022 Label_Names_or_IDs: Labels to apply\n\nTip: Use descriptive labels for AI-driven organization",
      "position": [
        -280,
        400
      ],
      "parameters": {
        "labelIds": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Label_Names_or_IDs', ``, 'string') }}",
        "messageId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message_ID', ``, 'string') }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "558332d6-5ff4-4eea-9aa1-7851ad94397e",
      "name": "Gmail - Mark Read",
      "type": "n8n-nodes-base.gmailTool",
      "notes": "\u2705 MARK AS READ\n\nMark emails as read to maintain inbox organization and track processed messages.\n\nUse Cases:\n\u2022 \"Mark all emails from today as read\"\n\u2022 \"I've processed this email, mark it read\"\n\u2022 \"Clean up my unread messages\"\n\nAutomation Ideas:\n\u2022 Auto-mark newsletters as read\n\u2022 Mark processed support tickets\n\u2022 Bulk mark promotional emails",
      "position": [
        -600,
        60
      ],
      "parameters": {
        "operation": "markAsRead"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "ea878786-f87d-4734-bed0-f4d96c459593",
      "name": "Gmail - Remove Labels",
      "type": "n8n-nodes-base.gmailTool",
      "notes": "\ud83d\uddd1\ufe0f REMOVE LABELS\n\nRemove labels from emails to update categorization or clean up organization system.\n\nUse Cases:\n\u2022 \"Remove 'Urgent' label from this email\"\n\u2022 \"Clean up old project labels\"\n\u2022 \"Update email categorization\"\n\nAI Parameters:\n\u2022 Message_ID: Target email ID\n\u2022 Label_Names_or_IDs: Labels to remove\n\nWorkflow Tip: Combine with add labels for label migration",
      "position": [
        -1460,
        640
      ],
      "parameters": {
        "labelIds": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Label_Names_or_IDs', ``, 'string') }}",
        "messageId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message_ID', ``, 'string') }}",
        "operation": "removeLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "98f2cb9e-d0a9-48a9-9b9a-26a195128180",
      "name": "Sticky Note - MCP Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2020,
        -60
      ],
      "parameters": {
        "color": 5,
        "width": 689,
        "height": 424,
        "content": "## \ud83d\ude80 MCP TRIGGER EXPLANATION\n\n**What it does:**\nThis is the entry point for AI interactions with Gmail. The MCP (Model Context Protocol) trigger allows AI models to call any of the connected Gmail tools based on user requests.\n\n**Key Features:**\n\u2022 Enables natural language Gmail commands\n\u2022 Routes AI requests to appropriate Gmail operations\n\u2022 Provides context-aware email management\n\u2022 Supports complex multi-step email workflows\n\n**Example Commands:**\n\"Send an email to john@example.com\"\n\"Mark the latest email as important\"\n\"Read my unread messages\""
      },
      "typeVersion": 1
    },
    {
      "id": "f3431de6-e652-44d0-9060-d8f320e148eb",
      "name": "Sticky Note - Send Email",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1180,
        840
      ],
      "parameters": {
        "width": 350,
        "height": 284,
        "content": "## \ud83d\udce7 SEND EMAIL\n\n**Purpose:**\nCompose and send emails through AI commands. The AI extracts recipient, subject, and message content from natural language requests.\n\n**Use Cases:**\n\u2022 \"Send an email to john@example.com about the meeting\"\n\u2022 \"Compose a follow-up email to the client\"\n\u2022 \"Send a thank you note to the team\"\n\n**AI Parameters:**\n\u2022 **To:** Email recipient(s)\n\u2022 **Subject:** Email subject line\n\u2022 **Message:** Email body content"
      },
      "typeVersion": 1
    },
    {
      "id": "763d55d6-9c23-4997-b877-594e4c89d81d",
      "name": "Sticky Note - Get Email",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -700,
        780
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 264,
        "content": "## \ud83d\udcd6 READ EMAIL\n\n**Purpose:**\nRetrieve and read email content by message ID. Perfect for AI to analyze, summarize, or extract information from specific emails.\n\n**Use Cases:**\n\u2022 \"Read the latest email from Sarah\"\n\u2022 \"Get the content of message ID 123456\"\n\u2022 \"Show me the email about the project update\"\n\n**Returns:**\n\u2022 Full email content\n\u2022 Headers and metadata\n\u2022 Attachments information\n\u2022 Thread context"
      },
      "typeVersion": 1
    },
    {
      "id": "7e7eb446-0483-4c47-9420-c8c9292f48c1",
      "name": "Sticky Note - Mark Unread",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        580
      ],
      "parameters": {
        "width": 300,
        "height": 244,
        "content": "## \ud83d\udc41\ufe0f MARK AS UNREAD\n\n**Purpose:**\nMark emails as unread to ensure they get attention later. Useful for emails that need follow-up or further action.\n\n**Use Cases:**\n\u2022 \"Mark that important email as unread\"\n\u2022 \"I need to revisit this email later\"\n\u2022 \"Flag this message for follow-up\"\n\n**Best Practices:**\n\u2022 Use for emails requiring action\n\u2022 Combine with labels for better organization\n\u2022 Great for creating manual reminders"
      },
      "typeVersion": 1
    },
    {
      "id": "976116f9-1b9e-466c-b3cf-46aa9a484320",
      "name": "Sticky Note - Add Labels",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        60
      ],
      "parameters": {
        "color": 6,
        "width": 320,
        "height": 444,
        "content": "## \ud83c\udff7\ufe0f ADD LABELS\n\n**Purpose:**\nOrganize emails by adding labels for better categorization and workflow management.\n\n**Use Cases:**\n\u2022 \"Label this email as 'Important'\"\n\u2022 \"Add 'Project-X' label to recent emails\"\n\u2022 \"Categorize this as 'Follow-up Required'\"\n\n**AI Parameters:**\n\u2022 **Message_ID:** Target email ID\n\u2022 **Label_Names_or_IDs:** Labels to apply\n\n**Tip:** Use descriptive labels for AI-driven organization"
      },
      "typeVersion": 1
    },
    {
      "id": "835c248d-e384-419b-a22f-9e590afa56c6",
      "name": "Sticky Note - Mark Read",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -60
      ],
      "parameters": {
        "width": 400,
        "height": 244,
        "content": "## \u2705 MARK AS READ\n\n**Purpose:**\nMark emails as read to maintain inbox organization and track processed messages.\n\n**Use Cases:**\n\u2022 \"Mark all emails from today as read\"\n\u2022 \"I've processed this email, mark it read\"\n\u2022 \"Clean up my unread messages\"\n\n**Automation Ideas:**\n\u2022 Auto-mark newsletters as read\n\u2022 Mark processed support tickets\n\u2022 Bulk mark promotional emails"
      },
      "typeVersion": 1
    },
    {
      "id": "faae81d9-bf04-4b66-8bb4-649b22f6cd5b",
      "name": "Sticky Note - Remove Labels",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1640,
        780
      ],
      "parameters": {
        "width": 320,
        "height": 264,
        "content": "## \ud83d\uddd1\ufe0f REMOVE LABELS\n\n**Purpose:**\nRemove labels from emails to update categorization or clean up organization system.\n\n**Use Cases:**\n\u2022 \"Remove 'Urgent' label from this email\"\n\u2022 \"Clean up old project labels\"\n\u2022 \"Update email categorization\"\n\n**AI Parameters:**\n\u2022 **Message_ID:** Target email ID\n\u2022 **Label_Names_or_IDs:** Labels to remove\n\n**Workflow Tip:** Combine with add labels for label migration"
      },
      "typeVersion": 1
    },
    {
      "id": "f2da52ae-39ce-40b7-a162-4c4cb369e7f4",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2620,
        280
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 664,
        "content": "## \ud83c\udfaf WORKFLOW OVERVIEW\n\n**Gmail MCP - AI-Powered Email Management**\n\nThis workflow provides a complete toolkit for intelligent email management through AI interactions using the Model Context Protocol (MCP).\n\n**Core Capabilities:**\n\u2022 \ud83d\udce7 Send personalized emails\n\u2022 \ud83d\udcd6 Read and analyze email content\n\u2022 \ud83c\udff7\ufe0f Organize with smart labeling\n\u2022 \u2705 Manage read/unread status\n\u2022 \ud83e\udd16 Natural language commands\n\n**Getting Started:**\n1. Ensure Gmail OAuth2 is configured\n2. Test each tool individually\n3. Use natural language with your AI\n4. Monitor workflow execution logs"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Gmail - Get Email": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Mark Read": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Add Labels": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Send Email": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Mark Unread": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Remove Labels": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}