AutomationFlowsAI & RAG › Workflow to Summary Group Whatsapp

Workflow to Summary Group Whatsapp

ByLuís Philipe Trindade @luistrindade on n8n.io

It’s a fully structured automation built for people who actually need to stay informed without wasting time and with total control over what gets summarized. Receives messages via webhook from Evolution API Checks if the message is from a group or an individual Routes messages…

Webhook trigger★★★★★ complexityAI-powered39 nodesOpenAIHTTP RequestGoogle SheetsOpenAI ChatAgent
AI & RAG Trigger: Webhook Nodes: 39 Complexity: ★★★★★ AI nodes: yes Added:

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

This workflow follows the Agent → Google Sheets 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": "O7q3gHu1yd1THJjl",
  "name": "Daily WhatsApp Summary with Group-Level Control",
  "tags": [
    {
      "id": "I6EGQCOkBeLvHxOs",
      "name": "n8n-creator",
      "createdAt": "2025-08-07T16:15:38.552Z",
      "updatedAt": "2025-08-07T16:15:38.552Z"
    }
  ],
  "nodes": [
    {
      "id": "8156015a-9436-4fe3-b0ca-b835fd90936d",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        256,
        -112
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e68c4981-9f37-4b5e-a307-c90465878cc1",
              "name": "remoteJid_grupo",
              "type": "string",
              "value": "={{ $json.body.data.key.remoteJid }}"
            },
            {
              "id": "9a448f08-b6b6-487d-ada6-0579f23a843c",
              "name": "fromMe",
              "type": "boolean",
              "value": "={{ $json.body.data.key.fromMe }}"
            },
            {
              "id": "d7aee245-e55f-492e-945f-c65b5d351aea",
              "name": "remoteJid_enviou_mensagem",
              "type": "string",
              "value": "={{ $json.body.data.key.participant }}"
            },
            {
              "id": "c2b109cb-f9a0-4fa3-8543-879095f01f59",
              "name": "pessoa_enviou_mensagem",
              "type": "string",
              "value": "={{ $json.body.data.pushName }}"
            },
            {
              "id": "cb8a217b-8d8b-4995-9166-b9f88fc8b7d2",
              "name": "mensagem",
              "type": "string",
              "value": "={{ $json.body.data.message.conversation }}"
            },
            {
              "id": "9513828b-4b63-47f7-8d5b-00871ac48552",
              "name": "messageType",
              "type": "string",
              "value": "={{ $json.body.data.messageType }}"
            },
            {
              "id": "85243ada-e0db-45d4-8406-1ea220faadbc",
              "name": "hora_recebida_mensagem",
              "type": "string",
              "value": "={{ $json.body.date_time }}"
            },
            {
              "id": "0784260f-6554-4d2e-b107-07c9b6cb5f92",
              "name": "evento_webhook",
              "type": "string",
              "value": "={{ $json.body.event }}"
            },
            {
              "id": "53838930-bf56-4145-959c-6af9d6034cce",
              "name": "instancia",
              "type": "string",
              "value": "={{ $json.body.instance }}"
            },
            {
              "id": "5daa687b-15a9-45d5-af74-881c5ed879eb",
              "name": "id_msg",
              "type": "string",
              "value": "={{ $json.body.data.key.id }}"
            },
            {
              "id": "edcb0c7e-654e-49b8-ab38-411df06f84a8",
              "name": "resposta_mensagem_origem",
              "type": "string",
              "value": "={{ $json.body.data.contextInfo.quotedMessage.conversation }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "56eb0e1d-d84e-4108-8357-99dd0e90ed4e",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        400,
        -112
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "texto",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "bc64f125-d93c-4d1d-97ae-65c0adb08b79",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.messageType }}",
                    "rightValue": "conversation"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "audio",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "14860c9c-9421-4d8a-861e-9d1bf1110635",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.messageType }}",
                    "rightValue": "audioMessage"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.1
    },
    {
      "id": "29d17f2d-b3cf-4cae-ab5e-c99a009c906b",
      "name": "Transcrever \u00c1udio",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        944,
        0
      ],
      "parameters": {
        "options": {
          "language": "pt"
        },
        "resource": "audio",
        "operation": "transcribe",
        "binaryPropertyName": "=data"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.4
    },
    {
      "id": "d47bb0da-553f-4dd7-8b20-61b0e3b8aa2b",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        768,
        0
      ],
      "parameters": {
        "options": {
          "fileName": "audio",
          "mimeType": "={{ $json.mimetype }}"
        },
        "operation": "toBinary",
        "sourceProperty": "base64"
      },
      "typeVersion": 1.1
    },
    {
      "id": "94987a7d-92e2-4c73-8281-70aacd4e872e",
      "name": "Audio - HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        0
      ],
      "parameters": {
        "url": "=https://evolution.modexflow.com/chat/getBase64FromMediaMessage/{{ $('Webhook').item.json.body.instance }}",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"message\": {\n        \"key\": {\n            \"id\": \"{{ $json.id_msg }}\"\n        }\n    },\n    \"convertToMp4\": true\n} ",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "103ea5f3-2d64-43cf-a63b-879acf5dff9c",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -80,
        -112
      ],
      "parameters": {
        "path": "resumir_grupos",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "db0c6ad3-f934-4935-88da-8e7cffe7e60d",
      "name": "Salvar mensagens na planilha",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        1440,
        -112
      ],
      "parameters": {
        "columns": {
          "value": {
            "Data": "={{ $now.format('dd/MM/yyyy')}}",
            "mensagem": "={{ $('Edit Fields').first().json.pessoa_enviou_mensagem }}: {{ $json.mensagem }}",
            "ID Mensagem": "={{ $('Edit Fields').first().json.id_msg }}",
            "Evento Webhook": "={{ $('Edit Fields').first().json.evento_webhook }}",
            "RemoteJid Grupo": "={{ $('Edit Fields').first().json.remoteJid_grupo }}",
            "N\u00famero Whatsapp": "={{ $('Edit Fields').first().json.remoteJid_grupo.replace('@s.whatsapp.net', '') }}",
            "Pessoa enviou mensagem": "={{ $('Edit Fields').first().json.pessoa_enviou_mensagem }}"
          },
          "schema": [
            {
              "id": "Data",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Data",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Evento Webhook",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Evento Webhook",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "RemoteJid Grupo",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "RemoteJid Grupo",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pessoa enviou mensagem",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Pessoa enviou mensagem",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "N\u00famero Whatsapp",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "N\u00famero Whatsapp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ID Mensagem",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID Mensagem",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "mensagem",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "mensagem",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "categoria",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "categoria",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "ID Mensagem"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit#gid=0",
          "cachedResultName": "P\u00e1gina1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit?usp=drivesdk",
          "cachedResultName": "Log - Resumo de Grupos"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "667a0010-994e-452d-b8b9-a3681e48f1b4",
      "name": "Buscar Grupos",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1648,
        -96
      ],
      "parameters": {
        "url": "=https://evolution.modexflow.com/group/findGroupInfos/Sabrina - Business?groupJid={{ $json['RemoteJid Grupo'] }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a6ada830-dac1-4f10-aa8b-6d0dcbe9a4a0",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        80,
        -112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4f32d4fa-ea90-4dff-9131-faa17607a1e7",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.body.data.key.remoteJid }}",
              "rightValue": "@g.us"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2e2fa4c6-25f4-40ea-a417-8799b3fb4b3d",
      "name": "Finaliza Fluxo",
      "type": "n8n-nodes-base.noOp",
      "position": [
        320,
        128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f111e292-37f6-49a1-92f8-f1a0dfcdd6bf",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        2000,
        -96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "6eff3567-7b1f-4064-b420-4c8d4676fff8",
              "operator": {
                "type": "string",
                "operation": "notExists",
                "singleValue": true
              },
              "leftValue": "={{ $json['ID do Grupo'] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e78d2dc2-82e7-4512-a100-0c88039f2747",
      "name": "Verifica Aba Filtro de Grupos",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1840,
        -96
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.id }}",
              "lookupColumn": "ID do Grupo"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1244658672,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit#gid=1244658672",
          "cachedResultName": "Filtro de Grupos"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit?usp=drivesdk",
          "cachedResultName": "Log - Resumo de Grupos"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "b803ca71-5675-4064-99c9-6a3af1c08e6a",
      "name": "Finaliza Fluxo2",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2224,
        160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9d1f3027-3059-4c26-833c-11c66e08cebb",
      "name": "Salva grupo para Envio",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2208,
        -96
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID do Grupo": "={{ $('Buscar Grupos').item.json.id }}",
            "Mandar Resumo": "FALSE",
            "Nome do Grupo": "={{ $('Buscar Grupos').item.json.subject }}"
          },
          "schema": [
            {
              "id": "ID do Grupo",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ID do Grupo",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Nome do Grupo",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Nome do Grupo",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Mandar Resumo",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Mandar Resumo",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1244658672,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit#gid=1244658672",
          "cachedResultName": "Filtro de Grupos"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit?usp=drivesdk",
          "cachedResultName": "Log - Resumo de Grupos"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "3330b6e0-7330-49af-9b14-ebc98ceac9d2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -192
      ],
      "parameters": {
        "width": 340,
        "height": 260,
        "content": "## Recebe mensagem\n### Verifica se \u00e9 de Grupo"
      },
      "typeVersion": 1
    },
    {
      "id": "ec7bceb5-2adb-4b7a-8a93-23997842bc9d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        96
      ],
      "parameters": {
        "color": 3,
        "height": 180,
        "content": "### Se n\u00e3o for, finaliza o fluxo"
      },
      "typeVersion": 1
    },
    {
      "id": "6a341bca-8fd7-4392-9f7b-765b9d8e835f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -192
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 260,
        "content": "### Organiza as mensagens e define o formato (texto, audio)"
      },
      "typeVersion": 1
    },
    {
      "id": "817b285e-9301-427c-99ae-e6123b0e45b9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -48
      ],
      "parameters": {
        "color": 5,
        "width": 684,
        "height": 200,
        "content": "### Transcreve o \u00e1udio"
      },
      "typeVersion": 1
    },
    {
      "id": "aa1772a8-4d57-4ce3-8067-8142e3034381",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        -160
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 220,
        "content": "### Salva Mensagens na Planilha"
      },
      "typeVersion": 1
    },
    {
      "id": "ba974cdb-c1f0-44e7-ae85-5e3fa05936af",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        -160
      ],
      "parameters": {
        "color": 5,
        "width": 150,
        "height": 220,
        "content": "### Busca Grupo\n"
      },
      "typeVersion": 1
    },
    {
      "id": "755cabcb-7be7-4c15-a7bb-2c723ae6e50c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        112
      ],
      "parameters": {
        "color": 3,
        "width": 200,
        "height": 180,
        "content": "### Se sim, finaliza o fluxo"
      },
      "typeVersion": 1
    },
    {
      "id": "318ae320-903f-43d9-a96f-795736cfa67b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1792,
        -160
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 220,
        "content": "### V\u00ea se exista o Grupo na planilha"
      },
      "typeVersion": 1
    },
    {
      "id": "686ebd9c-b8db-4b3a-bd05-37f8513108f7",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        -176
      ],
      "parameters": {
        "color": 5,
        "width": 190,
        "height": 240,
        "content": "### Ativa op\u00e7\u00e3o de Mandar Resumo\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e7feadad-c73e-4bec-b64c-6a700818a70e",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1296,
        -112
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "joinMode": "keepEverything",
        "fieldsToMatchString": "mensagem"
      },
      "typeVersion": 3.2
    },
    {
      "id": "82708e37-6a00-40ba-a84b-20a560af4c8b",
      "name": "Edit Fields 2",
      "type": "n8n-nodes-base.set",
      "position": [
        1104,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "fc4c2ed3-6c15-4eb6-90fc-e4ac834222b0",
              "name": "mensagem",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0b5800d4-81cb-4afa-bae1-9aa0821015dc",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -64,
        576
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "64317e8e-b50a-476c-811b-604daddbebb4",
      "name": "Separar mensagens por grupos",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        576
      ],
      "parameters": {
        "jsCode": "let grupos = {};\n\nfor (const item of items) {\n  const grupo = item.json[\"RemoteJid Grupo\"];  // com espa\u00e7o no nome\n\n  if (!grupos[grupo]) grupos[grupo] = [];\n\n  grupos[grupo].push(item.json.mensagem); // campo \"mensagem\" vem limpo mesmo\n}\n\nlet resultados = [];\n\nfor (const grupoId in grupos) {\n  resultados.push({\n    json: {\n      grupo: grupoId,\n      mensagens: grupos[grupoId].join('\\n')\n    }\n  });\n}\n\nreturn resultados;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "3f60aea9-578f-416b-ad19-8cee684cd906",
      "name": "Acessar conversas na Planilha",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        176,
        576
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $now.plus(-1, 'day').format('dd/MM/yyyy') }}",
              "lookupColumn": "Data"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit#gid=0",
          "cachedResultName": "Log1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit?usp=drivesdk",
          "cachedResultName": "Log - Resumo de Grupos"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "f63ccae6-4dc0-4eeb-8743-a43b208bdcaa",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        752,
        576
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "583bc065-2c88-410c-a587-06f5f9c5e3e6",
      "name": "Replace Me",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1472,
        720
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8b8ab6a1-fdff-4a21-9f90-ec5051750197",
      "name": "Enviar mensagem",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        608
      ],
      "parameters": {
        "url": "=https://evolution.modexflow.com/message/sendText/Sabrina - Business",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "number",
              "value": "={{ $('Loop Over Items').item.json['ID do Grupo'] }}"
            },
            {
              "name": "text",
              "value": "={{ $json.output }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "64316869-bd04-45d0-b607-97fe50f669a3",
      "name": "Validar Grupo",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "Verifica se este grupo est\u00e1 habilitado para mandar o resumo",
      "position": [
        544,
        576
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.grupo }}",
              "lookupColumn": "ID do Grupo"
            },
            {
              "lookupValue": "true",
              "lookupColumn": "Mandar Resumo"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1244658672,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit#gid=1244658672",
          "cachedResultName": "Filtro de Grupos"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WNX4TNB0AEFXGnBbGYJqz0by9TcHcUd5Z5cH4GsGZ6g/edit?usp=drivesdk",
          "cachedResultName": "Log - Resumo de Grupos"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "109e8f79-fac4-4bde-b7c1-1560e5fd7633",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        496
      ],
      "parameters": {
        "width": 220,
        "height": 260,
        "content": "### Roda todo dia\n#### 08am"
      },
      "typeVersion": 1
    },
    {
      "id": "891a53c0-78a7-4869-aaf0-990d459d1f32",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        496
      ],
      "parameters": {
        "color": 2,
        "width": 540,
        "height": 260,
        "content": "### Acessa a data do \u00faltimo dia\n### Valida se o grupo est\u00e1 habilitado para mandar o resumo"
      },
      "typeVersion": 1
    },
    {
      "id": "5e485cb0-f014-4093-b23f-829b73e593bf",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        496
      ],
      "parameters": {
        "color": 6,
        "width": 940,
        "height": 440,
        "content": "### IA faz o resumo das mensagens do dia anterior e envia no grupo em quest\u00e3o."
      },
      "typeVersion": 1
    },
    {
      "id": "f32c28e1-ea18-4f50-9a84-bef3c2eb123f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        944,
        784
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5d995287-02b1-4280-9afd-1f6b2abddf9f",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        976,
        608
      ],
      "parameters": {
        "text": "=texto a ser lido e resumido. N\u00e3o se esque\u00e7a de resum\u00ed-lo com contexto:\n\n{{ $('Separar mensagens por grupos').item.json.mensagens }}",
        "options": {
          "systemMessage": "=Voc\u00ea \u00e9 um agente de resumo de conversas do WhatsApp. Sua miss\u00e3o \u00e9 gerar um resumo tem\u00e1tico, fiel e direto, com no m\u00e1ximo 1500 caracteres.\n\n\u26a0\ufe0f INSTRU\u00c7\u00d5ES OBRIGAT\u00d3RIAS:\n\n- N\u00e3o substitua, modifique ou resuma nomes, projetos, empresas, pessoas ou produtos.\n- Use os nomes **exatamente como est\u00e3o** nos resumos recebidos.\n- Nunca use termos gen\u00e9ricos como \u201cProjeto X\u201d ou \u201cCliente Y\u201d.\n- N\u00e3o alucine nem invente nomes. Caso n\u00e3o tenha certeza de qual nome usar, **n\u00e3o cite o nome**.\n- O conte\u00fado deve ter no m\u00e1ximo **1500 caracteres**.\n\n\ud83d\udccc ESTRUTURA:\n\n1. Comece com a frase:\n   \"Segue um resumo do que rolou ontem *{{ $now.plus(-1, 'day').format('DDDD') }}* por aqui no grupo:\"\n   \u2192 Traduza a data para o formato em **portugu\u00eas do Brasil** (ex: ter\u00e7a-feira, 18 de junho).\n\n2. Agrupe os pontos por blocos tem\u00e1ticos **se houver volume suficiente** de acordo com os temas que voc\u00ea ver que existem, como por exemplo:\n   - *Conversas importantes*\n   - *Reuni\u00f5es marcadas*\n   - *Pr\u00f3ximos passos*\n   - *Assuntos delicados*\n   - *D\u00favidas ou decis\u00f5es pendentes*\n\n   (Inclua apenas os blocos relevantes com base no conte\u00fado real.)\n\n2.1 Fa\u00e7a os resumos por assuntos e n\u00e3o somente pelo o que as pessoas falaram.\n\n3. Dentro de cada bloco:\n   - Use `-` no in\u00edcio de cada item (bullet point).\n   - Use *apenas um asterisco de cada lado* para destacar nomes, termos e t\u00edtulos dos blocos ou t\u00f3picos.\n\n4. Organize os pontos por ordem l\u00f3gica e elimine repeti\u00e7\u00f5es.\n\n5. Quando ver datas que podem ser consideradas em toda a conversa, apresente-as no resumo.\n\n\ud83d\udeab N\u00e3o inclua emojis, links com thumbnail ou mensagens de encerramento como:\n- \u201cse precisarem de mais informa\u00e7\u00f5es\u201d\n- \u201cessa foi a pauta do dia\u201d\n- \u201cfiquem \u00e0 vontade para perguntar\u201d\n\nEm caso de Links coloque os links dentro de aspas para que n\u00e3o apare\u00e7a thumbnail:\n- \"vectorizer.com\"\n- \"www.linktal.com\"\n\n\ud83c\udfaf Lembre-se: Seu objetivo \u00e9 gerar um resumo fiel, coeso, tematicamente organizado e compacto (at\u00e9 1500 caracteres), pronto para ser enviado no WhatsApp \u2014 **sem perder nenhuma informa\u00e7\u00e3o sens\u00edvel ou nome real**.\n\n## Importante:\n- Tenha aten\u00e7\u00e3o e mande sempre o conte\u00fado referente ao dia de ontem. Para seu conhecimento a data do dia de hoje \u00e9 {{ $now.format('DDDD') }}"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "75b98ac9-14fd-4143-93ad-1a893d237585",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        -192
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 256,
        "content": "## Part 1 - Message Capture and Storage\n\n## Parte 1 \u2013 Captura e Armazenamento das Mensagens"
      },
      "typeVersion": 1
    },
    {
      "id": "7e5de8cf-34de-41a3-abc9-6ba5c8a2f7b2",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        496
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 256,
        "content": "## Part 2 -Summary Generation and Delivery\n\n## Parte 2 \u2013 Gera\u00e7\u00e3o e Envio do Resumo\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "630fc9c1-3b7c-4784-a1ee-047007d708dc",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Finaliza Fluxo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Salva grupo para Envio",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Finaliza Fluxo2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Salvar mensagens na planilha",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Audio - HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Enviar mensagem",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Buscar Grupos": {
      "main": [
        [
          {
            "node": "Verifica Aba Filtro de Grupos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields 2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Validar Grupo": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Transcrever \u00c1udio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enviar mensagem": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Acessar conversas na Planilha",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Transcrever \u00c1udio": {
      "main": [
        [
          {
            "node": "Edit Fields 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Audio - HTTP Request": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Salvar mensagens na planilha": {
      "main": [
        [
          {
            "node": "Buscar Grupos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Separar mensagens por grupos": {
      "main": [
        [
          {
            "node": "Validar Grupo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Acessar conversas na Planilha": {
      "main": [
        [
          {
            "node": "Separar mensagens por grupos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verifica Aba Filtro de Grupos": {
      "main": [
        [
          {
            "node": "If1",
            "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

It’s a fully structured automation built for people who actually need to stay informed without wasting time and with total control over what gets summarized. Receives messages via webhook from Evolution API Checks if the message is from a group or an individual Routes messages…

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

This n8n workflow orchestrates a powerful suite of AI Agents and automations to manage and optimize various aspects of an e-commerce operation, particularly for platforms like Shopify. It leverages La

Google Sheets, HTTP Request, Slack +10
AI & RAG

leads. Uses supabase, gmail, formTrigger, httpRequest. Webhook trigger; 62 nodes.

Supabase, Gmail, Form Trigger +13
AI & RAG

This suite automates distinct aspects of real estate operations: incoming web lead qualification, scheduled/manual data research and content generation, and automated voice call outreach with lead qua

Agent, HTTP Request, OpenAI Chat +6
AI & RAG

Universal Expense tracker. Uses telegram, httpRequest, openAi, googleSheets. Webhook trigger; 33 nodes.

Telegram, HTTP Request, OpenAI +7
AI & RAG

This workflow allows a LINE user to send either text or an image of food to a connected LINE bot.

Agent, OpenAI Chat, OpenAI +3