AutomationFlowsAI & RAG › Generate Cold Emails & Sales Letters with OpenAI & Google Docs

Generate Cold Emails & Sales Letters with OpenAI & Google Docs

Original n8n title: Generate Cold Emails & Sales Letters with Openai Gpt & Google Docs via Chat

ByYar Malik (Asfandyar) @yar on n8n.io

How it works Trigger: Listens for an incoming chat message Copy Assistant: Feeds the message (plus memory) into an OpenAI Chat Model and exposes two “tools”

Chat trigger trigger★★☆☆☆ complexityAI-powered7 nodesChat TriggerAgentOpenAI ChatMemory Buffer WindowGoogle DocsTool Workflow
AI & RAG Trigger: Chat trigger Nodes: 7 Complexity: ★★☆☆☆ AI nodes: yes Added:

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

This workflow follows the Agent → Chat Trigger 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": "STAFgThRSXspfU6H",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Team of AI Copywriters",
  "tags": [],
  "nodes": [
    {
      "id": "e3ca2747-0fb3-48e5-8155-28a64df90034",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -180,
        -20
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "e1b1b753-3c5d-4114-80c6-bdec524b57ba",
      "name": "Copy Assistant",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        120,
        -20
      ],
      "parameters": {
        "options": {
          "systemMessage": "#Overview\nYou are a Copy Assistant Agent responsible for managing and routing user requests to the appropriate specialized copywriting agents based on input. You are the control coordinator for generating and delivering high\u2011quality platform\u2011ready marketing copy.\n\n## Context\nYou are connected to multiple specialized copywriting tools:\n\nSales Letter Agent\nCold Email Copywriter\n\nYou also interact with an OpenAI chat model and a memory system to retain conversational context\n\nOnce copy is generated, your role is to deliver it clearly and accurately to the user and update the connected Google Doc with the final version.\n\n## Instrcutions\nWhen a user request is received, determine its intent and route it to the correct agent:\nAd Copy Agent \u2192 punchy headlines, descriptions & CTAs for display/search/social ads\nVSL Script Agent \u2192 full\u2011length video sales letters with hook, problem/solution, proof, CTA\nAd Script Agent \u2192 short (15\u201360\u202fsec) video ad scripts for TikTok, Instagram, YouTube\nSales Letter Agent \u2192 long\u2011form email or web sales letters with storytelling, proof, bullets\nCold Email Copywriter \u2192 concise, personalized outreach sequences (subjects, intros, value props, follow\u2011ups)\n\n## Tools\nAd Copy Agent: punchy headlines, descriptions & CTAs for social/display/search ads\nVSL Script Agent: longer video\u2011sales\u2011letter scripts with hook, problem/solution, proof, CTA\nAd Script Agent: short video ad scripts (15\u201360\u202fsec) for TikTok, Instagram, YouTube\nSales Letter Agent: long\u2011form email or web sales letters with story, proof, bullets\nCold Email Copywriter: concise outreach sequences\u2014subject lines, intros, value props, follow\u2011ups\n\n## Examples\n\u201cNeed a Facebook ad for our new fitness app.\u201d \u2192 route to Ad Copy Agent\n\u201cWrite a 3\u2011minute VSL script pitching our automation tool.\u201d \u2192 route to VSL Script Agent\n\u201c30\u2011second TikTok spot for our gourmet coffee.\u201d \u2192 route to Ad Script Agent\n\u201cLong\u2011form sales letter for B2B software.\u201d \u2192 route to Sales Letter Agent\n\u201c5\u2011step cold email sequence to logistics managers.\u201d \u2192 route to Cold Email Copywriter\n\n## SOPs\nInterpret intent: read the user\u2019s brief, spot format and goal\nSelect agent: map to the tool that matches (ad, VSL, email, etc.)\nPrompt agent: pass along the brief plus brand voice or any notes\nReview output: check tone, formatting, brand compliance\nDeliver: send clean, formatted copy back to the user\nDocument: paste final approved copy into the shared Google Doc\n\n## Final Notes\nKeep things concise, conversational, user\u2011focused\nAlways ask if you need more brand details or style guidelines\nStay friendly and collaborative\nStore context so follow\u2011up tweaks are seamless"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7da8a0e8-f23c-4404-b0a8-cfce31ffc83c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -40,
        220
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e213359c-4eea-49b1-91a8-7d456396d601",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        80,
        340
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "9c1af61f-a0bc-4f0d-9143-a051e1b34c78",
      "name": "Update a document",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        480,
        -20
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "={{ $json.output }}",
              "action": "insert"
            }
          ]
        },
        "operation": "update",
        "documentURL": "https://docs.google.com/document/d/1eI4Pdje4As0KEYjEG3prMUQCiLe-tUswnwNUVQG2GSw/edit?tab=t.0"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "43e28c30-cb70-4849-afbc-373b32b567f6",
      "name": "Cold Email Writer Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        240,
        360
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "ZtScEU9B5PNPnIcP",
          "cachedResultName": "Cold Email Copywriter"
        },
        "description": "Call this tool when the user requests cold email sequences",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d5226fca-a257-49f2-b58b-fe61a58b9214",
      "name": "Sales Letter Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        400,
        360
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "HQuj3iBV1PlI0HY1",
          "cachedResultName": "Sales Letter Agent"
        },
        "description": "Call this tool when user request for sales letters sequence",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9c9ce4d3-2f74-4597-9279-80344132094c",
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Copy Assistant",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Copy Assistant": {
      "main": [
        [
          {
            "node": "Update a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Copy Assistant",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sales Letter Tool": {
      "ai_tool": [
        [
          {
            "node": "Copy Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Cold Email Writer Tool": {
      "ai_tool": [
        [
          {
            "node": "Copy Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Copy Assistant",
            "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

How it works Trigger: Listens for an incoming chat message Copy Assistant: Feeds the message (plus memory) into an OpenAI Chat Model and exposes two “tools”

Source: https://n8n.io/workflows/5828/ — 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

Copywriting Agent (Team). Uses chatTrigger, toolWorkflow, lmChatOpenAi, googleDocs. Chat trigger; 11 nodes.

Chat Trigger, Tool Workflow, OpenAI Chat +3
AI & RAG

Perfect for educators, consultants, and content creators who record sessions and want to repurpose them into social media posts, videos, and images without manual work. Chat interface triggers the AI

Chat Trigger, OpenAI Chat, Memory Buffer Window +9
AI & RAG

OpenSea AI-Powered Insights via Telegram. Uses chatTrigger, telegramTrigger, lmChatOpenAi, memoryBufferWindow. Chat trigger; 13 nodes.

Chat Trigger, Telegram Trigger, OpenAI Chat +4
AI & RAG

Track NFT market trends, collections, and trades in real time—directly from Telegram! This master workflow integrates the OpenSea API, GPT-4o-mini AI, and Telegram, allowing users to request natural-l

Chat Trigger, Telegram Trigger, OpenAI Chat +4
AI & RAG

Expense Tracker. Uses chatTrigger, agent, lmChatOpenAi, memoryBufferWindow. Chat trigger; 12 nodes.

Chat Trigger, Agent, OpenAI Chat +5