Beginner's Outlook Calendar Summary with OpenAI
A step-by-step demo that shows **how to pull your Outlook calendar events for the week and ask GPT-4o to write a short summary**. Along the way, you'll practice basic data-transform nodes (Code, Filter, Aggregate) and see where to attach the required API credentials. --- ## 1. Manual Trigger - *Run Workflow* | Why | Lets you click “Execute” in the n8n editor so you can test each change. | | --- | --- | --- ## 2. Get Outlook Events - *Get many events* 1. **Node type:** `Microsoft Outlook – Event – Get All` 2. **Fields selected:** `subject`, `start` 3. **API setup (inside this node):** - Click **Credentials – Microsoft Outlook OAuth2 API** - If you haven't connected before: 1. Choose **“Microsoft Outlook OAuth2 API” – “Create New”**. 2. Sign in and grant the **Calendars.Read** permission. 3. Save the credential (e.g., **“Microsoft Outlook account”**). 4. **Output:** A list of events with the raw ISO start time. > **Teaching moment:** Outlook returns a full `datetime` string. We'll normalize it next so it's easy to filter. --- ## 3. Normalize Dates - *Convert to Date Format* ```js // Code node contents return $input.all().map(item => { const startDatetime = new Date(item.json.start.datetime); const formattedDate = startDatetime.toISOString().split('T')[0]; // YYYY-MM-DD return { json: { ...item.json, startDateFormatted: formattedDate } }; }); ``` ### 4. Filter the Events Down to This Week After we've normalized the `start` date-time into a simple `YYYY-MM-DD` string, we drop in a **Filter** node. Add one rule for every day you want to keep—for example `2025-08-07` **or** `2025-08-08`. Rows that match any of those dates will continue through the workflow; everything else is quietly discarded. *Why we're doing this:* we only want to summarize tomorrow's and the following day's meetings, not the entire calendar. --- ### 5. Roll All Subjects Into a Single Item Next comes an **Aggregate** node. Tell it to aggregate the `subject` field and choose the option *“Only aggregated fields.”* The result is one clean item whose `subject` property is now a tidy list of every meeting title. It's far easier (and cheaper) to pass one prompt to GP than dozens of small ones. --- ### 6. Turn That List Into Plain Text Insert a small **Code** node right after the aggregation: ```js return [{ json: { text: items .map(item => JSON.stringify(item.json)) .join('\n') } }]; ``` Need a Hand? I'm always happy to chat about automation, n8n, or Outlook API quirks. Robert Breen - Automation Consultant & n8n Instructor - robert@ynteractive.com | LinkedIn
A step-by-step demo that shows how to pull your Outlook calendar events for the week and ask GPT-4o to write a short summary. Along the way, you'll practice basic data-transform nodes (Code, Filter, Aggregate) and see where to attach the required API credentials.
1. Manual Trigger - Run Workflow
| Why | Lets you click “Execute” in the n8n editor so you can test each change. |
|---|
2. Get Outlook Events - Get many events
- Node type:
Microsoft Outlook – Event – Get All - Fields selected:
subject,start - API setup (inside this node):
- Click Credentials – Microsoft Outlook OAuth2 API
- If you haven't connected before:
- Choose “Microsoft Outlook OAuth2 API” – “Create New”.
- Sign in and grant the Calendars.Read permission.
- Save the credential (e.g., “Microsoft Outlook account”).
- Output: A list of events with the raw ISO start time.
Teaching moment: Outlook returns a full
datetimestring. We'll normalize it next so it's easy to filter.
3. Normalize Dates - Convert to Date Format
// Code node contents
return $input.all().map(item => { const startDatetime = new Date(item.json.start.datetime); const formattedDate = startDatetime.toISOString().split('T')[0]; // YYYY-MM-DD return { json: { ...item.json, startDateFormatted: formattedDate } };
});
4. Filter the Events Down to This Week
After we've normalized the start date-time into a simple YYYY-MM-DD string, we drop in a Filter node. Add one rule for every day you want to keep—for example 2025-08-07 or 2025-08-08. Rows that match any of those dates will continue through the workflow; everything else is quietly discarded.
Why we're doing this: we only want to summarize tomorrow's and the following day's meetings, not the entire calendar.
5. Roll All Subjects Into a Single Item
Next comes an Aggregate node. Tell it to aggregate the subject field and choose the option “Only aggregated fields.” The result is one clean item whose subject property is now a tidy list of every meeting title. It's far easier (and cheaper) to pass one prompt to GP than dozens of small ones.
6. Turn That List Into Plain Text
Insert a small Code node right after the aggregation:
return [{ json: { text: items .map(item => JSON.stringify(item.json)) .join('\n') }
}];
Need a Hand? I'm always happy to chat about automation, n8n, or Outlook API quirks.
Robert Breen - Automation Consultant & n8n Instructor
- robert@ynteractive.com | LinkedIn
New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.
Secure checkout powered by Stripe
Support
How to import this workflow into n8n
- 1Purchase or download the workflow to get the n8n workflow JSON file.
- 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
- 3Open each node marked with a credential warning and connect your own accounts and API keys.
- 4Run the workflow once manually to verify the data flow, then toggle it to Active.
Related Productivity workflows
- Automate Personal Life Management with Telegram and Google Services$14.99
- Automate Google Sheets Cleanup by Removing Duplicates via Profile URLs$4.99
- Automate Google Sheets with AI-Driven Text Generation in n8n$9.99
- Automated Daily Briefing for Executive Communication Management$14.99
- Automate Salon Bookings with AI, Google Calendar, and Email Confirmations$14.99
- Automate Meeting Scheduling with AI via Telegram$9.99
More from Robert Breen
Need this deployed? We'll set it up for you.
Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.