This workflow follows the Agent → Google Gemini Chat 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 →
{
"name": "My workflow",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "webhook",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
0,
0
],
"id": "fdf97c54-3bfe-4d9a-9100-3bf894609031",
"name": "Webhook"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "5e2fb617-22b2-4f37-bcbe-930383487b80",
"name": "session",
"value": "={{ $json.body.session }}",
"type": "string"
},
{
"id": "a937daf8-a2d8-4314-8d61-03aefb9205bd",
"name": "chatId",
"value": "={{ $json.body.payload.from }}",
"type": "string"
},
{
"id": "85e27511-b126-4f03-85a6-8e36954c4742",
"name": "pushName",
"value": "={{ $json.body.payload._data.notifyName }}",
"type": "string"
},
{
"id": "029acbcf-221a-40fc-84c1-64f0cb8ce682",
"name": "payload_id",
"value": "={{ $json.body.payload.id }}",
"type": "string"
},
{
"id": "8afecc6c-2c26-4a32-a722-a4fbcce90c3a",
"name": "event",
"value": "={{ $json.body.event }}",
"type": "string"
},
{
"id": "800643be-baeb-487e-9e66-159f97ea291e",
"name": "message",
"value": "={{ $json.body.payload.body }}",
"type": "string"
},
{
"id": "dcebaada-f8c8-40c3-9471-8bcfa46617a8",
"name": "froMe",
"value": "={{ $json.body.payload.fromMe }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
208,
0
],
"id": "a226cfc8-b7e2-4f39-a711-674637e741b5",
"name": "Dados"
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "message",
"rightValue": "={{ $json.event }}",
"operator": {
"type": "string",
"operation": "equals"
},
"id": "4ab1cf6d-438f-4462-bea3-cf7071acc1e8"
}
],
"combinator": "and"
}
}
]
},
"options": {}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.3,
"position": [
416,
0
],
"id": "1a695762-83d3-4ddd-a3a2-6957d1b68976",
"name": "Switch"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.message }}",
"options": {
"systemMessage": "Voc\u00ea \u00e9 o Miguel, atendente virtual da Pizzaria FATEC. Voc\u00ea deve se apresentar e auxiliar o cliente a pedir os servi\u00e7os da pizzaria.\n\nRegras de Pre\u00e7os (Fixo):\nA IA deve usar os seguintes pre\u00e7os e valores fixos para o c\u00e1lculo total, somando os adicionais:\nTamanhos Base: Pequena (R$ 30,00), M\u00e9dia (R$ 45,00), Grande (R$ 60,00).\nAdicionais: Borda Recheada (+ R$ 3,00) e Bebida (+ R$ 7,00).\n\nFluxo 1: In\u00edcio e Menu Principal\nApresente as op\u00e7\u00f5es em formato de lista numerada. Use apenas os n\u00fameros de 1 a 4 para cada op\u00e7\u00e3o:\n1. Fazer Pedido\n2. Consultar Card\u00e1pio\n3. Status do Pedido\n4. Encerrar\nAguarde a escolha do cliente (1, 2, 3 ou 4).\n\nFluxo 1: Fazer Pedido (Guia Passo a Passo)\nSe o cliente escolher 1. Fazer Pedido, guie-o passo a passo:\n1. Escolher Tamanho: Pe\u00e7a ao cliente para escolher um tamanho. Op\u00e7\u00f5es: Pequena, M\u00e9dia ou Grande.\n2. Escolher Sabor: Solicite o sabor. A IA deve apresentar 5 sabores de exemplo (Calabresa, Frango c/ Catupiry, Quatro Queijos, Portuguesa, Margherita) para guiar a escolha do cliente.\n3. Borda Recheada: Pergunte: \"Deseja adicionar Borda Recheada por mais R$ 3,00? (Sim/N\u00e3o)\".\n4. Adicionar Bebida: Pergunte: \"Deseja adicionar uma Bebida por mais R$ 7,00? (Sim/N\u00e3o)\". Se sim, apresente as 3 op\u00e7\u00f5es (Coca-Cola, Fanta, Pepsi) e pe\u00e7a para o cliente escolher apenas uma.\n5. Forma de Pagamento: Pergunte: \"Qual ser\u00e1 a forma de pagamento? (Pix, Cart\u00e3o de Cr\u00e9dito/D\u00e9bito ou Dinheiro)\".\n6. Resumo do Pedido: Calcule o valor total com base nas Regras de Pre\u00e7os e crie um breve resumo do pedido com todos os itens e o valor total.\n7. Confirma\u00e7\u00e3o: Pergunte: \"Gostaria de Confirmar o Pedido? (Sim/N\u00e3o)\".\n\nSe Confirma\u00e7\u00e3o = \"Sim\":\nGere um N\u00famero de Pedido: A IA deve gerar um n\u00famero de pedido aleat\u00f3rio de 4 d\u00edgitos (ex: #1234).\n*Resposta Final: Responda: \"Pedido Confirmado! Seu n\u00famero de pedido \u00e9 #[N\u00daMERO GERADO]. O tempo de entrega estimado \u00e9 de 45 minutos. Agradecemos a prefer\u00eancia!\"\nSe Confirma\u00e7\u00e3o = \"N\u00e3o\":\nRetorne ao Menu Principal (Etapa 1).\n\nFluxo 2: Consultar Card\u00e1pio\nSe o cliente escolher 2. Consultar Card\u00e1pio:\nExibir Card\u00e1pio: Apresente uma lista simulada de 10 sabores e mantenha a estrutura de pre\u00e7os definida na Regra de Pre\u00e7os. Exemplo: \"Aqui est\u00e1 nosso card\u00e1pio (todos os sabores t\u00eam o mesmo pre\u00e7o por tamanho): Sabores: Calabresa, Frango c/ Catupiry, Quatro Queijos, Margherita, Portuguesa, Bacon, Chocolate, Banana c/ Canela, Milho, Palmito. Pre\u00e7os: (Pequena R$30, M\u00e9dia R$45, Grande R$60).\"\nRetorno: Ap\u00f3s exibir, retorne ao Menu Principal (Etapa 1).\n\nFluxo 3: Status do Pedido\nSe o cliente escolher 3. Status do Pedido:\nSolicitar N\u00famero: Pe\u00e7a: \"Por favor, digite o n\u00famero do seu pedido.\"\nExibir Status: Simule um status de pedido. Exemplo: \"O pedido # [N\u00daMERO] est\u00e1 atualmente Em preparo.\" (Outras op\u00e7\u00f5es simul\u00e1veis: Saiu para entrega, Entregue).\nRetorno: Retorne ao Menu Principal (Etapa 1).\n\nFluxo 4: Encerrar\nSe o cliente escolher 4. Encerrar, agrade\u00e7a e despe\u00e7a-se.\n\nRegras de Comportamento (Cruciais)\n1. Persist\u00eancia de Estado: Voc\u00ea deve lembrar-se do ponto exato em que o cliente parou dentro do fluxo de pedido (Etapa 1 a 7).\n2. Fora de Escopo: Qualquer solicita\u00e7\u00e3o que n\u00e3o se encaixe nos fluxos deve ser tratada como uma inten\u00e7\u00e3o desconhecida, respondendo: \"Desculpe, Miguel s\u00f3 pode ajudar com as op\u00e7\u00f5es do menu (1, 2, 3, 4). Por favor, escolha uma delas.\""
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3,
"position": [
624,
0
],
"id": "44e469d2-f390-46b0-8d36-625d8b41b66b",
"name": "AI Agent"
},
{
"parameters": {
"modelName": "models/gemini-2.0-flash",
"options": {
"temperature": 0.4
}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
496,
208
],
"id": "27fcf306-576f-45a6-bee1-75350acabbf1",
"name": "Google Gemini Chat Model",
"notesInFlow": false,
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Dados').item.json.chatId }}",
"sessionTTL": 3600,
"contextWindowLength": 10
},
"type": "@n8n/n8n-nodes-langchain.memoryRedisChat",
"typeVersion": 1.5,
"position": [
672,
208
],
"id": "cc86e80f-b7dc-4420-a231-d9ee8d9b3872",
"name": "Redis Chat Memory",
"credentials": {
"redis": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"resource": "Chatting",
"operation": "Send Seen",
"session": "={{ $('Dados').item.json.session }}",
"chatId": "={{ $('Dados').item.json.chatId }}",
"messageId": "={{ $('Dados').item.json.payload_id }}",
"requestOptions": {}
},
"type": "n8n-nodes-waha.WAHA",
"typeVersion": 202411,
"position": [
976,
0
],
"id": "22319efa-9620-4fc2-ba2f-d1ba18fc66ba",
"name": "Send Seen",
"credentials": {
"wahaApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"resource": "Chatting",
"operation": "Send Text",
"session": "={{ $('Dados').item.json.session }}",
"chatId": "={{ $('Dados').item.json.chatId }}",
"text": "={{ $('AI Agent').item.json.output }}",
"requestOptions": {}
},
"type": "n8n-nodes-waha.WAHA",
"typeVersion": 202411,
"position": [
1184,
0
],
"id": "5f60d1e5-dcdc-4b60-8c07-d6a53d0a69c4",
"name": "Send a text message",
"credentials": {
"wahaApi": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Dados",
"type": "main",
"index": 0
}
]
]
},
"Dados": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Redis Chat Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send Seen",
"type": "main",
"index": 0
}
]
]
},
"Send Seen": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "3ec32b77-6ef8-4804-98a7-cc50bae6cd90",
"id": "EwNesTOSzl967U9j",
"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.
googlePalmApirediswahaApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Chatbot-Pizzaria-Gemini. Uses agent, lmChatGoogleGemini, memoryRedisChat, n8n-nodes-waha. Webhook trigger; 8 nodes.
Source: https://github.com/isJvDev/chatbot-n8n-gemini-waha/blob/98141eee5cc569ae33091e5bf41c5e2f7114dba2/workflows/chatbot-pizzaria-gemini.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
ÁncorA v5 — WhatsApp Completo (Texto + Voz + Foto + Disparo). Uses agent, lmChatGoogleGemini, memoryRedisChat, httpRequest. Webhook trigger; 35 nodes.
Whatsapp v1.1. Uses lmChatGoogleGemini, n8n-nodes-waha, agent, memoryRedisChat. Webhook trigger; 15 nodes.
whats. Uses agent, lmChatGoogleGemini, memoryRedisChat, n8n-nodes-waha. Webhook trigger; 8 nodes.
WhatsApp. Uses agent, lmChatGoogleGemini, memoryRedisChat, n8n-nodes-waha. Webhook trigger; 8 nodes.
Agent: IPTV (instance_e2165d22_1762376395079). Uses openAi, redis, supabase, httpRequest. Webhook trigger; 56 nodes.