This workflow follows the Execute Workflow Trigger → 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 →
{
"name": "Tool - Ver Disponibilidad",
"nodes": [
{
"id": "vd-trigger",
"name": "Recibir Datos",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
240,
300
],
"parameters": {
"inputSource": "passthrough"
}
},
{
"id": "vd-leer-turnos",
"name": "Leer Turnos",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.4,
"position": [
460,
300
],
"alwaysOutputData": true,
"parameters": {
"operation": "read",
"documentId": {
"__rl": true,
"value": "1vK8h8c8prheB8_KE7nwl6e4SblGoeALs_jE-vkgv5ho",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Turnos",
"mode": "name"
},
"options": {}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"id": "vd-calcular",
"name": "Calcular Slots Libres",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
680,
300
],
"parameters": {
"mode": "runOnceForAllItems",
"jsCode": "const raw = $('Recibir Datos').first().json;\nconst d = raw.fecha != null ? raw : JSON.parse(raw.query || '{}');\nconst valido = v => v != null && String(v).trim() !== '' && String(v) !== 'undefined' && String(v) !== 'null';\nif (!valido(d.fecha)) return [{ json: { resultado: 'ERROR: no se recibi\u00f3 una fecha v\u00e1lida. Indic\u00e1 la fecha en formato YYYY-MM-DD.' } }];\nconst fecha = String(d.fecha).trim();\n\nconst [year, month, day] = fecha.split('-').map(Number);\nconst dateObj = new Date(year, month - 1, day);\nconst dow = dateObj.getDay();\n\nif (dow === 0) {\n return [{ json: { resultado: 'El consultorio no atiende los domingos. Pod\u00e9s consultar de lunes a s\u00e1bado.' } }];\n}\n\nconst endMin = dow === 6 ? 780 : 1260;\nconst allSlots = [];\nfor (let m = 480; m + 45 <= endMin; m += 45) {\n allSlots.push(String(Math.floor(m / 60)).padStart(2, '0') + ':' + String(m % 60).padStart(2, '0'));\n}\n\nconst busyStates = ['PENDIENTE', 'CONFIRMADO', 'RECORDATORIO_ENVIADO'];\nconst occupied = $input.all()\n .filter(i => i.json.fecha === fecha && busyStates.includes(i.json.estado_turno))\n .map(i => i.json.hora);\n\nconst free = allSlots.filter(s => !occupied.includes(s));\n\nconst resultado = free.length === 0\n ? 'No hay turnos disponibles para el ' + fecha + '. \u00bfQuer\u00e9s que verifique otro d\u00eda?'\n : 'Los horarios disponibles para el ' + fecha + ' son: ' + free.join(', ') + '. \u00bfCu\u00e1l prefer\u00eds?';\n\nreturn [{ json: { resultado } }];"
}
}
],
"connections": {
"Recibir Datos": {
"main": [
[
{
"node": "Leer Turnos",
"type": "main",
"index": 0
}
]
]
},
"Leer Turnos": {
"main": [
[
{
"node": "Calcular Slots Libres",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
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.
googleSheetsOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Tool - Ver Disponibilidad. Uses executeWorkflowTrigger, googleSheets. Event-driven trigger; 3 nodes.
Source: https://github.com/SMsimarco/RecepIA---n8n/blob/main/n8n-flows/tool_ver_disponibilidad.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.
NDA Import. Uses httpRequest, googleSheets, jira, executeWorkflowTrigger. Event-driven trigger; 30 nodes.
12 - Market Intelligence Report Builder (Stakeholder v0.3). Uses googleSheets, httpRequest, executeWorkflowTrigger. Event-driven trigger; 27 nodes.
Google Maps Email Scraper Template. Uses removeDuplicates, splitInBatches, httpRequest, splitOut. Event-driven trigger; 26 nodes.
Splitout Comparedatasets. Uses manualTrigger, gong, stickyNote, executeWorkflow. Event-driven trigger; 26 nodes.
Streamline your sales call analysis with CallForge, an automated workflow that extracts, enriches, and refines Gong.io call data for AI-driven insights.