cleaned up to use 365 connector instead of json

This commit is contained in:
AJ Siegel
2026-05-29 19:49:22 -04:00
parent ecceffa9d5
commit 2d75e02b81
3 changed files with 40 additions and 37 deletions

View File

@@ -6,12 +6,12 @@ Please create a new note in the "Daily Notes" folder.
* The title should be "Daily Note - YYYY-MM-DD" using today's date.
* Below the title, link to the Weekly Note for the current week using format: `[[Weekly Note - Month Day, Year]]` where the date is the Sunday of the current week
## Step 1: read tomorrow's calendar events from:
/Users/aj.siegel/OneDrive - ServiceNow/BoxData/CalendarEvents_YYYYMMDD.json
## Step 1: read tomorrow's calendar events
Use the Microsoft 365 connector's `outlook_calendar_search` tool to fetch tomorrow's events:
* `afterDateTime`: tomorrow at 00:00, `beforeDateTime`: tomorrow at 23:59
* `query: "*"`, `order: "oldest"`, `limit: 25`
Where YYYMMDD is tomorrow's date
Parse the JSON to extract tomorrow's calendar events (times are already in Eastern Time).
🚨 TIMEZONE: The connector returns times in **UTC** (ISO strings ending in `Z`). Convert each to Eastern Time before displaying — EDT = UTC4 (mid-Mar to early-Nov), EST = UTC5 otherwise. Flag any `isAllDay` events (PTO/OOO) as out-of-office rather than meetings.
## Step 2: Under the **Agenda** heading
Format my calendar events in a simple Markdown table with columns: Time (ET), Event Name, Owner, and Duration
@@ -23,18 +23,17 @@ Format my calendar events in a simple Markdown table with columns: Time (ET), Ev
Let me know how much unscheduled time I have.
## Step 3: Get task data
Fetch Notion data using these URLs. Run all three in parallel:
This Notion MCP has no filter/query tool and `view://` URLs aren't fetchable, so use the search → fetch → filter pattern (see CLAUDE.md "HOW TO QUERY THESE DATABASES"). Do NOT try to fetch views and do NOT print any "falling back" message.
1. **Blocking tasks** — fetch view://2c0abd6c-450a-8060-b247-000c30138b80 (pre-filtered: Blocking populated + not Done)
2. **Daily planning tasks** — fetch view://2c0abd6c-450a-8064-869a-000cf1f5a919 (pre-filtered: incomplete tasks sorted by Suggested for today)
3. **Focus projects** — fetch view://2c0abd6c-450a-806e-a2c9-000c8aa14a44 (pre-filtered: Focus this week = true)
If the view fetches fail, fall back to fetching the full databases:
- Tasks: https://www.notion.so/solutioninnovation/2c0abd6c450a805098d3cc0e7d3dfccf (data source: collection://2c0abd6c-450a-8085-80a0-000ba136a154)
- Projects: https://www.notion.so/solutioninnovation/2c0abd6c450a8090aca3e0b2b0373c17 (data source: collection://2c0abd6c-450a-807a-a3d7-000b8d8aaecc)
1. **Get this week's focus projects** — read the current Weekly Note (`Weekly Notes/Weekly Note - <Sunday's date>.md`) and use its listed focus projects + weekly goals. (Only if that note is missing: `notion-search` the Projects collection `collection://2c0abd6c-450a-807a-a3d7-000b8d8aaecc` with `page_size: 25`, fetch the results in parallel, and keep those with `Focus this week` = `__YES__` and `Status` = "Active".)
2. **Find candidate tasks**`notion-search` the Tasks collection `collection://2c0abd6c-450a-8085-80a0-000ba136a154` with `page_size: 25`, `max_highlight_length: 0`, and a `query` seeded with the focus-project names plus "blocking due this week suggested today".
3. **Fetch candidate task pages in parallel** to read their real properties (`Status`, `Suggested for today`, `Due date`, `Blocking`, `Priority`, `Project`).
4. **Filter & rank locally**: drop `Status` = "Done" or "Blocked". Rank the rest by (1) `Blocking` populated, (2) `Suggested for today` ≤ tomorrow, (3) soonest `Due date`.
Format the note with the following sections:
1. Under **Suggested Tasks** look at all tasks not complete and identify up to 3 tasks with a suggestedForToday of tomorrow or earlier, or tasks that are blocking others. Ignore tasks with a status of Blocked. Add these to a list.
1. Under **Suggested Tasks** list up to 3 tasks from the ranked set above (Blocking-others tasks always come first). For each, show the task name, related project, and a Notion link.
2. Under **Key Projects** list this week's focus projects with their weekly goal.
- If a search legitimately returns no qualifying open tasks, say so plainly — never invent tasks to fill the list.
## Formatting Rules