{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "377a63f1-4a8f-4b3a-86cb-de6d490c4406",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        608
      ],
      "parameters": {
        "color": 4,
        "width": 460,
        "height": 884,
        "content": "## Daily Calendar SMS Reminder \u2014 AI Generated \u2014 Google Calendar + GPT-4o-mini + Alive5\n\nFor busy professionals who want an AI-written, natural-sounding SMS reminder every morning for each of their Google Calendar meetings that day. Every day at 9AM this workflow fetches all of today's calendar events, loops through each one, extracts the meeting title, time, location, duration, and attendee count, then uses GPT-4o-mini to write a friendly reminder under 160 characters \u2014 no greetings, no emojis, straight to the point. The reminder is sent as an SMS via Alive5 to your US phone number. One SMS is sent per meeting.\n\n## How it works\n- **1. Daily 9 AM Trigger** fires every day at 9AM (cron: 0 9 * * *)\n- **2. Get Today's Meetings** fetches all calendar events for today from Google Calendar\n- **3. Loop Each Meeting** iterates through each event \u2014 if you have 3 meetings, 3 SMS messages are sent\n- **4. Extract Meeting Details** pulls title, time, location, duration, and attendee count into clean fields\n- **5. OpenAI \u2014 Generate SMS Text** uses gpt-4o-mini with 9 rules to write a natural reminder under 160 characters \u2014 no greetings, no emojis, output only\n- **6. Send SMS via Alive5** sends the AI-generated message to your US phone number and loops back for the next meeting\n\n## Set up steps\n1. In **2. Get Today's Meetings** \u2014 connect your Google Calendar OAuth2 credential and replace `YOUR_CALENDAR_ID` with `primary` or pick from the dropdown\n2. In **5. OpenAI \u2014 Generate SMS Text** \u2014 connect your OpenAI API key credential\n3. In **6. Send SMS via Alive5** \u2014 connect your Alive5 credential and replace `+1XXXXXXXXXX` with the recipient US phone number in E.164 format (example: +14155551234)\n4. Activate the workflow"
      },
      "typeVersion": 1
    },
    {
      "id": "3933476c-21a4-4569-9aa6-4a6e90b35063",
      "name": "Section \u2014 Schedule Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        832
      ],
      "parameters": {
        "color": 5,
        "width": 324,
        "height": 292,
        "content": "## Schedule Trigger\nFires every day at 9AM automatically. Change the cron expression inside the node if you want a different time."
      },
      "typeVersion": 1
    },
    {
      "id": "6790ccf0-a24a-4012-9553-4e139a155f34",
      "name": "Section \u2014 Google Calendar Fetch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        688
      ],
      "parameters": {
        "color": 6,
        "width": 292,
        "height": 628,
        "content": "## Google Calendar Fetch\nFetches all events for today from your Google Calendar. Replace YOUR_CALENDAR_ID with primary or pick from the dropdown after connecting your credential."
      },
      "typeVersion": 1
    },
    {
      "id": "be8bbee7-2b42-40aa-a8e8-841bdb5a823b",
      "name": "Section \u2014 Meeting Loop and Detail Extraction",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1824,
        800
      ],
      "parameters": {
        "color": 6,
        "width": 516,
        "height": 372,
        "content": "## Meeting Loop and Detail Extraction\nSplitInBatches loops through each meeting one at a time. The Set node extracts title, time, location, duration in minutes, and attendee count from the calendar event JSON."
      },
      "typeVersion": 1
    },
    {
      "id": "52f4e86a-71e1-41b4-8503-5e08160444f2",
      "name": "Section \u2014 AI SMS Generation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2432,
        720
      ],
      "parameters": {
        "color": 6,
        "width": 292,
        "height": 516,
        "content": "## AI SMS Generation\nGPT-4o-mini writes a natural reminder under 160 characters using 9 rules: no greetings, no emojis, no sign-offs, straight to the meeting details. Edit the system prompt inside the node to change tone."
      },
      "typeVersion": 1
    },
    {
      "id": "00186eaa-f0f0-42a4-9661-177883255bfc",
      "name": "Section \u2014 SMS Send via Alive5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2768,
        816
      ],
      "parameters": {
        "color": 4,
        "width": 420,
        "height": 308,
        "content": "## SMS Send via Alive5\nSends the AI-generated message to your US phone number via Alive5. Replace +1XXXXXXXXXX with the recipient number in E.164 format. Alive5 supports US numbers only. After sending, loops back to process the next meeting."
      },
      "typeVersion": 1
    },
    {
      "id": "e7bd5102-67e8-4959-857b-75a4639740ba",
      "name": "1. Schedule \u2014 Daily 9 AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1248,
        928
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ba37cc4b-20f7-4c05-ac4c-5848e3e653ae",
      "name": "2. Google Calendar \u2014 Get Today's Meetings",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1600,
        928
      ],
      "parameters": {
        "calendar": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_CALENDAR_ID"
        },
        "additionalFields": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "d8436a4e-69c5-4091-a99f-52afd016e0db",
      "name": "3. Loop \u2014 Each Meeting",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1904,
        928
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "21b5c138-aefd-49dc-972d-4a8fcfccdc5f",
      "name": "4. Set \u2014 Extract Meeting Details",
      "type": "n8n-nodes-base.set",
      "position": [
        2192,
        944
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "field-title",
              "name": "meetingTitle",
              "type": "string",
              "value": "={{ $json.summary || 'Untitled Meeting' }}"
            },
            {
              "id": "field-time",
              "name": "meetingTime",
              "type": "string",
              "value": "={{ $json.start.dateTime ? $json.start.dateTime.toDateTime().toFormat('h:mm a') : 'All Day' }}"
            },
            {
              "id": "field-location",
              "name": "meetingLocation",
              "type": "string",
              "value": "={{ $json.location || 'No location specified' }}"
            },
            {
              "id": "field-duration",
              "name": "meetingDuration",
              "type": "string",
              "value": "={{ $json.start.dateTime && $json.end.dateTime ? Math.round(($json.end.dateTime.toDateTime().toMillis() - $json.start.dateTime.toDateTime().toMillis()) / 60000) + ' min' : 'N/A' }}"
            },
            {
              "id": "field-attendees",
              "name": "attendeeCount",
              "type": "number",
              "value": "={{ $json.attendees ? $json.attendees.length : 0 }}"
            },
            {
              "id": "field-description",
              "name": "meetingDescription",
              "type": "string",
              "value": "={{ $json.description || '' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "02017932-090a-4f90-b591-8445a8638364",
      "name": "5. OpenAI \u2014 Generate SMS Text",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2480,
        944
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {
          "maxTokens": 80,
          "temperature": 0.6
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an SMS reminder writer for a busy professional. Write friendly, natural-sounding meeting reminders. Rules:\n1. Keep the message UNDER 160 characters (strict limit \u2014 counts as 1 SMS credit).\n2. Use simple, warm, conversational English.\n3. Do NOT start with greetings like 'Hi' or 'Hello' \u2014 get straight to the reminder.\n4. Always include: meeting title and time.\n5. Include location only if it's a real place or video link (skip if empty/TBD).\n6. Do NOT use emojis.\n7. Do NOT add quotation marks around the message.\n8. Do NOT add sign-offs like 'Thanks' or 'Regards'.\n9. Output ONLY the SMS text \u2014 nothing else, no preamble, no explanation."
            },
            {
              "content": "=Write an SMS reminder for this meeting:\n\nTitle: {{ $json.meetingTitle }}\nTime: {{ $json.meetingTime }}\nDuration: {{ $json.meetingDuration }}\nLocation: {{ $json.meetingLocation }}\nAttendees: {{ $json.attendeeCount }} people\n\nReturn only the SMS text, under 160 characters."
            }
          ]
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "905827cb-e0ae-4678-95ea-964a122fcbbc",
      "name": "6. Alive5 \u2014 Send SMS",
      "type": "n8n-nodes-alive5.alive5",
      "position": [
        2864,
        944
      ],
      "parameters": {
        "message": "={{ $json.message.content }}"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "6. Alive5 \u2014 Send SMS": {
      "main": [
        [
          {
            "node": "3. Loop \u2014 Each Meeting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3. Loop \u2014 Each Meeting": {
      "main": [
        [],
        [
          {
            "node": "4. Set \u2014 Extract Meeting Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1. Schedule \u2014 Daily 9 AM": {
      "main": [
        [
          {
            "node": "2. Google Calendar \u2014 Get Today's Meetings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5. OpenAI \u2014 Generate SMS Text": {
      "main": [
        [
          {
            "node": "6. Alive5 \u2014 Send SMS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4. Set \u2014 Extract Meeting Details": {
      "main": [
        [
          {
            "node": "5. OpenAI \u2014 Generate SMS Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2. Google Calendar \u2014 Get Today's Meetings": {
      "main": [
        [
          {
            "node": "3. Loop \u2014 Each Meeting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}