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

View File

@@ -12,13 +12,10 @@ Please create a new note in the "Weekly Notes" folder.
The title should be "Weekly Note - Month, Day Year" using today's date.
## Step 2: Review Notion data and create the note
Fetch these in parallel:
- **Active projects** — fetch view://2c0abd6c-450a-8053-b2e8-000caaf77931 (pre-filtered: Active status)
- **This week's tasks** — fetch view://2c0abd6c-450a-80ce-9fa7-000c27dd9719 (pre-filtered: incomplete, sorted by Suggested for today)
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.
If view fetches fail, fall back to the full database URLs:
- Projects: https://www.notion.so/solutioninnovation/2c0abd6c450a8090aca3e0b2b0373c17
- Tasks: https://www.notion.so/solutioninnovation/2c0abd6c450a805098d3cc0e7d3dfccf
1. **Active projects**`notion-search` the Projects collection `collection://2c0abd6c-450a-807a-a3d7-000b8d8aaecc` with `page_size: 25`, `max_highlight_length: 0`. Fetch the returned pages **in parallel**, then keep those with `Status` = "Active" and `Type` ≠ "Personal".
2. **This week's tasks**`notion-search` the Tasks collection `collection://2c0abd6c-450a-8085-80a0-000ba136a154` with `page_size: 25`, `max_highlight_length: 0`, seeding `query` with the active-project names plus "due this week blocking". Fetch the results in parallel and drop anything with `Status` = "Done".
List all active projects and ask me which 3 I want to prioritize for the upcoming week.
If there isn't a weekly goal for the selected projects, ask me to write one.
@@ -30,18 +27,26 @@ Format the note with the following sections:
1. **Priorities for this week** - List the three projects I selected with their weekly goal.
2. **Key tasks** - List all tasks that are due this week. Order by due date and blocker status. Show the task name, related project, type, and effort level. Provide a link to the task in Notion.
## Step 3: Generate my reading list
Then, query the Reading List database using view://2c4abd6c-450a-80c1-9cda-000c5fa5bcc8 (pre-filtered: Status = To Read or In Progress).
If the view fetch fails, fall back to: https://www.notion.so/solutioninnovation/2c4abd6c450a80cbae55c440dd9e2427
## Step 3: Review the week's calendar
Use the Microsoft 365 connector's `outlook_calendar_search` tool to fetch the upcoming week's events:
* `afterDateTime`: this coming Monday at 00:00, `beforeDateTime`: Friday at 23:59
* `query: "*"`, `order: "oldest"`, `limit: 25`
🚨 TIMEZONE: The connector returns times in **UTC** (ISO strings ending in `Z`). Convert each to Eastern Time before reasoning about them — EDT = UTC4 (mid-Mar to early-Nov), EST = UTC5 otherwise. Exclude "NDS Design Readiness & Refinement" meetings, and treat `isAllDay` events (PTO/OOO) as out-of-office.
Use AJ's work day (9 AM5:30 PM ET) and these events to estimate how much unscheduled time exists across the week — this feeds the reading suggestions below.
## Step 4: Generate my reading list
Using the same search → fetch → filter pattern: `notion-search` the Reading List collection `collection://2c4abd6c-450a-804a-809a-000bc77d02c1` with `page_size: 25`, `max_highlight_length: 0`. Fetch the returned pages in parallel and keep those with `Status` = "To Read" or "In Progress". (Don't fetch `view://` URLs.)
3. Under **Suggested Reading** recommend 2 articles that fit the available time blocks:
- Look at the unscheduled time blocks to determine what reading time is appropriate
- Look at the unscheduled time across the week (from Step 3) to determine what reading time is appropriate
- Match articles based on Read time field:
* Short = <5 minutes (fits in small gaps)
* Medium = <15 minutes (needs decent gap)
* Long = >15 minutes (needs larger block)
- For each article show: Title, Topic, Read time, and URL
- Briefly explain why these articles fit tomorrow's schedule
- Briefly explain why these articles fit the week's schedule
## Formatting Rules

View File

@@ -11,7 +11,7 @@ This is an Obsidian vault - a personal knowledge management system based on mark
* Always add relevant tags to each file
* Notes can be informal in tone, I am a casual guy
* You can fetch calendar information in /Users/aj.siegel/OneDrive - ServiceNow/BoxData/CalendarEvents_YYYYMMDD.json wheree YYYYMMDD is the date of interest.
* Fetch calendar information via the Microsoft 365 connector (`outlook_calendar_search` tool). See the Data Sources section for details.
* My work day is 9:00 AM - 5:30 PM ET
## Context
@@ -67,20 +67,19 @@ When creating or modifying notes:
- Link integrity matters - renaming files may break existing links unless done through Obsidian's rename feature
## Data Sources
* You have access to a OneDrive folder with AJ's calendar for the current day and the next day
* IMPORTANT: Use the startET and endET fields to get the times in my local time zone.
* **Calendar — Microsoft 365 connector**: Use the `outlook_calendar_search` tool (Microsoft 365 MCP) to fetch AJ's calendar events. Search with `afterDateTime`/`beforeDateTime` for the day(s) of interest, `query: "*"`, and `order: "oldest"`.
* 🚨 IMPORTANT — TIMEZONE: The connector returns all times in **UTC** (ISO strings ending in `Z`). Convert to AJ's local Eastern Time before displaying or doing any time math. EDT = UTC4 (mid-Mar to early-Nov), EST = UTC5 (rest of year). Example: `2026-05-29T16:30:00Z` → 12:30 PM ET (EDT).
* `isAllDay: true` events (PTO, OOO, etc.) and `showAs: "oof"`/`"free"` indicate AJ may be out — call these out, don't count them as meetings.
* ALWAYS exclude "NDS Design Readiness & Refinement" meetings from calendar displays and time calculations.
* Notion MCP Projects: https://www.notion.so/solutioninnovation/2c0abd6c450a8090aca3e0b2b0373c17 — All active projects with Status, Focus This Week checkbox, and weekly goals. Data source: `collection://2c0abd6c-450a-807a-a3d7-000b8d8aaecc`
* Notion MCP Task Tracker: https://www.notion.so/solutioninnovation/2c0abd6c450a805098d3cc0e7d3dfccf — All units of work with: Name and Status, Blocking (multi-select of people waiting on AJ), Deadline dates, Project relation, Key Contact, Priority, Effort Estimate, Energy Type. Data source: `collection://2c0abd6c-450a-8085-80a0-000ba136a154`
* IMPORTANT: Always fetch these databases using the full `https://www.notion.so/solutioninnovation/...` URL — bare UUIDs and collection:// URIs will fail. The collection:// URIs can be used as `data_source_url` in searches after the initial fetch.
* Useful pre-filtered views in Tasks Tracker:
* **Blocking others**: `view://2c0abd6c-450a-8060-b247-000c30138b80` — tasks with Blocking populated, not Done
* **Daily planning**: `view://2c0abd6c-450a-8064-869a-000cf1f5a919` — all incomplete tasks sorted by Suggested for today
* **This week**: `view://2c0abd6c-450a-80ce-9fa7-000c27dd9719` — incomplete tasks sorted by Suggested for today
* Useful pre-filtered views in Projects:
* **This week's focus**: `view://2c0abd6c-450a-806e-a2c9-000c8aa14a44` — projects with Focus this week = true
* **Active**: `view://2c0abd6c-450a-8053-b2e8-000caaf77931` — Active status projects only
* CRITICAL: Always read these resources when planning. Check: 1. Which tasks have Blocking field populated (priority #1) 2. Which deadlines are this week 3. Which projects have Focus This Week = true 4. Task Status (ignore Done tasks) Base ALL suggestions on this real data, not examples.
* 🚨 HOW TO QUERY THESE DATABASES — on AJ's **Notion Plus seat**, the MCP grants no server-side filter/query tool. `query_data_sources` is described but not callable — it requires an **Enterprise plan with Notion AI**. Revisit only if AJ moves to that tier. `view://…` URLs are NOT fetchable, and `fetch` on a `collection://…` returns only the schema (no rows). Do NOT attempt either, and never print a "view fetch failed, falling back" message. Use this 3-step pattern instead:
1. **Find candidate pages** — call `notion-search` with `data_source_url` set to the collection URI, a work-focused `query`, `page_size: 25`, `max_highlight_length: 0`. Collections: Tasks = `collection://2c0abd6c-450a-8085-80a0-000ba136a154`, Projects = `collection://2c0abd6c-450a-807a-a3d7-000b8d8aaecc`. This returns page IDs/titles only — NOT property values.
2. **Read properties** `notion-fetch` each returned page ID, **batched in parallel**. Page fetches return all properties (`Status`, `Due date`, `Suggested for today`, `Blocking`, `Priority`, `Project`, and for projects `Focus this week`, `Weekly goal`, etc.).
3. **Filter & sort locally** — drop anything with `Status` = "Done". For tasks, rank: (1) `Blocking` populated, (2) `Suggested for today` ≤ target date, (3) soonest `Due date`. For projects, keep `Focus this week` = `__YES__` and `Status` = "Active" (exclude `Type` = "Personal").
* `notion-search` is **semantic** (ranked by relevance, not status), so seed `query` with this week's focus-project names plus terms like "blocking due this week" to surface the right open items. Relation fields like `Blocking` aren't text-searchable, so confirm them only after fetching the page.
* EFFICIENCY: the weekly focus projects + goals are written into the current Weekly Note every Sunday. In daily/evening planning, read those from the Weekly Note (a local `.md` file) instead of re-scanning the Projects DB.
* CRITICAL: Base ALL suggestions on this real fetched data, never on examples. When planning, prioritize: 1) tasks with `Blocking` populated (priority #1), 2) deadlines this week, 3) tasks tied to `Focus this week` projects, ignoring `Status` = "Done".
## Your job
*When AJ asks "help me plan today" or "what should I focus on":