{
  "id": "qO5iIv005Wh8MNjr",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI-Powered Reservation Reminder Calls with Twilio",
  "tags": [],
  "nodes": [
    {
      "id": "7f2c26e5-a2da-44c5-8ec3-bc23a2893d14",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        176,
        1088
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cfdab910-984d-49bb-9835-03486d5fa4d9",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        176,
        912
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 11
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2345492b-8fa2-4fcc-8756-33da030bc6a2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        464
      ],
      "parameters": {
        "width": 680,
        "height": 224,
        "content": "## STEP 1\n\nRegister to Twilio and buy a phone number\n- Set the [text-to-speach](https://console.twilio.com/us1/develop/voice/settings/text-to-speech) language\n- Set the [geo permissions](https://console.twilio.com/us1/develop/voice/settings/geo-permissions)\n- Set up the Twilio node\n- Set up the sender in the field \"From\""
      },
      "typeVersion": 1
    },
    {
      "id": "c31a610e-5c11-43c1-ba93-aef36f4b9730",
      "name": "Secretary Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        928,
        992
      ],
      "parameters": {
        "text": "=Details booking appointment:\nName: {{ $json.NAME }}\nTime: {{ $json.TIME }}\nN. People: {{ $json['N. PEOPLE'] }}",
        "options": {
          "systemMessage": "=You are the secretary of the restaurant \"Bella Napoli\" and your task is to create a conversation for a phone call to remind a customer about their reservation today. You will be provided with the reservation name, time, and number of people.\n\nHere are the details of the reservation:\n<reservation>\nName: {{ $json.NAME }}\nTime: {{ $json.TIME }}\nN. People: {{ $json['N. PEOPLE'] }}\n</reservation>\n\nCreate a polite and friendly conversation for the phone call. The conversation should include:\n1. A greeting and introduction\n2. A reminder of the reservation details (name, time, number of people)\n\nOnly Write the message without any tags.\n\nHere's an example of how your output should be structured:\n\nGood morning, Mr. Paolo. I'm the secretary at Bella Napoli restaurant. I'm calling to remind you of your reservation for today at 8:00 PM for four people. Have a nice day!\n\nRemember to use the provided reservation details in your conversation. Create a natural and friendly message that a real restaurant secretary might have with a customer."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "bacd0bad-93be-4643-b76d-a232372d8652",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        640,
        976
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "568a49f4-653f-45e1-8515-22742ac0f18a",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1424,
        1200
      ],
      "parameters": {
        "unit": "minutes",
        "amount": 2
      },
      "typeVersion": 1.1
    },
    {
      "id": "f3b319f4-8c5e-4ef9-b633-bcefa9a1bb04",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        720
      ],
      "parameters": {
        "width": 688,
        "height": 128,
        "content": "## STEP 2\n- Clone this [Google Sheet](https://docs.google.com/spreadsheets/d/1lQh-199bQe-HKwmVI_6cS-Xv1OiGo1B4-OpR6kbNg7E/edit?usp=sharing)\n- Remember that the Phone field must contain the international prefix without the \"+\" character."
      },
      "typeVersion": 1
    },
    {
      "id": "c4a2fcfb-0875-4607-a874-0b34d4f24785",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        256
      ],
      "parameters": {
        "color": 3,
        "width": 672,
        "content": "## AI-Powered Reservation Reminder Calls with Twilio\n\nThis workflow automates the process of calling customers to **remind them of their booking reservations** using AI-generated messages and a **Twilio** phone number. It can easily be adapted for other venues"
      },
      "typeVersion": 1
    },
    {
      "id": "7ed94873-766a-43a3-82f4-882b3d482e83",
      "name": "Grok 4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        896,
        1200
      ],
      "parameters": {
        "model": "x-ai/grok-4",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2142042a-0d66-4053-8c6c-a6008b269e8d",
      "name": "Get daily reservations",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        432,
        976
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "CALLED"
            },
            {
              "lookupValue": "={{ $now.format('yyyy-LL-dd') }}",
              "lookupColumn": "DATE"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1lQh-199bQe-HKwmVI_6cS-Xv1OiGo1B4-OpR6kbNg7E/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1lQh-199bQe-HKwmVI_6cS-Xv1OiGo1B4-OpR6kbNg7E",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1lQh-199bQe-HKwmVI_6cS-Xv1OiGo1B4-OpR6kbNg7E/edit?usp=drivesdk",
          "cachedResultName": "Booking appointments"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "80d0ebf7-0e19-452b-ad25-993e77ced577",
      "name": "Make a call",
      "type": "n8n-nodes-base.twilio",
      "position": [
        1424,
        992
      ],
      "parameters": {
        "to": "=+{{ $('Get daily reservations').item.json.PHONE }}",
        "from": "+177526xxxxxx",
        "twiml": true,
        "message": "=<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response>\n  <Say voice=\"alice\" language=\"it-IT\">\n    {{ $json.output }}\n  </Say>\n</Response>\n",
        "options": {},
        "resource": "call"
      },
      "credentials": {
        "twilioApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fadf15c5-c652-4ec2-9e21-0a61f4046532",
      "name": "Update reservation",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1104,
        1200
      ],
      "parameters": {
        "columns": {
          "value": {
            "CALLED": "x",
            "row_number": "={{ $('Get daily reservations').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "DATE",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "DATE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TIME",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TIME",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "NAME",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "NAME",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "N. PEOPLE",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "N. PEOPLE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "PHONE",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "PHONE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "CALLED",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "CALLED",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1lQh-199bQe-HKwmVI_6cS-Xv1OiGo1B4-OpR6kbNg7E/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1lQh-199bQe-HKwmVI_6cS-Xv1OiGo1B4-OpR6kbNg7E",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1lQh-199bQe-HKwmVI_6cS-Xv1OiGo1B4-OpR6kbNg7E/edit?usp=drivesdk",
          "cachedResultName": "Booking appointments"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "dda55711-3ade-40ea-bddf-618aa56f6650",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Grok 4": {
      "ai_languageModel": [
        [
          {
            "node": "Secretary Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Make a call": {
      "main": [
        [
          {
            "node": "Update reservation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Secretary Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Secretary Agent": {
      "main": [
        [
          {
            "node": "Make a call",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get daily reservations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update reservation": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get daily reservations": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get daily reservations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}