Automatische Beantwortung von Gmail-Anfragen mit GPT-4o, Dumpling AI und LangChain Agent

Fortgeschritten

Dies ist ein Support, AI-Bereich Automatisierungsworkflow mit 10 Nodes. Hauptsächlich werden Filter, GmailTool, GmailTrigger, Agent, OpenAi und andere Nodes verwendet, kombiniert mit KI-Technologie für intelligente Automatisierung. Automatische Beantwortung von Gmail-Anfragen mit GPT-4o, Dumpling AI und LangChain Agent

Voraussetzungen
  • Google-Konto + Gmail API-Anmeldedaten
  • OpenAI API Key
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "uQTqLH5At9PZOy2g",
  "meta": {
    "instanceId": "a1ae5c8dc6c65e674f9c3947d083abcc749ef2546dff9f4ff01de4d6a36ebfe6",
    "templateCredsSetupCompleted": true
  },
  "name": "Auto-Respond to Gmail Enquiries using GPT-4o, Dumpling AI & LangChain Agent",
  "tags": [],
  "nodes": [
    {
      "id": "149c7dd9-9f5f-4c5b-8342-7c907eb52402",
      "name": "Überwache Gmail auf neue eingehende E-Mails",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -2300,
        -340
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "j70r3RTMED1pgN3R",
          "name": "Gmail account 2"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8a0de384-9028-47e3-86e5-b5bf6476ae0c",
      "name": "Klassifiziere E-Mail-Typ mit GPT-4o",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -2080,
        -340
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Classify the following email content. Determine if it is an enquiry.\nIf it is an enquiry, return only this word: enquiry\nIf it is not an enquiry, return only this word: false\nDo not explain or add any other text. Only return the result.\nHere is the email body: {{ $json.snippet }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "fdhWALG84tBLgSZT",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "57756cd3-9009-4189-8cba-e2edba87554f",
      "name": "Nur fortfahren, wenn es sich um eine Anfrage handelt",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1704,
        -340
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e6019006-0980-4cd6-8e5d-3f618fbca13a",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.message.content }}",
              "rightValue": "enquiry"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "64e851b8-7ff1-4b4c-9828-7c764594f1ea",
      "name": "GPT-4o Chat-Modell",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1484,
        -120
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "fdhWALG84tBLgSZT",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2957c6ad-5e7b-4692-a96f-5c4fb5b8203c",
      "name": "Speicherpuffer (letzte 10 Interaktionen)",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -1364,
        -120
      ],
      "parameters": {
        "contextWindowLength": 10
      },
      "typeVersion": 1.3
    },
    {
      "id": "9e8617f1-cd89-4de5-9d44-ded155779745",
      "name": "Dumpling AI Agent – Suche nach relevanten Informationen",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        -1244,
        -120
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/agents/generate-completion",
        "method": "POST",
        "jsonBody": "={\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\":\"{{ $('Watch Gmail for New Incoming Emails').item.json.snippet }}\"\n    }\n  ],\n  \"agentId\": \"a88a9b6c-1578-4da2-800b-561327367713\",\n  \"parseJson\": \"True\"\n  }",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "5CBvzXCLjwWzCJRE",
          "name": "n8n_integration"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "da474406-a6e3-427d-b21b-3e7e00ebe910",
      "name": "Sende E-Mail-Antwort über Gmail",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        -1124,
        -120
      ],
      "webhookId": "b39f740b-77d1-426a-a07a-186a9ff0c1af",
      "parameters": {
        "sendTo": "",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {},
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "j70r3RTMED1pgN3R",
          "name": "Gmail account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "03882650-9272-43c3-b1bc-15adae456881",
      "name": "LangChain Agent verarbeitet Antwortlogik",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1392,
        -340
      ],
      "parameters": {
        "text": "={{ $('Watch Gmail for New Incoming Emails').item.json.snippet }}",
        "options": {
          "systemMessage": "You are a helpful assistant, use the search for information tool to search for users information.\n\nuse Gmail tool to send email"
        },
        "promptType": "define"
      },
      "typeVersion": 1.8
    },
    {
      "id": "52bb3b65-0b7f-4206-87c9-1f91997a44dd",
      "name": "Notizzettel",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1500,
        -560
      ],
      "parameters": {
        "width": 480,
        "height": 240,
        "content": "### ✉️ Sticky Note 2: Website Scraping, Email Generation, and Sending\n\nFor leads with complete data, Dumpling AI scrapes the content of the lead’s company website. This content, combined with scraped details, is structured into a prompt using the Set node. GPT-4o processes the prompt and generates a personalized cold email. The email is then sent to the lead using Gmail. This automates targeted cold outreach using scraped insights and AI-generated messaging.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3a6df2e9-1d1a-4cab-889c-c323f876b98f",
      "name": "Notizzettel 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2320,
        -540
      ],
      "parameters": {
        "width": 540,
        "height": 220,
        "content": "### Sticky Note 1: Apollo Link Sourcing & Contact Scraping\n\nThis section begins the workflow manually. The Apollo lead URLs are pulled from a Google Sheet. Each link is passed to Apify which scrapes key lead details such as name, email, company website, and other contact data. After scraping, a filter checks that both an email and website were found for the lead before moving forward. This ensures only complete lead data is used for outreach.\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0f1d6a0b-eb13-4e1a-be9e-3f22eb17e66e",
  "connections": {
    "64e851b8-7ff1-4b4c-9828-7c764594f1ea": {
      "ai_languageModel": [
        [
          {
            "node": "03882650-9272-43c3-b1bc-15adae456881",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "da474406-a6e3-427d-b21b-3e7e00ebe910": {
      "ai_tool": [
        [
          {
            "node": "03882650-9272-43c3-b1bc-15adae456881",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "8a0de384-9028-47e3-86e5-b5bf6476ae0c": {
      "main": [
        [
          {
            "node": "57756cd3-9009-4189-8cba-e2edba87554f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "03882650-9272-43c3-b1bc-15adae456881": {
      "main": [
        []
      ]
    },
    "149c7dd9-9f5f-4c5b-8342-7c907eb52402": {
      "main": [
        [
          {
            "node": "8a0de384-9028-47e3-86e5-b5bf6476ae0c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "57756cd3-9009-4189-8cba-e2edba87554f": {
      "main": [
        [
          {
            "node": "03882650-9272-43c3-b1bc-15adae456881",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2957c6ad-5e7b-4692-a96f-5c4fb5b8203c": {
      "ai_memory": [
        [
          {
            "node": "03882650-9272-43c3-b1bc-15adae456881",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "9e8617f1-cd89-4de5-9d44-ded155779745": {
      "ai_tool": [
        [
          {
            "node": "03882650-9272-43c3-b1bc-15adae456881",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Support, Künstliche Intelligenz

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes10
Kategorie2
Node-Typen9
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34