The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Vitalis - Recordatorios Cron 20:00",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "days",
"daysInterval": 1,
"triggerAtHour": 20,
"triggerAtMinute": 0
}
]
}
},
"id": "node-cron",
"name": "Cron 20:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
240,
300
]
},
{
"parameters": {
"jsCode": "const tomorrow = new Date();\ntomorrow.setDate(tomorrow.getDate() + 1);\nconst yyyy = tomorrow.getFullYear();\nconst mm = String(tomorrow.getMonth() + 1).padStart(2, '0');\nconst dd = String(tomorrow.getDate()).padStart(2, '0');\nreturn [{ json: { fecha_manana: `${yyyy}-${mm}-${dd}` } }];"
},
"id": "node-fecha",
"name": "Calcular Ma\u00f1ana",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
460,
300
]
},
{
"parameters": {
"method": "GET",
"url": "={{$env[\"SUPABASE_URL\"]}}/rest/v1/turnos",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{$env[\"SUPABASE_SERVICE_KEY\"]}}"
},
{
"name": "Authorization",
"value": "=Bearer {{$env[\"SUPABASE_SERVICE_KEY\"]}}"
}
]
},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "select",
"value": "id,fecha,hora_inicio,estado,centro_id,paciente_id,paciente:pacientes(nombre,apellido,celular),profesional:profesionales(apellido)"
},
{
"name": "fecha",
"value": "=eq.{{$json.fecha_manana}}"
},
{
"name": "estado",
"value": "=in.(reservado,en_sala)"
},
{
"name": "order",
"value": "hora_inicio"
}
]
},
"options": {}
},
"id": "node-sb-turnos",
"name": "Supabase Turnos",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
680,
300
]
},
{
"parameters": {
"jsCode": "const fecha_manana = $('Calcular Ma\u00f1ana').first().json.fecha_manana;\nconst results = [];\nfor (const item of $input.all()) {\n const t = item.json;\n const celular = t.paciente?.celular;\n if (!celular) continue;\n let cel = celular.replace(/\\D/g, '');\n if (cel.startsWith('0')) cel = cel.slice(1);\n if (!cel.startsWith('54')) cel = '54' + cel;\n if (cel.startsWith('54') && !cel.startsWith('549')) cel = '549' + cel.slice(2);\n const [y, m, d] = (t.fecha ?? '').split('-');\n const fechaFmt = `${d}/${m}`;\n const hora = (t.hora_inicio ?? '').substring(0, 5);\n results.push({ json: {\n turno_id: t.id,\n centro_id: t.centro_id,\n paciente_id: t.paciente_id,\n fecha_cita: t.fecha,\n telefono: '+' + cel,\n to_whatsapp: 'whatsapp:+' + cel,\n content_variables: JSON.stringify({ '1': t.paciente?.nombre ?? '', '2': fechaFmt, '3': hora, '4': t.profesional?.apellido ?? '' })\n }});\n}\nreturn results;"
},
"id": "node-prep-cron",
"name": "Filtrar y Preparar",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
900,
300
]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "node-loop-cron",
"name": "Loop Turnos",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
1120,
300
]
},
{
"parameters": {
"method": "POST",
"url": "=https://api.twilio.com/2010-04-01/Accounts/{{$env[\"TWILIO_ACCOUNT_SID\"]}}/Messages.json",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Basic {{Buffer.from($env[\"TWILIO_ACCOUNT_SID\"] + ':' + $env[\"TWILIO_AUTH_TOKEN\"]).toString('base64')}}"
},
{
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
]
},
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/x-www-form-urlencoded",
"body": "=From={{encodeURIComponent($env[\"TWILIO_FROM_WHATSAPP\"])}}&To={{encodeURIComponent($json.to_whatsapp)}}&ContentSid={{encodeURIComponent($env[\"TWILIO_TEMPLATE_SID\"])}}&ContentVariables={{encodeURIComponent($json.content_variables)}}",
"options": {}
},
"id": "node-twilio-cron",
"name": "Twilio Enviar",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1340,
300
]
},
{
"parameters": {
"method": "POST",
"url": "={{$env[\"SUPABASE_URL\"]}}/rest/v1/recordatorios_log",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{$env[\"SUPABASE_SERVICE_KEY\"]}}"
},
{
"name": "Authorization",
"value": "=Bearer {{$env[\"SUPABASE_SERVICE_KEY\"]}}"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Prefer",
"value": "return=minimal"
}
]
},
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/json",
"body": "={\"turno_id\":\"{{$('Loop Turnos').item.json.turno_id}}\",\"centro_id\":\"{{$('Loop Turnos').item.json.centro_id}}\",\"paciente_id\":\"{{$('Loop Turnos').item.json.paciente_id}}\",\"telefono\":\"{{$('Loop Turnos').item.json.telefono}}\",\"tipo_mensaje\":\"recordatorio_cita\",\"estado\":\"enviado\",\"fecha_cita\":\"{{$('Loop Turnos').item.json.fecha_cita}}\",\"fecha_envio\":\"{{new Date().toISOString()}}\"}",
"options": {}
},
"id": "node-sb-log",
"name": "Supabase Log",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1560,
300
]
}
],
"connections": {
"Cron 20:00": {
"main": [
[
{
"node": "Calcular Ma\u00f1ana",
"type": "main",
"index": 0
}
]
]
},
"Calcular Ma\u00f1ana": {
"main": [
[
{
"node": "Supabase Turnos",
"type": "main",
"index": 0
}
]
]
},
"Supabase Turnos": {
"main": [
[
{
"node": "Filtrar y Preparar",
"type": "main",
"index": 0
}
]
]
},
"Filtrar y Preparar": {
"main": [
[
{
"node": "Loop Turnos",
"type": "main",
"index": 0
}
]
]
},
"Loop Turnos": {
"main": [
[
{
"node": "Twilio Enviar",
"type": "main",
"index": 0
}
],
[]
]
},
"Twilio Enviar": {
"main": [
[
{
"node": "Supabase Log",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Vitalis - Recordatorios Cron 20:00. Uses httpRequest. Scheduled trigger; 7 nodes.
Source: https://github.com/gkovalek/agendavitalis/blob/main/n8n/workflow-2-recordatorios-cron.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Birthday Automation - Production (Fixed). Uses stopAndError, httpRequest, emailSend, bannerbear. Scheduled trigger; 86 nodes.
This template runs two scheduled workflows to govern Microsoft Entra ID (Azure AD) guest accounts by detecting stale users via Microsoft Graph, staging deletions in SharePoint with a 72-hour window, n
Jira-Allure-Auto-Qa. Uses httpRequest, jira. Scheduled trigger; 68 nodes.
Spotify-Sync-Surrealdb-V1. Uses httpRequest, n8n-nodes-surrealdb, spotify. Scheduled trigger; 62 nodes.
As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o