fluxo de agendamento com cal.com

integraçao po web hook por outra planatforma para criar agendamentos com o cal.com

Você precisa estar autenticado para ter acesso aos arquivos. Faça o login.

Cadastre-se

Compartilhado por
jhonatancamargo
Compartilhado em
2024-09-28 15:54:13
Descrição
integraçao po web hook por outra planatforma para criar agendamentos com o cal.com
Nível de Acesso
Arquivo Gratuito

Sobre este Arquivo

{ "name": "My workflow", "nodes": [ { "parameters": { "url": "https://api.cal.com/v1/slots?", "authentication": "genericCredentialType", "genericAuthType": "httpQueryAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "startTime", "value": "={{ $('Webhook').item.json.query.data.toDateTime().minus(2, 'days').format('yyyy-MM-dd') }}" }, { "name": "endTime", "value": "={{ $('Webhook').item.json.query.data.toDateTime().plus(2, 'days').format('yyyy-MM-dd') }}" }, { "name": "eventTypeId", "value": "1190364" } ] }, "options": {} }, "id": "af7ab929-5975-4505-ab42-66867a4df802", "name": "HTTP Request", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 140, 200 ], "credentials": { "httpQueryAuth": { "id": "3HGeDDDYPLyFTGnM", "name": "Api cal.com" } } }, { "parameters": { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict", "version": 2 }, "conditions": [ { "id": "8f104401-cb37-4be9-909f-79f3933af743", "leftValue": "={{ $json.slots[$('Webhook').item.json.query.data.toDateTime().format('yyyy-MM-dd')].map(item => item.time.toDateTime().toLocal().format('HH:mm')).filter(item => item === $('Webhook').item.json.query.data.toDateTime().format('HH:mm')) }}\n", "rightValue": false, "operator": { "type": "array", "operation": "empty", "singleValue": true } } ], "combinator": "and" }, "options": {} }, "id": "4d988dfb-8274-47c5-80a3-6fc554ee3209", "name": "If", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ 420, 200 ] }, { "parameters": { "url": "https://api.cal.com/v1/bookings", "authentication": "genericCredentialType", "genericAuthType": "httpQueryAuth", "options": {} }, "id": "4a2c259b-209b-4699-b349-3285fab0ca6d", "name": "HTTP Request1", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 720, 140 ], "credentials": { "httpQueryAuth": { "id": "3HGeDDDYPLyFTGnM", "name": "Api cal.com" } } }, { "parameters": { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict", "version": 2 }, "conditions": [ { "id": "20e71231-0957-4373-bf8c-0282dbb7925b", "leftValue": "={{ $json.bookings.filter(item => item.startTime.toDateTime().toLOcal().format('dd/MM/yyyy HH:mm') === $('Webhook').item.json.toDateTime().format('dd/MM/yyyy HH:mm')) }}", "rightValue": "", "operator": { "type": "array", "operation": "notEmpty", "singleValue": true } } ], "combinator": "and" }, "options": {} }, "id": "e8fb0ec2-dd49-44ab-9833-27ab467e170e", "name": "If1", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ 1000, 140 ] }, { "parameters": { "method": "POST", "url": "https://api.cal.com/v1/bookings", "authentication": "genericCredentialType", "genericAuthType": "httpQueryAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={\n "eventTypeId": '1190364'\n "start" : {{ $('Webhook').item.json.query.data.toDateTime().toUTC().toString() }}",\n "responses":{\n "name": "{{ $('Webhook').item.json.query.nome}}",\n "email": "{{ $('Webhook').item.json.query.email }}",\n "telefone": "{{ $('Webhook').item.json.query.telefone }}",\n "guests": [],\n "location": {\n "values": "inPerson",\n "optionValue": ""\n }\n },\n "metadata":{},\n "timeZone": "America/Sao_Paulo",\n "language": "en",\n "description": null,\n "status": "PEDING",\n 'smsReminderNumber": null\n}", "options": {} }, "id": "e93a9ffe-8fef-483a-b606-f9c2e683e798", "name": "HTTP Request2", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 1320, 120 ], "credentials": { "httpQueryAuth": { "id": "3HGeDDDYPLyFTGnM", "name": "Api cal.com" } } }, { "parameters": { "assignments": { "assignments": [ { "id": "dba0db7e-b0fd-422a-b17d-16b828fd9b7e", "name": "horarios", "value": "=Disponibilidade de Horario {{ Object.keys($('HTTP Request').item.json.slots).map(dia => {\n return JSON.stringify({\n [dia]: Object.keys($('HTTP Request').item.json.slots[dia]).map(slot => {\n let originalTime = $('HTTP Request').item.json.slots[dia][slot]['time'];\n let date = new Date(originalTime);\n date.setHours(date.getHours() - 3);\n return {\n time: date.toISOString().replace('Z','')\n };\n })\n });\n}) }}\n(NÃO INFORMAR DIRETAMENTE TODOS, APENAS ARMAZENAR EM MEMORIA)", "type": "string" } ] }, "options": {} }, "id": "a1572a64-43da-4922-8207-994f2e6cff7f", "name": "Edit Fields1", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 760, 360 ] }, { "parameters": { "respondWith": "text", "responseBody": "=Agendamento Realizado com Sucesso para o Dia {{ $('Webhook').item.json.query.data.toDateTime().format('dd/MM/yyyyHH:mm') }}", "options": {} }, "id": "73f821ba-817c-481e-a40b-0d7dd07cfd5e", "name": "Respond to Webhook", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1.1, "position": [ 1580, 120 ] }, { "parameters": { "respondWith": "text", "responseBody": "={{ $json.horarios }}", "options": {} }, "id": "b89f880f-57ca-4f30-83cf-e90c93f4c542", "name": "Respond to Webhook1", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1.1, "position": [ 1060, 360 ] }, { "parameters": { "path": "tech", "options": {} }, "id": "e53bf5bf-5a78-4b62-81cc-0a7ef4dfd633", "name": "Webhook", "type": "n8n-nodes-base.webhook", "typeVersion": 2, "position": [ -140, 200 ], "webhookId": "80e83499-d3bc-4a45-8e5c-477c9335622e" } ], "pinData": { "Webhook": [ { "json": { "headers": { "host": "n8n.octotech.shop", "user-agent": "python-httpx/0.27.2", "accept": "/", "accept-encoding": "gzip, deflate, br, zstd", "content-type": "application/json", "x-forwarded-for": "137.117.18.201", "x-forwarded-host": "n8n.octotech.shop", "x-forwarded-port": "443", "x-forwarded-proto": "https", "x-forwarded-server": "e4c5aefaf65b", "x-real-ip": "137.117.18.201" }, "params": {}, "query": { "nome": "jhonatan", "email": "[email protected]", "telefone": "61995841814", "data": "2024-11-03" }, "body": {}, "webhookUrl": "https://api.octotech.shop/webhook-test/tech", "executionMode": "test" } } ] }, "connections": { "HTTP Request": { "main": [ [ { "node": "If", "type": "main", "index": 0 } ] ] }, "If": { "main": [ [ { "node": "HTTP Request1", "type": "main", "index": 0 } ], [ { "node": "Edit Fields1", "type": "main", "index": 0 } ] ] }, "HTTP Request1": { "main": [ [ { "node": "If1", "type": "main", "index": 0 } ] ] }, "If1": { "main": [ [ { "node": "HTTP Request2", "type": "main", "index": 0 } ] ] }, "HTTP Request2": { "main": [ [ { "node": "Respond to Webhook", "type": "main", "index": 0 } ] ] }, "Edit Fields1": { "main": [ [ { "node": "Respond to Webhook1", "type": "main", "index": 0 } ] ] }, "Webhook": { "main": [ [ { "node": "HTTP Request", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1" }, "versionId": "14b7bf73-27da-4948-b389-f220ec11949a", "meta": { "templateCredsSetupCompleted": true, "instanceId": "be7721e7fbd69c3170cf645e1074c34c507bd1c3f526fe3f4a377f6803139658" }, "id": "bbBBymBh6pWfbP5n", "tags": [] }

Arquivos Relacionados

Preço justo e sem truques

Todos os planos da Promovaweb permitem o acesso ao instalador, Cursos de Marketing e Devops e acesso VIP da Comunidade.

Formação MarTech

R$597 /ano

A assinatura perfeita pra você que está dando os primeiros passos com Docker Swarm, N8N, Evolution e Automação de Marketing.

  • Instalador Promovaweb
  • Curso de Docker Swarm
  • Curso de N8N e Filas
  • Curso de Mautic 4
  • Curso de Evolution API 2.x
  • Acesso à Comunidade VIP
  • Bate-Papo Exclusivos no Zoom / Meet
ASSINE AGORA!

Formação IA Makers

R$997 /ano

A assinatura ideal para você aprender Marketing Digital, Participar da Comunidade e Desenvolver Produtos com Inteligência Artificial.

  • Tudo da Promovaweb
  • Curso de Inteligência Artificial
  • Curso de Open AI, Dify e N8N
  • Área Exclusiva de IA na Comunidade
  • Workshops Exclusivos no Zoom / Meet
  • Acesso ao Instalador
  • Download de Workflows
  • Prompts Exclusivos
  • Gerador de Prompts
ASSINE AGORA!

Já é aluno?
Ganhe um super desconto na Assinatura IA Makers.

Perguntas Frequentes

Não consegue encontrar a resposta que procura?

Fale comigo no Grupo do Telegram .

Quais são as Formas de Pagamento?
Você pode pagar com cartão de crédito (em até 10x), Pix, Boleto ou saldo da Hotmart.
Preciso saber programar?
Não! A Promovaweb é baseada em ferramentas LowCode onde existe pouca ou nenhuma necessidade de programação.
Tenho acesso completo ao conteúdo?
Sim! Você poderá assistir as aulas quantas vezes quiser e terá acesso a todos os cursos disponíveis no seu plano por 1 ano após a compra.
Não sei instalar nenhum App. O que eu faço?
Nosso instalador foi feito pra você! Com apenas 1 linha de comando você poderá instalar qualquer app disponível na plataforma.