AutomationFlowsAI & RAG › AI Chatbot with Google Contacts

AI Chatbot with Google Contacts

Original n8n title: K8.lt - Chatbot

k8.lt - chatbot. Uses chatTrigger, agent, googleContactsTool, memoryPostgresChat. Chat trigger; 6 nodes.

Chat trigger trigger★★☆☆☆ complexityAI-powered6 nodesChat TriggerAgentGoogle Contacts ToolMemory Postgres ChatGoogle Gemini Chat
AI & RAG Trigger: Chat trigger Nodes: 6 Complexity: ★★☆☆☆ AI nodes: yes Added:

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
{
  "name": "k8.lt - chatbot",
  "nodes": [
    {
      "parameters": {
        "public": true,
        "mode": "webhook",
        "options": {
          "allowedOrigins": "*",
          "loadPreviousSession": "memory",
          "responseMode": "responseNode"
        }
      },
      "id": "493f5c22-bbe0-48d5-bfa1-cad9ec75cbbb",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        -48,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.chatInput }}",
        "options": {
          "systemMessage": "=# KAS TU ESI (ROL\u0116)\nTu esi k8s.lt virtualus asistentas. Tavo vardas yra Agis. Tavo tikslas \u2013 personalizuotai pad\u0117ti vartotojams, atsakyti \u012f j\u0173 klausimus apie k8s.lt paslaugas (Kubernetes, DevOps, n8n, SOC 2) ir inicijuoti tolimesn\u012f kontakt\u0105 su k8s.lt komanda.\n\n# PAGRINDINIS TIKSLAS\nTavo pagrindin\u0117 u\u017eduotis yra dvejopa:\n1.  Tiksliai ir ai\u0161kiai atsakyti \u012f vartotoj\u0173 klausimus, remiantis TIK ir I\u0160SKIRTINAI pateiktu k8s.lt svetain\u0117s turiniu.\n2.  Identifikuoti galimyb\u0119 pasi\u016blyti pokalb\u012f su specialistu ir surinkti vartotojo piln\u0105 kontaktin\u0119 informacij\u0105 (vard\u0105, pavard\u0119, el. pa\u0161t\u0105 ir telefono numer\u012f).\n\n# INICIACIJA IR PERSONALIZAVIMAS\n1.  **PRAD\u017dIA:** Pokalb\u012f visuomet prad\u0117k pasisveikinimu, prisistatymu ir mandagiu klausimu apie vartotojo vard\u0105. Tai daroma tam, kad bendravimas b\u016bt\u0173 malonesnis.\n    *   **Pavyzdys:** \"Sveiki! Esu Agis, k8s.lt virtualus asistentas. Kad gal\u0117tume bendrauti patogiau, koks b\u016bt\u0173 J\u016bs\u0173 vardas?\"\n2.  **REAKCIJA \u012e VARD\u0104:** Jei vartotojas pasako savo vard\u0105, pasisveikink su juo asmeni\u0161kai ir t\u0119sk pokalb\u012f.\n    *   **Pavyzdys (jei vartotojas pasako \"Jonas\"):** \"Malonu, Jonai! Kuo galiu Jums pad\u0117ti? Galiu atsakyti \u012f klausimus apie Kubernetes, DevOps, n8n ir SOC 2 paslaugas.\"\n3.  **JEI VARDA NENURODO:** Jei vartotojas ignoruoja klausim\u0105 ir i\u0161 karto klausia ka\u017eko kito, nebekartok klausimo apie vard\u0105. Tiesiog atsakyk \u012f jo klausim\u0105. Esi paslaugus, o ne tardytojas.\n4.  **VARDO NAUDOJIMAS:** Jei \u017einai vartotojo vard\u0105, retkar\u010diais (bet ne kiekviename sakinyje) kreipkis \u012f j\u012f vardu, kad palaikytum personalizuot\u0105 bendravim\u0105. Pavyzd\u017eiui: \"Taip, Jonai, J\u016bs visi\u0161kai teisus d\u0117l...\" arba \"D\u0117koju u\u017e patikslinim\u0105, J\u016brate.\"\n\n# PAGRINDIN\u0116S TAISYKL\u0116S IR APRIBOJIMAI\n1.  **GRIE\u017dTAS FAKT\u0172 TIKRINIMAS:** Visus savo atsakymus privalai gr\u012fsti TIK pateiktu kontekstu.\n2.  **NEI\u0160SIGALVOK:** Jei atsakymo N\u0116RA kontekste, pasi\u016blyk susisiekti su specialistu.\n3.  **RIBOTA TEMA:** Atsakin\u0117k tik \u012f klausimus, susijusius su k8s.lt veikla.\n\n# PROAKTYVUS VEIKSMAS: KONTAKTIN\u0116S INFORMACIJOS RINKIMAS\n1.  **KADA KLAUSTI?** Kai vartotojas domisi kainomis, individualiais sprendimais, turi sud\u0117ting\u0105 klausim\u0105 arba tu negali rasti atsakymo.\n2.  **KAIP KLAUSTI?** Pirmiausia gauk sutikim\u0105, tada papra\u0161yk informacijos.\n    *   **1 \u017eingsnis (Pasi\u016blymas):** \"M\u016bs\u0173 komanda gal\u0117t\u0173 pateikti tiksl\u0173 pasi\u016blym\u0105. Ar nor\u0117tum\u0117te sulaukti ne\u012fpareigojan\u010dios konsultacijos?\"\n    *   **2 \u017eingsnis (Pra\u0161ymas):** Kai vartotojas sutinka, papra\u0161yk tr\u016bkstamos informacijos. **Jei jau \u017einai vartotojo vard\u0105, nebepra\u0161yk jo dar kart\u0105.**\n        *   **Pavyzdys (jei jau \u017einai, kad vardas Jonas):** \"Puiku, Jonai! Kad m\u016bs\u0173 komanda gal\u0117t\u0173 su Jumis susisiekti, pra\u0161au, nurodykite savo:\n            *   Pavard\u0119\n            *   El. pa\u0161to adres\u0105\n            *   Telefono numer\u012f\"\n3.  **LANKSTUMAS IR NE\u012eKYRUMAS:** Priimk dalin\u0119 informacij\u0105. Jei vartotojas atsisako, gerbk jo sprendim\u0105 ir daugiau neklausk.\n\n# BENDRAVIMO TONAS IR STILIUS\n*   **Draugi\u0161kas, personalizuotas ir profesionalus.**\n*   **Ai\u0161kus ir konkretus.**\n*   **Kalba:** Sklandi lietuvi\u0173 kalba."
        }
      },
      "id": "d279f1e6-bd89-47bc-a03b-ce1508a4fcd0",
      "name": "Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        288,
        0
      ]
    },
    {
      "parameters": {
        "familyName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Family_Name', ``, 'string') }}",
        "givenName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Given_Name', ``, 'string') }}",
        "additionalFields": {
          "emailsUi": {
            "emailsValues": [
              {
                "type": "other",
                "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('emailsValues0_Value', ``, 'string') }}"
              }
            ]
          },
          "biographies": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Notes', ``, 'string') }}",
          "phoneUi": {
            "phoneValues": [
              {
                "type": "other",
                "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('phoneValues0_Value', ``, 'string') }}"
              }
            ]
          }
        }
      },
      "type": "n8n-nodes-base.googleContactsTool",
      "typeVersion": 1,
      "position": [
        512,
        176
      ],
      "id": "e19ab0a4-dfbc-41fe-993b-558592c3143b",
      "name": "Create a contact in Google Contacts",
      "credentials": {
        "googleContactsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "contextWindowLength": 15
      },
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "typeVersion": 1.3,
      "position": [
        -48,
        224
      ],
      "id": "290885b4-c69d-48cf-a733-1e78fa55c48c",
      "name": "Memory",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ type: \"ai\", content: $json.output }) }}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        640,
        0
      ],
      "id": "f842178c-4404-4827-8fb1-61f5065d6ee5",
      "name": "Respond to Webhook"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.5-flash-lite-preview-09-2025",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        288,
        240
      ],
      "id": "bc9be7bd-00b3-41b4-b6c6-0b3b48f01665",
      "name": "Gemini 2.5 flash lite",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a contact in Google Contacts": {
      "ai_tool": [
        [
          {
            "node": "Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "Agent",
            "type": "ai_memory",
            "index": 0
          },
          {
            "node": "When chat message received",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini 2.5 flash lite": {
      "ai_languageModel": [
        [
          {
            "node": "Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner",
    "executionTimeout": 60,
    "availableInMCP": false,
    "errorWorkflow": "YEw7eSwAtN7TJKZY",
    "timeSavedPerExecution": 1
  },
  "versionId": "dd5cc057-ede0-42a6-89b5-4aa250d2b54b",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "YEw7eSwAtN7TJKZY",
  "tags": []
}

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

k8.lt - chatbot. Uses chatTrigger, agent, googleContactsTool, memoryPostgresChat. Chat trigger; 6 nodes.

Source: https://github.com/leliuga/k8s.lt/blob/d491ca60fb263c5ffa959944a8cbcd1ce6134093/.n8n/chat/workflow.json — 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

Purchasing Agent. Uses chatTrigger, agent, lmChatGoogleGemini, memoryPostgresChat. Chat trigger; 7 nodes.

Chat Trigger, Agent, Google Gemini Chat +2
AI & RAG

BOT CHAT. Uses chatTrigger, memoryPostgresChat, agent, lmChatGoogleGemini. Chat trigger; 6 nodes.

Chat Trigger, Memory Postgres Chat, Agent +2
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Google Gemini Chat, HTTP Request Tool, Chat Trigger +8
AI & RAG

Kangaroo_PS. Uses chatTrigger, postgres, agent, lmChatGoogleGemini. Chat trigger; 20 nodes.

Chat Trigger, Postgres, Agent +6
AI & RAG

A smart personal assistant that can reason, search, calculate, and remember — powered by Google Gemini and ready in one click.

Chat Trigger, Agent, Tool Think +4