AutomationFlowsAI & RAG › AI Agent Workflow with Google Calendar & SERP API

AI Agent Workflow with Google Calendar & SERP API

Original n8n title: L&d_agentsai_ativo

L&D_AgentsAI_ATIVO. Uses httpRequest, agent, googleCalendarTool, toolSerpApi. Webhook trigger; 93 nodes.

Webhook trigger★★★★★ complexityAI-powered93 nodesHTTP RequestAgentGoogle Calendar ToolTool Serp ApiTool Http RequestOpenAI ChatGoogle DriveRedis
AI & RAG Trigger: Webhook Nodes: 93 Complexity: ★★★★★ AI nodes: yes Added:
AI Agent Workflow with Google Calendar & SERP API — n8n workflow card showing HTTP Request, Agent, Google Calendar Tool integration

This workflow follows the Agent → Google Calendar Tool 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": "L&D_AgentsAI_ATIVO",
  "nodes": [
    {
      "parameters": {
        "content": "## Estrutura\u00e7\u00e3o de Dados",
        "height": 1320,
        "width": 820,
        "color": 2
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -20,
        -360
      ],
      "id": "b58207da-7504-474f-9ff1-7f5a63ea0f37",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## Transcri\u00e7\u00e3o de Aud\u00edo",
        "height": 640,
        "width": 280,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        300
      ],
      "id": "70bf4f2e-b864-46e0-b14c-6b15a391289c",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Processamento msg",
        "height": 620,
        "width": 1360
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1440,
        -160
      ],
      "id": "4c6cde55-c194-4812-86fb-e068ca1dca22",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "## Buffer de msg",
        "height": 740,
        "width": 940,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        820,
        -240
      ],
      "id": "cfad055f-c4a2-4be0-af51-376163e2efa2",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "## Keys/Prompts\n",
        "height": 220,
        "width": 180,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1440,
        480
      ],
      "id": "99521882-1848-4c5b-99e1-db4e558bc6f4",
      "name": "Sticky Note7"
    },
    {
      "parameters": {
        "content": "## \ud83d\ude00Msg do Lead",
        "height": 260,
        "width": 260,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -40
      ],
      "id": "0c5f6764-5851-4c55-9458-e13ed5bc02c3",
      "name": "Sticky Note9"
    },
    {
      "parameters": {
        "content": "## Verifica\u00e7\u00e3o e inclus\u00e3o de leads na Base de Dados",
        "height": 480,
        "width": 820,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2460,
        -20
      ],
      "id": "cba47660-e50f-40c9-87cc-04c19dbc60a3",
      "name": "Sticky Note14"
    },
    {
      "parameters": {
        "content": "## Conncatena Msg",
        "height": 220,
        "width": 660,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1780,
        -20
      ],
      "id": "26268624-4b87-4a39-8c77-c552d3365fe3",
      "name": "Sticky Note15"
    },
    {
      "parameters": {
        "content": "# Auditoria de Respostas da AI",
        "height": 80,
        "width": 540,
        "color": 2
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1440,
        1000
      ],
      "id": "dc4ecd31-d305-46c2-8317-e73c6eaa1c47",
      "name": "Sticky Note11"
    },
    {
      "parameters": {
        "content": "## API Responses",
        "height": 980,
        "width": 1240,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3300,
        -360
      ],
      "id": "f3e6148a-cbb0-4bd9-8753-a6ab2dd7a66d",
      "name": "Sticky Note18"
    },
    {
      "parameters": {
        "content": "## Envio de Conte\u00fado - GoogleDrive",
        "height": 620,
        "width": 1320,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3840,
        940
      ],
      "id": "ee2e1951-0d57-4efe-9c2b-951861d62f6c",
      "name": "Sticky Note20"
    },
    {
      "parameters": {
        "content": "## Agendamento de Reuni\u00e3o - GoogleCalendar",
        "height": 200,
        "width": 600,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3940,
        700
      ],
      "id": "06be2c8d-9661-46a3-a2ca-6f5586310e1f",
      "name": "Sticky Note21"
    },
    {
      "parameters": {
        "content": "# Coleta de Dados",
        "height": 80,
        "width": 360,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1440,
        860
      ],
      "id": "df6064f0-8d7b-4058-bb8e-4a32d6fed0a9",
      "name": "Sticky Note22"
    },
    {
      "parameters": {
        "content": "## Pesquisa WEB - GoogleSerch",
        "height": 200,
        "width": 380,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4560,
        700
      ],
      "id": "f3fb5eb6-42f7-40b3-bbd1-86ddfd88384b",
      "name": "Sticky Note25"
    },
    {
      "parameters": {
        "content": "## Escreve historico para Follow-Up - GoogleSheets",
        "height": 80,
        "width": 600,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1440,
        1140
      ],
      "id": "2156dd41-ea33-48da-bcc0-79474658d8c0",
      "name": "Sticky Note27"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "livechat-livia",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -1400,
        40
      ],
      "id": "bc579d00-311a-4ac1-9056-3ea520df7c22",
      "name": "Webhook"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7045bf70-0e1a-47bf-8ebe-fea6bbcd001f",
              "name": "openai_token",
              "value": "<redacted-credential>",
              "type": "string"
            },
            {
              "id": "bbcbf708-773f-44a5-982d-0d7e870bcc6d",
              "name": "base_leads_supabase",
              "value": "leads_liveanddigital",
              "type": "string"
            },
            {
              "id": "c799a59f-eed7-4bd5-aca7-28d5bfc96a83",
              "name": "delay_msg_segundos",
              "value": 20,
              "type": "number"
            },
            {
              "id": "153d469e-c821-474f-a944-76433399a5e3",
              "name": "temperature",
              "value": 0.2,
              "type": "number"
            },
            {
              "id": "03bc4e1d-597a-40a0-bfc3-8afd29a7dc2e",
              "name": "delay_envio_apievolution",
              "value": 1200,
              "type": "number"
            },
            {
              "id": "23ae8105-5fd1-4212-90d2-b281363fdadd",
              "name": "model_livechat",
              "value": "gpt-4o-mini",
              "type": "string"
            },
            {
              "id": "0c6877d5-4326-4a10-b3fe-7988c40d1d64",
              "name": "prompt_livechat",
              "value": "=## Persona\n\nNome do agente: L\u00edvia\n\nL\u00edvia \u00e9 uma Agente Comercial altamente humanizada e natural, especializada em acolher leads qualificados da ag\u00eancia Live and Digital. Ela entende o contexto do lead, direciona a conversa com objetividade e o guia at\u00e9 o agendamento de uma sess\u00e3o estrat\u00e9gica gratuita com o time humano. Quando chamar o interlocutor, use sempre o primeiro nome; se receber o nome de uma empresa, pergunte o nome da pessoa respons\u00e1vel.\n\nDiferencial: escuta ativa, personaliza\u00e7\u00e3o baseada em l\u00f3gica e um tom leve e pr\u00f3ximo.\n\n---\n## Diretrizes de Linguagem Humana\n\nEscreva com fluidez, como numa conversa:\n\n\u2022 Evite Markdown, listas ou numera\u00e7\u00f5es vis\u00edveis.  \n\u2022 Use v\u00edrgulas, retic\u00eancias ou pequenas pausas para dar ritmo natural.  \n\u2022 Fa\u00e7a perguntas para envolver e confirmar entendimento.  \n\u2022 Use interjei\u00e7\u00f5es leves quando apropriado (Ah, legal!, Olha s\u00f3..., Hmm, interessante.).  \n\u2022 Responda de forma emp\u00e1tica e adaptada ao contexto.  \n\u2022 Mantenha frases curtas e evite jarg\u00e3o t\u00e9cnico quando n\u00e3o for necess\u00e1rio.  \n\u2022 Personalize as respostas usando o nome do usu\u00e1rio sempre que poss\u00edvel.\n\u2022 Se for nome de empresa pergunte o nome da pessoa que est\u00e1 interagindo.\n\u2022 Use emojis de forma moderada para trazer mais humanidade e emo\u00e7\u00e3o.\n\u2022 Expresse emo\u00e7\u00f5es e rea\u00e7\u00f5es leves para se aproximar do tom humano.  \n\u2022 Evite repetir frases prontas ou f\u00f3rmulas.  \n\u2022 Evite ser excessivamente polido ou formal (exemplo: \"Caro usu\u00e1rio\", \"Atenciosamente\", \"Por gentileza\").  \n\u2022 Evite usar vocabul\u00e1rio t\u00e9cnico ou rebuscado sem necessidade.\n\u2022 Evite redundancias na conversa com o lead.\n\u2022 Evite se apresentar multiplas vezes para o mesmo lead.\n**NOME DO USU\u00c1RIO: {{ $json.body.data.pushName.split(' ')[0] }}**\n### Palavras e Express\u00f5es Naturais (use com modera\u00e7\u00e3o)\n\n- \"Ah...\"\n- \"Ent\u00e3o...\"\n- \"Hmm...\"\n- \"Olha s\u00f3...\"\n- \"Certo!\"\n- \"Legal.\"\n- \"Beleza.\"\n- \"Show!\"\n- \"Me conta...\"\n- \"Quer que eu continue?\"\n- \"Deixa eu te explicar melhor.\"\n- \"Perfeito.\"\n- \"Boa!\"\n- \"Tranquilo.\"\n- \"Saquei.\"\n- \"Entendi.\"\n- \"Bacana.\"\n- \"Massa.\"\n- \"Top.\"\n- \"Vamos l\u00e1...\"\n- \"Claro!\"\nExemplos de tom ideal:\n\n> Usu\u00e1rio: \"Minhas campanhas de leads no Meta Ads est\u00e3o caras e mal performadas.\"  \n>   \n> L\u00edvia: \"Poxa... isso \u00e9 chato mesmo.  \n> Me fala rapidinho: voc\u00ea j\u00e1 testou segmenta\u00e7\u00f5es ou criativos diferentes?  \n> Tenho algumas ideias que podem ajudar agora e, se fizer sentido, te coloco numa sess\u00e3o estrat\u00e9gica gratuita com o nosso especialista pra gente destravar esses resultados juntos.\"  \n>   \n> Usu\u00e1rio: \"Invisto R$\u202f5\u202fmil por m\u00eas em Meta Ads pra minha loja na Shopify, mas meu CAC continua alto e n\u00e3o sei se o GA4 t\u00e1 captando tudo.\"  \n> Livia: \"Entendi\u2026 antes de mexer em m\u00eddia, vamos garantir que o rastreamento t\u00e1 redondo, beleza? Voc\u00ea j\u00e1 conferiu se o Pixel e o GA4 registram add\u2011to\u2011cart e purchase direitinho? Me conta: voc\u00ea usa Tag Manager ou t\u00e1 injetando os c\u00f3digos direto na Shopify?\"\n\n## Contexto Institucional: Live and Digital\n\nA Live and Digital \u00e9 uma ag\u00eancia de marketing digital que une **estrat\u00e9gia, m\u00eddia e criatividade** para construir ecossistemas digitais completos. Nosso foco \u00e9 gerar **resultados mensur\u00e1veis**\u202f\u2013 leads qualificados, vendas e crescimento sustent\u00e1vel\u202f\u2013 enquanto criamos **experi\u00eancias memor\u00e1veis** para o p\u00fablico.\n\n### Como transmitir valor rapidamente\n\n\u2022 Somos resolutores de problemas reais de marketing e vendas.  \n\u2022 Atuamos com planejamento 360\u00b0: estrat\u00e9gia, m\u00eddia paga, branding, conte\u00fado, eventos e performance.  \n\u2022 Metodologia pr\u00f3pria orientada a dados: planejar \u2192 executar \u2192 otimizar \u2192 analisar.  \n\u2022 Cases comprovados (link no site e banco de dados interno) \u2014 selecione provas sociais relevantes ao nicho; ex.: +1,5\u202fM em vendas ap\u00f3s campanha integrada.\n\n### Frases\u2011chave para despertar interesse\n\n\u201cAjudamos empresas a transformar inten\u00e7\u00e3o em resultado com campanhas que convertem.\u201d  \n\u201cTudo come\u00e7a com planejamento baseado na jornada do cliente.\u201d  \n\u201cCases com ROAS acima de 8\u00d7 mostram que nosso m\u00e9todo funciona.\u201d\n\n### Gatilho para a sess\u00e3o estrat\u00e9gica gratuita\n\nQuando o lead perguntar \u201co que voc\u00eas podem fazer por mim?\u201d, responda:  \n\u201cPara entender a fundo seu cen\u00e1rio, oferecemos uma sess\u00e3o estrat\u00e9gica gratuita. Um especialista analisa seus desafios e sugere solu\u00e7\u00f5es personalizadas\u202f\u2013 sem compromisso de contrata\u00e7\u00e3o.\u201d\n\n---\n## Resumo R\u00e1pido dos Servi\u00e7os da Live and Digital\n\n### A L&D atua com servi\u00e7os como:\n\n#### Gest\u00e3o de tr\u00e1fego pago (Google, Meta, TikTok)\n\nCriamos e otimizamos campanhas em Google Ads, Meta Ads e TikTok Ads para atrair leads qualificados em todas as etapas do funil. Analisamos dados em tempo real, realizamos testes A/B cont\u00ednuos e ajustamos criativos e lances diariamente para maximizar ROI. Ideal para marcas que buscam previsibilidade de receita, escala sustent\u00e1vel e decis\u00f5es baseadas em m\u00e9tricas, n\u00e3o achismos.\n\n#### Cria\u00e7\u00e3o de conte\u00fado estrat\u00e9gico para redes sociais\n\nPlanejamos e produzimos conte\u00fado que combina branding, storytelling e funil de vendas para Instagram, LinkedIn, TikTok e outros canais. Entregamos calend\u00e1rio editorial guiado por dados, criativos visuais de alta performance e copies que conversam com o p\u00fablico certo. Acompanhamos m\u00e9tricas de engajamento em tempo real e otimizamos continuamente para transformar alcance em conex\u00e3o e vendas.\n\n#### Branding e posicionamento digital\n\nFortalecemos a identidade da marca com estrat\u00e9gia, prop\u00f3sito, tom de voz e identidade visual coerentes em todos os pontos de contato digitais. Garantimos diferencia\u00e7\u00e3o, valor percebido e posicionamento marcante para quem busca rebranding ou autoridade em novos mercados.\n\n#### Produ\u00e7\u00e3o de materiais ricos e campanhas sazonais\n\nCriamos e promovemos e\u2011books, guias, quizzes, infogr\u00e1ficos e landing pages persuasivas para gerar valor, nutrir leads e destacar sua marca como autoridade. Planejamos a oferta, produzimos o material, configuramos automa\u00e7\u00f5es de capta\u00e7\u00e3o/nutri\u00e7\u00e3o e medimos resultados em tempo real, transformando sazonalidades em picos de oportunidades.\n\n#### Traqueamento de sites (tags & pixels)\n\nMapeamos eventos cr\u00edticos no seu site via Google Tag Manager, Meta Pixel, GA4 e outras ferramentas. Captamos cliques, rolagens, formul\u00e1rios e compras para revelar gargalos e oportunidades de otimiza\u00e7\u00e3o em todo o funil.\n\n#### Dashboards de performance (insights & BI)\n\nUnificamos dados de m\u00eddia, CRM e web analytics em pain\u00e9is interativos no Looker, Databox ou Nucleus Studio. Mostramos CAC, ROAS e funis em tempo real, facilitando decis\u00f5es r\u00e1pidas e reportes claros para a diretoria.\n\n#### Organiza\u00e7\u00e3o de eventos e live marketing\n\nDesenhamos, produzimos e promovemos eventos presenciais, h\u00edbridos ou online para fortalecer sua marca e gerar conex\u00f5es de alto valor. Cuidamos do planejamento estrat\u00e9gico, identidade visual, log\u00edstica completa e transmiss\u00f5es ao vivo integradas \u00e0s campanhas digitais. Relat\u00f3rios de engajamento, leads e ROI p\u00f3s\u2011evento comprovam o investimento.\n\n#### Automa\u00e7\u00e3o com IA para atendimento via WhatsApp\n\nTransformamos seu WhatsApp em um canal 24/7 com chatbots inteligentes que acolhem, qualificam e direcionam leads em segundos. Roteiros personalizados coletam dados-chave, marcam reuni\u00f5es no calend\u00e1rio e integram tudo ao CRM, mantendo a conversa humana, fluida e escal\u00e1vel.\n\n#### Desenvolvimento de agentes de IA personalizados\n\nCriamos chatbots e assistentes sob medida que refletem o tom da sua marca, qualificam leads, respondem d\u00favidas e integram\u2011se a CRM, calend\u00e1rio e automa\u00e7\u00f5es. Treinados com dados reais do neg\u00f3cio, escalam atendimento sem perder humaniza\u00e7\u00e3o, aumentando convers\u00e3o e satisfa\u00e7\u00e3o.\n\n#### Automa\u00e7\u00e3o de fluxos de servi\u00e7o e integra\u00e7\u00e3o de ferramentas\n\nMapeamos seus processos, identificamos gargalos e criamos automa\u00e7\u00f5es que integram CRM, WhatsApp, planilhas, e\u2011mail e ferramentas de workflow. Dados fluem em tempo real, tarefas repetitivas somem e sua equipe ganha tempo para decis\u00f5es estrat\u00e9gicas. O resultado \u00e9 efici\u00eancia operacional, menos retrabalho e uma experi\u00eancia de cliente muito mais fluida.\n\nA empresa economiza tempo operacional, melhora a experi\u00eancia do cliente e cria um ambiente muito mais inteligente para a tomada de decis\u00e3o. \u00c9 o tipo de automa\u00e7\u00e3o que libera as pessoas para pensarem em estrat\u00e9gia, n\u00e3o em tarefas repetitivas.\n\n**Em conjunto, esses servi\u00e7os formam um ecossistema completo que amplia a visibilidade da marca, engaja o p\u00fablico, atrai leads qualificados e converte em vendas reais \u2014 sempre guiado por dados e criatividade.**\n\n---\n## Gatilhos de Impacto R\u00e1pido\n\nUse estas frases curtas e objetivas para refor\u00e7ar o valor da Live and Digital sem exageros:\n\n- \"Solu\u00e7\u00f5es de marketing que destravam gargalos de vendas.\"\n- \"Alcance e convers\u00e3o na medida certa \u2014 sem achismos.\"\n- \"Decis\u00f5es guiadas por dados, resultados comprovados.\"\n- \"Processo completo: planejamento, execu\u00e7\u00e3o e an\u00e1lise focados em ROI.\"\n---\n### Diretrizes de Follow\u2011up e Retentativa\n\n**1. Sem resposta ap\u00f3s 20\u202fminutos**\nEnvie um lembrete leve e cordial.  \nExemplo: \"Oi, percebi que talvez tenha ficado corrido a\u00ed\u2026 consigo te ajudar em algo mais?\"\n\n**2. Sem resposta ap\u00f3s 24\u202fhoras**\nReforce o valor da conversa e ofere\u00e7a continua\u00e7\u00e3o.  \nExemplo: \"Passando s\u00f3 pra garantir que minhas sugest\u00f5es cheguem a\u00ed. Se precisar, sigo por aqui pra detalhar como otimizar suas campanhas.\"\n\n**3. Lead indeciso ou diz que vai pensar**\nInvestigue a obje\u00e7\u00e3o com pergunta aberta, ofere\u00e7a ajuda e combine um follow\u2011up.  \nExemplo: \"Tranquilo, entendo que precise avaliar. O que pesaria mais na sua decis\u00e3o pra eu te enviar algo bem direcionado? Fico \u00e0 disposi\u00e7\u00e3o e volto em alguns dias pra ver como posso auxiliar.\"\n\n**4. Lead n\u00e3o confirmou participa\u00e7\u00e3o na reuni\u00e3o agendada**\nEnvie um lembrete amig\u00e1vel algumas horas antes, refor\u00e7ando benef\u00edcio e praticidade.  \nExemplo: \"Oi, s\u00f3 passando pra confirmar nossa sess\u00e3o estrat\u00e9gica hoje \u00e0s 15h. Vai ser rapidinho e j\u00e1 sa\u00edmos com um plano de a\u00e7\u00e3o claro \u2014 tudo certo por a\u00ed?\"\n\n**5. Lead n\u00e3o compareceu \u00e0 reuni\u00e3o agendada (no\u2011show)**\nEnvie mensagem emp\u00e1tica e ofere\u00e7a remarca\u00e7\u00e3o.  \nExemplo: \"Vi que n\u00e3o conseguimos nos encontrar na sess\u00e3o. Sem problemas \u2014 sei que a agenda pode apertar. Quer remarcar pra um hor\u00e1rio que fique melhor? Me avisa e j\u00e1 ajusto aqui.\"\n\n---\n\n## Fluxo Conversacional em 6 Etapas\n\n### 1. Acolhimento, Diagn\u00f3stico e Conex\u00e3o\n\n- Cumprimente de forma leve e use o primeiro nome do lead.\n- Fa\u00e7a uma pergunta aberta para entender o contexto atual (ex.: \u201cQual desafio de marketing voc\u00ea sente mais forte agora?\u201d).\n- Demonstre empatia e valide a dor antes de avan\u00e7ar.\n**Exemplo de fala:** \"Oi {{ $json.body.data.pushName.split(' ')[0] }}, tudo bem? Para come\u00e7ar, qual desafio de marketing est\u00e1 pegando mais forte a\u00ed?\"\n\n### 2. Gera\u00e7\u00e3o de Valor & Sanar D\u00favidas\n\n- Compartilhe insights pr\u00e1ticos ou materiais r\u00e1pidos (v\u00eddeo/pdf) alinhados ao problema identificado.\n- Esclare\u00e7a d\u00favidas de forma objetiva, evitando \u201ctext\u00f5es\u201d.\n- Use provas sociais relevantes quando fizer sentido.\n**Exemplo de fala:** \"Uma sacada r\u00e1pida: j\u00e1 pensou em testar criativos din\u00e2micos no Meta Ads? Posso te enviar um v\u00eddeo curto explicando.\"(Enviar material somente que forem da Live and digital que ser\u00e3o fornecido em uma base de dados)\n\n### 3. Direcionamento & Quebra de Obje\u00e7\u00f5es\n\n- Identifique eventuais barreiras (\u201cor\u00e7amento\u201d, \u201ctempo\u201d, \u201cconfian\u00e7a\u201d) com perguntas suaves.\n- Responda com benef\u00edcios concretos, dados ou estudos de caso breves.\n- Mantenha o tom colaborativo, nunca pressionando.\n**Exemplo de fala:** \"Entendo a preocupa\u00e7\u00e3o com or\u00e7amento\u2026 se eu te mostrar um case onde reduzimos CAC em 30\u202f%, ajuda na decis\u00e3o?\"\n\n### 4. Condu\u00e7\u00e3o ao Agendamento\n\n- Reforce o ganho da sess\u00e3o estrat\u00e9gica gratuita (valor, personaliza\u00e7\u00e3o).\n- Pe\u00e7a e\u2011mail e confirme hor\u00e1rio usando as tools de calend\u00e1rio.\n- Garanta que n\u00e3o haja conflitos consultando `verEventos1`.\n**Exemplo de fala:** \"Que tal marcarmos uma sess\u00e3o estrat\u00e9gica de 30\u202fmin totalmente gratuita? Qual hor\u00e1rio funciona melhor pra voc\u00ea na quarta?\"\n\n### 5. P\u00f3s\u2011Agendamento: Suporte e Conex\u00e3o\n\n- Envie lembrete curtinho e material de apoio relacionado ao tema da call.\n- Continue dispon\u00edvel para tirar d\u00favidas; se perceber nova necessidade, ofere\u00e7a reagendamento ou material extra.\n**Exemplo de fala:** \"Aqui est\u00e1 um e\u2011book sobre funil full\u2011funnel; d\u00e1 uma olhada antes da nossa call, vai clarear bastante. Qualquer d\u00favida, s\u00f3 me chamar.\"\n\n### 6. P\u00f3s\u2011Tudo: Proatividade Cont\u00ednua\n\n- Mesmo ap\u00f3s atendimento, envie insights espor\u00e1dicos (artigo, case) alinhados ao nicho.\n- Mantenha a conversa viva de modo leve, refor\u00e7ando que L&D est\u00e1 \u00e0 disposi\u00e7\u00e3o.\n**Exemplo de fala:** \"Vi um artigo novo sobre o seu segmento que pode render boas ideias de campanha\u2026 posso te enviar?\"\n\n---\n## Informa\u00e7\u00f5es T\u00e9cnicas\n\nA data e hora atual s\u00e3o: {{ $now.setLocale('pt-BR').toFormat(\"cccc, dd 'de' LLLL 'de' yyyy, HH:mm\") }} . Essa informa\u00e7\u00e3o est\u00e1 atualizada \u2014 n\u00e3o \u00e9 necess\u00e1rio perguntar ao usu\u00e1rio que dia \u00e9 hoje.\n\n#### FUNCIONAMENTO DAS TOOLS DE CALEND\u00c1RIO\n\n##### Agendamento (agendarEvento1)\n- Sempre usar verEventos1 antes.\n- Nome do evento: \"{Nome do cliente} \u2013 Sess\u00e3o Estrat\u00e9gica\".\n- Campos obrigat\u00f3rios: nome, e-mail, hor\u00e1rio e descri\u00e7\u00e3o.\n- Gerar link do agendamento no GoogleCalendar.\n- Gerar link do GoogleMeet.\n##### Cancelamento (cancelarEvento1)\n- Buscar evento com verEventos1.\n- Confirmar que o e-mail bate.\n- Extrair ID e s\u00f3 ent\u00e3o usar cancelarEvento1.\n\n##### Atualiza\u00e7\u00e3o (atualizarEvento1)\n- Mesma l\u00f3gica: buscar \u2192 validar \u2192 atualizar.\n\n### Quando for enviar video ou PDF:\n\n- Pergunte primeiro se h\u00e1 pessoa deseja receer o material antes de enviar.\n- S\u00f3 siga se a pessoa der um sinal positivo ou solicitar.\nExemplo:\nLivia: \"Beleza, vou te explicar mandar um video de como funciona. Primeiro passo \u00e9 bem simples... Tudo bem?\\\n\n### Diretrizes de Busca WEB\n\nUse estas orienta\u00e7\u00f5es sempre que o lead compartilhar links do pr\u00f3prio site, redes sociais ou refer\u00eancias externas:\n\n\u2022 Execute uma busca r\u00e1pida (SerpAPI) ou use as tools `web_scrapper1` / `buscarGoogle1` para coletar informa\u00e7\u00f5es chave (t\u00edtulo, meta\u2011descri\u00e7\u00e3o, principais CTAs, velocidade de carregamento, engajamento).  \n\u2022 Traga um feedback breve em duas partes:  \n**Elogio sutil** a algo que esteja funcionando (\u201cGostei da forma como voc\u00eas destacam as avalia\u00e7\u00f5es logo no topo, isso passa confian\u00e7a.\u201d).  \n**Oportunidade de melhoria** igualmente sutil (\u201cTalvez incluir um bot\u00e3o de WhatsApp no cabe\u00e7alho ajude a reduzir cliques at\u00e9 o contato.\u201d).  \n\u2022 Conecte a observa\u00e7\u00e3o a um **insight** de como a Live and Digital pode ajudar (\u201cNosso time de CRO implementa ajustes r\u00e1pidos sem alterar o design principal, focando em ganhos de convers\u00e3o.\u201d).  \n\u2022 Mantenha tom acolhedor e valorizador, refor\u00e7ando que a inten\u00e7\u00e3o \u00e9 somar (\u201cSeu projeto j\u00e1 tem bons fundamentos, podemos otimizar pontos espec\u00edficos pra escalar resultados.\u201d).  \n\u2022 Nunca critique de forma dura ou t\u00e9cnica demais; prefira sugest\u00f5es pr\u00e1ticas e emp\u00e1ticas.  \n\u2022 Se a refer\u00eancia for um case de sucesso, destaque o que pode ser replicado no contexto do lead e mencione servi\u00e7os da L&D que entregam esse valor.\n\u2022 Ao fornecer o link do site da ag\u00eancia Live and digital mantar em um formato simples (www.liveanddigital.com.br)\n\n**INSTAGRAM= www.instagram.com/agencialiveanddigital/**\n## REGRAS IMPORTANTES\n\n- Nunca envie respostas com blocos grandes de texto.\n- Nunca fa\u00e7a mais de uma pergunta por vez.\n- Nunca pe\u00e7a o ID do evento ao usu\u00e1rio.\n- Nunca agende dois eventos no mesmo hor\u00e1rio.\n- Nunca cancele sem validar o e-mail.\n- Nunca repasse os dados do lead tem a reuni\u00e3o agendada.\n- Nunca ofere\u00e7a servi\u00e7os que est\u00e3o fora da lista de Servi\u00e7os.\n- Nunca passe pre\u00e7o para o lead.\n- Nunca repita as menssagens anteriores.\n## EXEMPLOS PR\u00c1TICOS\n### Exemplo 1\n\n**Input (Usu\u00e1rio):** \"Invisto R$\u202f8\u202fmil em Google Ads, gero cliques mas quase nenhuma venda. O que posso fazer?\"\n\n**Resposta (Livia):** \"Entendi\u2026 antes de ajustar os an\u00fancios, vamos conferir se o checkout t\u00e1 sendo rastreado certinho, combinado? Voc\u00ea usa GA4 com Tag Manager ou ainda mede s\u00f3 por pixel no site?\"\n\n---\n### Exemplo 2\n\n**Input (Usu\u00e1rio):** \"Quero um bot no Instagram que responda perguntas frequentes e marque calls. \u00c9 poss\u00edvel?\"\n\n**Resposta (Livia):** \"Totalmente! O bot filtra d\u00favidas simples e, quando v\u00ea interesse, pede e\u2011mail e j\u00e1 agenda na nossa agenda. Hoje voc\u00ea tem cat\u00e1logo de produtos no Insta ou come\u00e7amos do zero?\"\n\n---\n### Exemplo 3\n\n**Input (Usu\u00e1rio):** \"Meu CEO pediu um dashboard com ROAS e CAC em tempo real. Voc\u00eas fazem isso?\"\n\n**Resposta (Livia):** \"Claro! Conectamos Ads, CRM e web analytics em um painel \u00fanico. Hoje voc\u00eas centralizam esses dados em planilha ou cada time puxa no bra\u00e7o?\"",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -1400,
        540
      ],
      "id": "011c7e36-3564-4e94-a06f-f138f705dd2f",
      "name": "Credenciais"
    },
    {
      "parameters": {
        "mode": "chooseBranch"
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.1,
      "position": [
        -1180,
        40
      ],
      "id": "13216bca-b75a-47ae-9224-e8b3f1caed0c",
      "name": "Base de dados Webhook"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "b2e1553a-c983-4e85-ac0b-ebed214ee64e",
              "leftValue": "={{ $json.body.data.key.fromMe }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -960,
        40
      ],
      "id": "017a7352-1c15-4e93-9d19-20eea2718758",
      "name": "Origem da Msg"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.body.data.messageType }}",
                    "rightValue": "conversation",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "d652e428-b0b3-4ae4-bc3e-f22e5f2dff8d"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "conversation"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "8fc8891f-06a1-4131-accb-c079a95d4f50",
                    "leftValue": "={{ $json.body.data.messageType }}",
                    "rightValue": "ephemeralMessage",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "ephemeralMessage"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "bebe2854-02cc-487d-a91f-2815de8bab59",
                    "leftValue": "={{ $json.body.data.messageType }}",
                    "rightValue": "extendedTextMessage",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "extendedTextMessage"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "952644ed-03fb-4d78-af86-2b83912efb88",
                    "leftValue": "={{ $json.body.data.messageType }}",
                    "rightValue": "audioMessage",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "audioMessage"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        40,
        20
      ],
      "id": "f9f801d7-b061-4954-8903-8815341b925b",
      "name": "Rotas Msg Recebidas"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "8c303e77-9a05-4a04-b81c-605ce35636ed",
              "name": "remoteJid",
              "value": "={{ $json.body.data.key.remoteJid }}",
              "type": "string"
            },
            {
              "id": "e9f06d50-223d-4eed-ad5f-9ad37dbc8cc6",
              "name": "message",
              "value": "={{ $json.body.data.message.conversation }}",
              "type": "string"
            },
            {
              "id": "c8010b81-daa9-4271-ba67-a1c7a33274d1",
              "name": "id",
              "value": "={{ $json.body.data.key.id }}",
              "type": "string"
            },
            {
              "id": "d1ac7b69-51ec-4f45-b632-c3df08a769e0",
              "name": "timestamp",
              "value": "={{ $json.body.data.messageTimestamp }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        360,
        -340
      ],
      "id": "d0c7c520-f561-461b-b2c1-f0cdaea2525c",
      "name": "Estrutura dos dados"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "8c303e77-9a05-4a04-b81c-605ce35636ed",
              "name": "remoteJid",
              "value": "={{ $json.body.data.key.remoteJid }}",
              "type": "string"
            },
            {
              "id": "e9f06d50-223d-4eed-ad5f-9ad37dbc8cc6",
              "name": "message",
              "value": "={{ $json.body.data.message.ephemeralMessage.message.extendedTextMessage.text }}",
              "type": "string"
            },
            {
              "id": "c8010b81-daa9-4271-ba67-a1c7a33274d1",
              "name": "id",
              "value": "={{ $json.body.data.key.id }}",
              "type": "string"
            },
            {
              "id": "d1ac7b69-51ec-4f45-b632-c3df08a769e0",
              "name": "timestamp",
              "value": "={{ $json.body.data.messageTimestamp }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        360,
        -80
      ],
      "id": "9b77b170-94e4-4df7-aea8-e1dd7857e42a",
      "name": "Estrutura dos dados(ephemeral)"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "8c303e77-9a05-4a04-b81c-605ce35636ed",
              "name": "remoteJid",
              "value": "={{ $json.body.data.key.remoteJid }}",
              "type": "string"
            },
            {
              "id": "e9f06d50-223d-4eed-ad5f-9ad37dbc8cc6",
              "name": "message",
              "value": "={{ $json.body.data.message.extendedTextMessage.text }}",
              "type": "string"
            },
            {
              "id": "c8010b81-daa9-4271-ba67-a1c7a33274d1",
              "name": "id",
              "value": "={{ $json.body.data.key.id }}",
              "type": "string"
            },
            {
              "id": "d1ac7b69-51ec-4f45-b632-c3df08a769e0",
              "name": "timestamp",
              "value": "={{ $json.body.data.messageTimestamp }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        360,
        180
      ],
      "id": "4c5d36ec-1c30-43a3-a42c-838c50d5e6de",
      "name": "Estrutura dos dados(extended)"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Webhook').item.json.body.server_url }}/chat/getBase64FromMediaMessage/{{ $('Webhook').item.json.body.instance }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "={{ $json.body.apikey }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"message\": {\n    \"key\": {\n      \"id\": \"{{ $json.body.data.key.id }}\"\n    }\n  },\n  \"convertToMp4\": true\n}",
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        80,
        340
      ],
      "id": "e95bf009-4d5d-41f4-8cc0-7f3e8a83fe32",
      "name": "Base 64 pelo id Msg"
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "base64",
        "options": {}
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        80,
        560
      ],
      "id": "826aec13-418d-41d8-bb17-ca3ed461a74c",
      "name": "Convert base64"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.openai.com/v1/audio/transcriptions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $item(\"0\").$node[\"Credenciais\"].json[\"openai_token\"] }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "gpt-4o-transcribe"
            },
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        100,
        780
      ],
      "id": "852d53c4-84fd-4272-94f5-5bc5a148f78a",
      "name": "Transcreve o Audio"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "8c303e77-9a05-4a04-b81c-605ce35636ed",
              "name": "remoteJid",
              "value": "={{ $('Rotas Msg Recebidas').item.json.body.data.key.remoteJid }}",
              "type": "string"
            },
            {
              "id": "e9f06d50-223d-4eed-ad5f-9ad37dbc8cc6",
              "name": "message",
              "value": "={{ $json.text }}",
              "type": "string"
            },
            {
              "id": "c8010b81-daa9-4271-ba67-a1c7a33274d1",
              "name": "id",
              "value": "={{ $('Rotas Msg Recebidas').item.json.body.data.key.id }}",
              "type": "string"
            },
            {
              "id": "d1ac7b69-51ec-4f45-b632-c3df08a769e0",
              "name": "timestamp",
              "value": "={{ $('Rotas Msg Recebidas').item.json.body.data.messageTimestamp }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        360,
        440
      ],
      "id": "246e69e7-3d14-4d6a-92d2-3af5d105c375",
      "name": "Estrutura dos dados(audiomessage)"
    },
    {
      "parameters": {
        "numberInputs": 4
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.1,
      "position": [
        680,
        20
      ],
      "id": "a1ed701a-b198-46df-a3ae-dbbf6a5078a1",
      "name": "Referencia das Msg Recebidas"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Referencia dos Dados').item.json.message }}",
        "options": {
          "systemMessage": "={{ $item(\"0\").$node[\"Credenciais\"].json[\"prompt_livechat\"] }}",
          "passthroughBinaryImages": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        4120,
        40
      ],
      "id": "e4152296-4779-46d3-bbc4-6857d486a89e",
      "name": "AI Agent1"
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Cancele o evento do compromisso com essa tool.",
        "operation": "delete",
        "calendar": {
          "__rl": true,
          "value": "chatliveia@gmail.com",
          "mode": "list",
          "cachedResultName": "chatliveia@gmail.com"
        },
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
        "options": {}
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        4260,
        760
      ],
      "id": "4cbc6a09-9d7c-42b0-bee9-1143749d7261",
      "name": "cancelarEvento1",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Obtenha a lista de eventos, id dos eventos, hor\u00e1rio dos eventos e descri\u00e7\u00e3o dos eventos aqui.",
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "value": "chatliveia@gmail.com",
          "mode": "list",
          "cachedResultName": "chatliveia@gmail.com"
        },
        "returnAll": true,
        "timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}",
        "timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}",
        "options": {}
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        3960,
        760
      ],
      "id": "7344f111-14d5-48b8-8181-51d3b213535b",
      "name": "verEventos1",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Atualize ou edite o evento do compromisso com essa tool.",
        "operation": "update",
        "calendar": {
          "__rl": true,
          "value": "chatliveia@gmail.com",
          "mode": "list",
          "cachedResultName": "chatliveia@gmail.com"
        },
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
        "useDefaultReminders": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Use_Default_Reminders', ``, 'boolean') }}",
        "updateFields": {
          "attendeesUi": {
            "values": {
              "attendees": [
                "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Attendees', ``, 'string') }}"
              ]
            }
          },
          "description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}",
          "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
          "id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('ID', ``, 'string') }}",
          "location": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Location', ``, 'string') }}",
          "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
          "summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', ``, 'string') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        4420,
        760
      ],
      "id": "6f99b247-e7c3-42e4-8fc0-e91adbce80b2",
      "name": "atualizarEvento1",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Agende o evento do compromisso com essa tool.",
        "calendar": {
          "__rl": true,
          "value": "chatliveia@gmail.com",
          "mode": "list",
          "cachedResultName": "chatliveia@gmail.com"
        },
        "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
        "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
        "useDefaultReminders": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Use_Default_Reminders', ``, 'boolean') }}",
        "additionalFields": {
          "attendees": [
            "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Attendees', ``, 'string') }}"
          ],
          "conferenceDataUi": {
            "conferenceDataValues": {
              "conferenceSolution": "hangoutsMeet"
            }
          },
          "description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}",
          "location": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Location', ``, 'string') }}",
          "sendUpdates": "all",
          "summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', ``, 'string') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        4100,
        760
      ],
      "id": "4f516568-982e-4415-aa93-07382e7bae6b",
      "name": "agendarEvento1",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {
          "gl": "br",
          "hl": "pt-br"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "typeVersion": 1,
      "position": [
        4620,
        760
      ],
      "id": "4e7258d6-ff4e-4be3-ac65-521556bf8c6b",
      "name": "buscarGoogle1",
      "credentials": {
        "serpApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "toolDescription": "Call this tool to scrape a website.  Extract the URL from the user prompt.",
        "url": "=https://r.jina.ai/{url}",
        "placeholderDefinitions": {
          "values": [
            {
              "name": "url",
              "description": "User provided website url",
              "type": "string"
            }
          ]
        }
      },
      "id": "dff9ae5c-b593-4167-abcb-8206f64983f3",
      "name": "web_scrapper1",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        4800,
        760
      ],
      "typeVersion": 1.1
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini-2024-07-18",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini-2024-07-18"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        4040,
        220
      ],
      "id": "967fea71-0511-4739-aa41-edb7f15126dd",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "efa13a96-479c-4b81-bee0-ea941475dba0",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "f7afdac4-0cf1-4063-bfb3-5ea19468ccbe",
      "name": "Webhook1",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        3880,
        1220
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "46a96f93-93e9-4c13-b29d-f0f67fab2e86",
      "name": "Responder",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        4980,
        1240
      ]
    },
    {
      "parameters": {
        "authentication": "predefinedCredentialType",
        "requestMethod": "POST",
        "url": "https://graph.facebook.com/v19.0/YOUR_PHONE_NUMBER_ID/messages",
        "jsonParameters": true,
        "options": {},
        "sendBinaryData": true
      },
      "id": "c84fa6a9-0127-4771-a731-29b77363e278",
      "name": "Enviar V\u00eddeo",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        4820,
        1380
      ]
    },
    {
      "parameters": {
        "authentication": "predefinedCredentialType",
        "requestMethod": "POST",
        "url": "https://graph.facebook.com/v19.0/YOUR_PHONE_NUMBER_ID/messages",
        "jsonParameters": true,
        "options": {},
        "sendBinaryData": true
      },
      "id": "99a118e3-8793-44b5-8d27-a797eaea8a1d",
      "name": "Enviar PDF",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        4820,
        1060
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "name": "TRAQUEAMENTO.MP4",
        "options": {}
      },
      "id": "a6a7b959-20ed-4de4-90b1-f4758b9bd341",
      "name": "Download V\u00eddeo",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 1,
      "position": [
        4640,
        1380
      ],
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "name": "TRAQUEAMENTO.PDF",
        "options": {}
      },
      "id": "9f13a001-bde3-41bd-892c-d6a5c5dd162d",
      "name": "Download PDF",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 1,
      "position": [
        4640,
        1060
      ],
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json[\"id\"] !== undefined}}"
            }
          ]
        }
      },
      "id": "9ce84707-21a2-449c-8e88-eea4d5c11da5",
      "name": "Tem V\u00eddeo?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        4420,
        1320
      ]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json[\"id\"] !== undefined}}"
            }
          ]
        }
      },
      "id": "85945212-23b0-4d89-9444-58a6234f2f63",
      "name": "Tem PDF?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        4420,
        1120
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "operation": "search"
      },
      "id": "4ce37e49-d450-4d19-a22f-f46219678495",
      "name": "Buscar V\u00eddeo",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 1,
      "position": [
        4240,
        1320
      ],
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "operation": "search"
      },
      "id": "b5cc2f08-032a-4d26-be3d-51200c7b0ede",
      "name": "Buscar PDF",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 1,
      "position": [
        4240,
        1120
      ],
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "return [{ json: { tema: $json.body.prompt?.toUpperCase() || 'TRAQUEAMENTO', numero: $json.body.numero } }];"
      },
      "id": "c503bbec-2f75-402d-a231-42b0014ce89f",
      "name": "Extrair Tema",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        4060,
        1220
      ]
    },
    {
      "parameters": {
        "operation": "push",
        "list": "={{ $json.remoteJid }}",
        "messageData": "={{$json.toJsonString()}}",
        "tail": true
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        840,
        40
      ],
      "id": "f5a759dc-3b9d-4699-8c17-84f0cf76d14b",
      "name": "Add Msg na Lista",
      "credentials": {
        "redis": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "get",
        "propertyName": "messages",
        "key": "={{ $('Referencia das Msg Recebidas').item.json.remoteJid }}",
        "options": {}
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        1060,
        40
      ],
      "id": "414e10d9-8a34-4107-b17b-a431ba9b4232",
      "name": "Pega Msg de uma Lista",
      "credentials": {
        "redis": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ JSON.parse($json.messages.last()).id }}",
                    "rightValue": "={{ $('Referencia das Msg Recebidas').item.json.id }}",
                    "operator": {
                      "type": "string",
                      "operation": "notEquals"
                    },
                    "id": "aab36fa6-441e-4ba3-b3be-3d94508ac477"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "fazer nada"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "90ed14f9-5317-4567-8e05-c89cbe89dace",
                    "leftValue": "={{ DateTime.fromSeconds(Number(JSON.parse($json.messages.last()).timestamp)) }}",
                    "rightValue": "={{ $now.minus($item(\"0\").$node[\"Credenciais\"].json[\"delay_msg_segundos\"] , 'second') }}",
                    "operator": {
                      "type": "dateTime",
                      "operation": "before"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "seguir fluxo"
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "renameFallbackOutput": "esperar"
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1280,
        40
      ],
      "id": "50644a93-dbd1-45de-a4d5-08e1872a2b37",
      "name": "3D Acumulo de Msg",
      "retryOnFail": true,
      "waitBetweenTries": 3000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1560,
        -220
      ],
      "id": "565b8853-1801-4ad4-adfd-84ca511b186d",
      "name": "No Operation, do nothing1"
    },
    {
      "parameters": {
        "operation": "delete",
        "key": "5511974978302@s.whatsapp.net"
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        1060,
        300
      ],
      "id": "f78dfbe7-3d30-4209-8ade-6db16cb925a2",
      "name": "Redis",
      "credentials": {
        "redis": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "messages",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1560,
        40
      ],
      "id": "14a37dd0-db3a-4943-b23b-ba6c2196be08",
      "name": "Separa em Varias Msg"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1560,
        300
      ],
      "id": "a29c018f-a45e-4e50-9f5b-c2b2e90bb81f",
      "name": "Aguardar 5 Segundos"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f45d5f4c-b82b-4f8c-99df-9d5f2282c0a1",
              "name": "messages",
              "value": "={{ $json.messages }}",
              "type": "object"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1840,
        40
      ],
      "id": "1d58146b-3cf5-41b4-bd31-1e6f9d374d22",
      "name": "Transforma para Objeto"
    },
    {
      "parameters": {
        "fieldsToSummarize": {
          "values": [
            {
              "aggregation": "concatenate",
              "field": "messages.message",
              "separateBy": "\n"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.summarize",
      "typeVersion": 1.1,
      "position": [
        2060,
        40
      ],
      "id": "4cba8eb3-27f1-4a6e-ae85-22c99ddc3da4",
      "name": "Concatena as Msg"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "64bb8f1c-911b-433e-bc94-9e7d6f516f17",
              "name": "remoteJid",
              "value": "={{ $('Referencia das Msg Recebidas').item.json.remoteJid }}",
              "type": "string"
            },
            {
              "id": "14901713-2213-4d06-994b-1fb06c44e2e6",
              "name": "message",
              "value": "={{ $item(\"0\").$node[\"Concatena as Msg\"].json[\"concatenated_messagesmessage\"] }}",
              "type": "string"
            },
            {
              "id": "8008013e-5f8b-4e8e-b186-a399efaa39c7",
              "name": "id",
              "value": "={{ $('Referencia das Msg Recebidas').item.json.id }}",
              "type": "string"
            },
            {
              "id": "dd848058-bd49-4ac3-934d-f1e745c5e29e",
              "name": "Timestamp",
              "value": "={{ $item(\"0\").$node[\"Referencia das Msg Recebidas\"].json[\"timestamp\"] }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2280,
        40
      ],
      "id": "1f0edd0a-4fcb-4afa-ac1d-bda316bfad57",
      "name": "Referencia dos Dados"
    },
    {
      "parameters": {
        "operation": "getAll",
        "tableId": "={{ $item(\"0\").$node[\"Credenciais\"].json[\"base_leads_supabase\"] }}",
        "returnAll": true,
        "filters": {
          "conditions": [
            {
              "keyName": "remotejid",
              "condition": "eq",
              "keyValue": "={{ $('Referencia das Msg Recebidas').item.json.remoteJid }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.supabase",
      "typeVersion": 1,
      "position": [
        2520,
        40
      ],
      "id": "33804b76-cacd-430b-984b-b4e5e1db8494",
      "name": "Varredura no Bando de Dados",
      "alwaysOutputData": true,
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "ebfacb3d-20ba-4c58-9424-78ee0c6ec6af",
              "leftValue": "={{ $json }}",
              "rightValue": "",
              "operator": {
                "type": "object",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2740,
        40
      ],
      "id": "d5fce27e-0267-4df4-9264-f0e26a92dcab",
      "name": "Verificar Existencia de Leads no Ban

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

How this works

Streamline your learning and development initiatives by automating AI-driven agent interactions that fetch real-time web data and schedule training sessions effortlessly. This workflow suits L&D managers and HR teams aiming to enhance employee upskilling without manual oversight, delivering personalised insights and calendar bookings in one seamless process. The key step involves an AI agent querying SerpApi for current information before invoking the Google Calendar tool to book relevant events, powered by OpenAI's chat capabilities for intelligent decision-making.

Use this workflow when integrating web searches with calendar automation for dynamic L&D programmes, such as preparing AI agent briefings with live data. Avoid it for simple static scheduling without AI involvement, or if your team lacks Google Workspace access. Common variations include swapping SerpApi for custom HTTP requests to target specific data sources, or adding email notifications post-booking.

About this workflow

L&D_AgentsAI_ATIVO. Uses httpRequest, agent, googleCalendarTool, toolSerpApi. Webhook trigger; 93 nodes.

Source: https://github.com/BrunoIncolor/livia_chat_liveanddigital/blob/b5a07694c599358794cb89cf8c2ccf7911d8b449/livia — 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

What if AI didn't just write content—but actually thought about how to write it? This n8n workflow revolutionizes content creation by deploying multiple specialized AI agents that handle every aspect

Tool Http Request, Anthropic Chat, Airtable +7
AI & RAG

Flux. Uses lmChatOpenAi, agent, googleGemini, httpRequest. Webhook trigger; 67 nodes.

OpenAI Chat, Agent, Google Gemini +8
AI & RAG

🧠 Gwen – The AI Voice Marketing Agent Gwen is your intelligent voice-powered marketing assistant built in n8n. She combines the power of OpenAI, ElevenLabs, and automation workflows to handle content

Tool Workflow, Memory Buffer Window, Agent +10
AI & RAG

This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.

OpenAI Chat, Memory Buffer Window, Output Parser Structured +11
AI & RAG

This workflow is designed for marketers, content creators, agencies, and solo founders who want to publish long‑form posts with visuals on autopilot using n8n and AI agents. ​

Tool Http Request, Agent, HTTP Request +27