AutomationFlowsAI & RAG › Manage Emails via Whatsapp with Gmail, Gpt and Voice Recognition

Manage Emails via Whatsapp with Gmail, Gpt and Voice Recognition

ByFloyd Mahou @floyd on n8n.io

This workflow turns WhatsApp into a smart email command center using AI.

Event trigger★★★★☆ complexityAI-powered24 nodesAgentGmail ToolOpenAI ChatWhatsApp TriggerHTTP RequestOpenAIWhatsAppMemory Buffer Window
AI & RAG Trigger: Event Nodes: 24 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5042 — we link there as the canonical source.

This workflow follows the Agent → Airtabletool recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "2CrCmc820XAaHFHL",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "SmartMail Agent \u2013 Your AI Email Assistant, Powered by WhatsApp",
  "tags": [],
  "nodes": [
    {
      "id": "85a2e149-585b-485b-bcfc-0b4097193e39",
      "name": "Email Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        2480,
        -3100
      ],
      "parameters": {
        "text": "={{ $json.message_type }}\n",
        "options": {
          "systemMessage": "=# Overview  \nYou are an AI assistant specialized in managing email-related tasks and providing direct, actionable responses in French and English.\n\n## Context  \n- You are a general-purpose assistant supporting users in email communication and message automation.  \n- You operate in both French and English, depending on the language of the input.  \n- Your tone is strategic, clear, and focused on delivering concise responses.  \n\n## Instructions  \n1. Always validate the presence of actual message content before replying.  \n2. If the input is a greeting (e.g., \"Bonjour\", \"Merci\", \"comment tu vas\"), respond in a concise and friendly tone.  \n3. Format all email replies using HTML for clarity and structure.  \n4. If necessary, ask strategic questions to clarify vague requests or guide toward specific actions.  \n5. Respond directly to the user's message with a final sentence. Do not explain, structure, or rephrase the request.  \n6. If the input is unclear or lacks actionable content, request clarification.  \n7. You must never justify or comment on your actions.  \n\n## Tools    \n- Create Draft  \n- Send Email  \n\n## Examples  \n- Input: \"Bonjour\"  \n  - Output: \"Bonjour ! Ca va tr\u00e8s bien, merci. Comment puis-je vous aider aujourd\u2019hui ?\"  \n- Input: \"Envoies un email \u00e0 Florence.\"  \n  - Output: \"L'email a \u00e9t\u00e9 envoy\u00e9 \u00e0 Florence \u00e0 l'adresse email suivante : xxx@nomdedomaine\"  \n- Input: \"Merci\"  \n  - Output: \"Avec plaisir ! \ud83d\ude0a\"  \n\n## SOP (Standard Operating Procedure)  \n1. Check if the message contains usable content.  \n2. If empty, determine if it's a greeting; if not, request clarification.  \n3. Compose the email using this HTML format:  \n   \"Hello [Name],  \n   <br><br>  \n   [Content]  \n   <br><br>  \n   Best regards,  \n   <br>  \n   [Your Name]\"  \n4. Send or draft the email as instructed.  \n5. Log the outcome of the action if needed.  \n\n## Final Notes  \n- Your role is to provide fast, clean, and final outputs.  \n- Prioritize simple, scalable, and personalized interactions.  \n- All responses are time-sensitive and context-aware.  \n\nCurrent time is {{ $now.format('yyyy-MM-dd') }}  \nTime zone: Paris/Europe  \n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "8b3fbab7-d5f4-4ab9-9468-e492586c5d2e",
      "name": "Send Email",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        2200,
        -2680
      ],
      "parameters": {
        "sendTo": "={{ $fromAI(\"emailAddress\") }}",
        "message": "={{ $fromAI(\"emailBody\") }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ $fromAI(\"subject\") }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "eefaed16-798f-4060-9be2-9b527ecd4a56",
      "name": "Create Draft",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        2360,
        -2680
      ],
      "parameters": {
        "message": "={{ $fromAI(\"emailBody\") }}",
        "options": {
          "sendTo": "={{ $fromAI(\"emailAddress\") }}"
        },
        "subject": "={{ $fromAI(\"subject\") }}",
        "resource": "draft",
        "emailType": "html"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "5b47751d-88f0-4e7c-aecb-df220f672b08",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2040,
        -2680
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4-turbo-preview",
          "cachedResultName": "gpt-4-turbo-preview"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "67d7f391-46ba-43ba-b988-35a68b46acdd",
      "name": "WhatsApp Trigger",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        1660,
        -3860
      ],
      "parameters": {
        "updates": [
          "messages"
        ]
      },
      "credentials": {
        "whatsAppTriggerApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "05fa762a-94e2-49cb-8236-5d12dfa046cd",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1980,
        -3860
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "voice",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b969c18d-14dd-4b34-8d08-801d8818b8d2",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('WhatsApp Trigger').item.json.messages[0].type }}",
                    "rightValue": "audio"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "text",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1daa0ee5-cb8b-44c4-ae74-954cae03c10d",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('WhatsApp Trigger').item.json.messages[0].type }}",
                    "rightValue": "text"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "d3bbad47-a4b0-4bc0-a807-adffb4914bde",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2360,
        -3940
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "whatsAppApi"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "2451cc94-89b3-4163-a278-ef54c3302ec6",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2540,
        -3940
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "transcribe"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "12942040-c126-4ce3-8549-9f0f0c62cf46",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        2500,
        -3760
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "7453a002-ec0f-4853-a28d-5d06669cb5d0",
              "name": "text",
              "type": "string",
              "value": "={{ $('WhatsApp Trigger').item.json.messages[0].text.body }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "74d29419-8fe1-4d68-84f7-1584e71abc22",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1820,
        -3860
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "={{ $json.field }}"
      },
      "typeVersion": 1
    },
    {
      "id": "b49b0f86-49bf-4e22-afc3-b13639e34c3d",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        2720,
        -3760
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8cbf25ac-3fc9-4892-9c6a-24c974b03362",
              "name": "message_type",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "49837ff2-bb28-47fe-97d4-6f6d2840586a",
      "name": "WhatsApp Business Cloud1",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        1940,
        -1680
      ],
      "parameters": {
        "textBody": "={{ $json.output }}",
        "operation": "send",
        "phoneNumberId": "580438095157298",
        "additionalFields": {},
        "recipientPhoneNumber": "+1234567890"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "86e22c41-98a6-400f-8945-afd724f05c14",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "disabled": true,
      "position": [
        1860,
        -2680
      ],
      "parameters": {
        "sessionKey": "={{ $('Edit Fields1').item.json.message_type }} ",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "4b0530f5-abfc-430c-915e-482dca9cc932",
      "name": "WhatsApp Business Cloud",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2180,
        -3940
      ],
      "parameters": {
        "resource": "media",
        "operation": "mediaUrlGet",
        "mediaGetId": "={{ $json.audio.id }}"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2e755031-6f6a-4280-bf13-4fc5cc1ccbe4",
      "name": "OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1920,
        -1900
      ],
      "parameters": {
        "input": "={{ $json.output }}",
        "voice": "nova",
        "options": {},
        "resource": "audio"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "a9a3bf53-ea40-4206-9f54-159f96db2f79",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        2160,
        -1900
      ],
      "parameters": {
        "jsCode": "// Loop over input items and change the MIME type of binary data\nfor (const item of $input.all()) {\n\t// Check if the item has binary data\n\tif (item.binary) {\n\t\t// Find the binary property name (assuming there's at least one)\n\t\tconst binaryPropertyNames = Object.keys(item.binary);\n\n\t\tfor (const propName of binaryPropertyNames) {\n\t\t\t// If the MIME type is 'audio/mp3', change it to 'audio/mpeg'\n\t\t\tif (item.binary[propName].mimeType === 'audio/mp3') {\n\t\t\t\titem.binary[propName].mimeType = 'audio/mpeg';\n\t\t\t}\n\t\t}\n\t}\n}\n\nreturn $input.all();\n"
      },
      "typeVersion": 2
    },
    {
      "id": "32005f45-3bb2-4da0-887a-b89fbe49a7ba",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1640,
        -1880
      ],
      "parameters": {
        "options": {
          "ignoreCase": false
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "2163dc40-756e-479a-b7fd-1418ac129a61",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('WhatsApp Trigger').item.json.messages[0].type }}",
              "rightValue": "audio"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cec9cff4-b04b-4858-a46c-1caa8e2cc8a2",
      "name": "WhatsApp Business Cloud2",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2400,
        -1900
      ],
      "parameters": {
        "resource": "media",
        "phoneNumberId": "580438095157298",
        "additionalFields": {}
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2c9dd33c-6c67-468a-a5bb-16076b08d735",
      "name": "WhatsApp Business Cloud3",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2640,
        -1900
      ],
      "parameters": {
        "mediaId": "={{ $json.id }}",
        "mediaPath": "useMediaId",
        "operation": "send",
        "messageType": "audio",
        "phoneNumberId": "580438095157298",
        "additionalFields": {},
        "recipientPhoneNumber": "+1234567890"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e530836b-5977-4810-a684-4d4d71bd82c3",
      "name": "Get Email",
      "type": "n8n-nodes-base.airtableTool",
      "position": [
        2520,
        -2680
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "app6hvrEDwB41AKAz",
          "cachedResultUrl": "https://airtable.com/app6hvrEDwB41AKAz",
          "cachedResultName": "[BlockA] - Contact List"
        },
        "limit": 5,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbldXug1pLHGc0xoI",
          "cachedResultUrl": "https://airtable.com/app6hvrEDwB41AKAz/tbldXug1pLHGc0xoI",
          "cachedResultName": "Auto"
        },
        "options": {},
        "operation": "search",
        "returnAll": false,
        "filterByFormula": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Filter_By_Formula', ``, 'string') }}"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "60875323-4791-4782-a7af-855400619f1b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -4460
      ],
      "parameters": {
        "width": 1280,
        "height": 920,
        "content": "## \ud83d\udfeb  Part 1: WhatsApp Message Intake & Voice Transcription\n# Reception WhatsApp & Transcription vocale\n\n\ud83d\udd27 Main Modules:\nWhatsApp Trigger: Listens for new incoming messages.\n\nSplit Out: Breaks down incoming message batches.\n\nSwitch: Identifies the message type (text, image, audio, etc.).\n\nWhatsApp Business Cloud: Retrieves media content.\n\nHTTP Request: Downloads audio files for transcription.\n\nOpenAI (Whisper): Transcribes voice messages into text.\n\nEdit Fields: Cleans and formats the output into structured JSON.\n\n\ud83e\udde0 Goal:\nDetect and transcribe voice messages received via WhatsApp.\nPrepares clean, structured text that can be interpreted by the AI agent for further action."
      },
      "typeVersion": 1
    },
    {
      "id": "b1172ad4-92fe-4a6b-97f7-ccce4bd8f56c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -2380
      ],
      "parameters": {
        "color": 3,
        "width": 1280,
        "height": 940,
        "content": "##  \ud83d\udfe5 Part 3: Vocal Response & WhatsApp Feedback\n# Vocal Generation & Personalized WhatsApp Return\n\n\ud83d\udd27 Main Modules:\nOpenAI (Text-to-Voice logic): Generates a personalized summary or confirmation message.\n\nIf: Decides whether to generate a voice message or just a text reply.\n\nCode: Formats the response and adapts the message payload for WhatsApp API.\n\nWhatsApp Business Cloud (media.mediaupload): Sends the audio message file.\n\nWhatsApp Business Cloud (message.send): Sends the final WhatsApp message (text or audio).\n\nOptional: Return text + audio simultaneously for enriched UX.\n\n\ud83e\udde0 Goal:\nRespond back to the client or user directly via WhatsApp, with either a summarized text or an auto-generated voice message \u2014 offering clarity, speed, and a human-like touch."
      },
      "typeVersion": 1
    },
    {
      "id": "227b5da7-2ffc-4bf0-ba34-f4fbe1f61297",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -3540
      ],
      "parameters": {
        "color": 4,
        "width": 1280,
        "height": 1160,
        "content": "## \ud83d\udfe9 Part 2: Smart Email Agent \u2013 Read, Draft, Respond\n# Email AI Agent \u2013 Send, Draft, Reply...\n\n\ud83d\udd27 Main Modules:\nEmail Agent: Core logic and orchestration of all email-related actions.\n\nOpenAI Chat Model: Extracts user intent and provides reasoning based on message.\n\nSimple Memory (Optional): Stores previous interactions.\n\nSend Email: Sends email directly if fully automated.\n\nCreate Draft: Generates a draft email for manual validation.\n\nGet Email (Airtable): Retrieves the recipient\u2019s emails and related content from a contact stored in the database.\n\n\ud83e\udde0 Goal:\nTurn a WhatsApp voice/text instruction into a precise email action: read, summarize, draft, or reply.\nThe agent leverages OpenAI to act intelligently and adapt to the context."
      },
      "typeVersion": 1
    },
    {
      "id": "98b9f159-67e7-421b-a7df-9be564db9db4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2900,
        -4460
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "height": 3020,
        "content": "## \ud83d\udcd8 Smart Email Agent via WhatsApp \u2013 Module-by-Module Setup Guide\n# This guide explains how the already-built template works, detailing each step with the required modules and configurations.\n\n\ud83e\udde9 What You\u2019ll Need\n\nTo deploy this AI-powered email assistant, ensure you have the following:\n\n\u2705 WhatsApp Business Cloud API access(with a registered phone number and webhook configured)\n\u2705 OpenAI API Key(used for both GPT and Whisper models)\n\u2705 Gmail or Google Workspace account(OAuth2 credentials to access email content and send replies)\n\u2705 Airtable account (free plan is sufficient)(used for contact lookups, template storage, or logging interactions)\n\u2705 n8n instance(either cloud or self-hosted with HTTPS enabled)\n\u2705 Basic familiarity with n8n workflow builder\n\n\u23f1\ufe0f Estimated setup time: 30\u201360 minutes\n\n\ud83d\udfeb Step 1 \u2013 Capture WhatsApp Messages\n\nModules:\nWebhook: Listens for WhatsApp events via the Meta API.\nSplit Out: Handles rare fallback events where multiple messages are received in one payload.\nSwitch: Determines the type of message (text, audio, etc.).\nWhatsApp Media Node: Retrieves media ID if it\u2019s an audio message.\nHTTP Request: Downloads the audio file from the media ID.\nOpenAI Whisper: Transcribes audio to text.\n(Optional) Edit Fields: Cleans and standardizes the text for further processing.\n\nWhat Happens:\n\nThis section ensures every incoming message (voice or text) is accurately processed and ready for interpretation.\n\n\ud83d\udfe9 Step 2 \u2013 Analyze & Process the Email Request\n\nModules:\n\nOpenAI Chat: Extracts the intent from the message (e.g., send, reply, summarize).\n\nGmail Nodes:\n\nGmail: Get Email: Retrieves past email content.\nGmail: Create Draft: Saves a reply as a draft.\nGmail: Send Email: Sends an email directly if action is confirmed.\n\nAirtable:\n\nRetrieves contact information (email, job title, company, etc.).\nLogs key elements for memory (intent, timestamp, status, etc.).\n\nKey Feature:\n\nYour Gut AI Agent \u2014 This setup builds a memory by correlating emails and contact profiles inside Airtable. Your agent becomes context-aware, knowing who it's speaking to and what has been exchanged previously.\n\n\ud83d\udfe5 Step 3 \u2013 Return Smart Feedback via WhatsApp\n\nModules:\n\nOpenAI Chat: Generates a natural-language confirmation of the action taken.\n\n(Optional) TTS/Voice Generation (Tip to strengthen your workflow): Automatically converts the confirmation into a voice message using ElevenLabs - allowing the assistant to communicate feedback in audio form.\n\nCode Node: Ensures the correct MIME type for the audio file (e.g., audio/mp3 \u2192 audio/mpeg).\n\nWhatsApp Media Upload: Uploads the audio to WhatsApp Cloud.\n\nWhatsApp Message Sender: Sends the confirmation message (text or voice) back to the user.\n\nAdditional Notes:\n\nThe Code Node loops through binary data to ensure compatibility with WhatsApp's expected audio format.\n\n\ud83d\udd10 Security Best Practices\n\nNever hardcode API keys \u2013 use environment variables.\nSecure your Webhook with custom headers.\nMonitor usage and logs regularly.\n\nHandle errors with fallback branches in n8n.\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e85f3f2d-99f2-4df8-b94f-739dcf2c52b1",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "OpenAI1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "WhatsApp Business Cloud1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "WhatsApp Business Cloud2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "WhatsApp Business Cloud",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI1": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Email": {
      "ai_tool": [
        [
          {
            "node": "Email Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email": {
      "ai_tool": [
        [
          {
            "node": "Email Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Agent": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Draft": {
      "ai_tool": [
        [
          {
            "node": "Email Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Email Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Email Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Email Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Business Cloud": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Business Cloud1": {
      "main": [
        []
      ]
    },
    "WhatsApp Business Cloud2": {
      "main": [
        [
          {
            "node": "WhatsApp Business Cloud3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow turns WhatsApp into a smart email command center using AI.

Source: https://n8n.io/workflows/5042/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Transform your salon/service business with this streamlined WhatsApp automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I

WhatsApp Trigger, WhatsApp, Redis +11
AI & RAG

48_WAgentEnhancement. Uses whatsAppTrigger, whatsApp, openAi, httpRequest. Event-driven trigger; 56 nodes.

WhatsApp Trigger, WhatsApp, OpenAI +13
AI & RAG

Template Carnaval - time instagram. Uses toolWorkflow, lmChatOpenAi, memoryBufferWindow, agent. Event-driven trigger; 56 nodes.

Tool Workflow, OpenAI Chat, Memory Buffer Window +10
AI & RAG

This workflow creates a complete AI-powered restaurant ordering system through WhatsApp. It receives customer messages, processes multimedia content (text, voice, images, PDFs, location), uses GPT-4 t

OpenAI Chat, Memory Postgres Chat, HTTP Request +6
AI & RAG

This template is designed for anyone who wants to use WhatsApp as a personal AI assistant hub. If you often juggle tasks, emails, calendars, and expenses across multiple tools, this workflow consolida

OpenAI Chat, Memory Buffer Window, Mcp Client Tool +12