-
-
Notifications
You must be signed in to change notification settings - Fork 589
feat(daily-briefing): add dynamic Notion task integration via agent tools #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,8 @@ I can't access weather right now. | |
|
|
||
| {Reminders section - only if any} | ||
|
|
||
| {Notion sprint/tasks section - only if enabled and any found} | ||
|
|
||
| {Important emails section - only if enabled and any} | ||
|
|
||
| {Anchors - only if real priorities from context} | ||
|
|
@@ -271,7 +273,19 @@ For each email in `emails.data`, use the agent's own semantic analysis to determ | |
| 3. Sort by date per `emails_sort_newest` | ||
| 4. Limit to `emails_limit` | ||
|
|
||
| ### Step 6: Generate the Briefing | ||
| ### Step 6: Fetch Notion Context (Agent Task) | ||
|
|
||
| **Only if `config.notion.enabled` is true.** | ||
|
|
||
| If a `config.notion.tasksDatabaseId` is provided, use your `notion_query_database` tool to fetch tasks due today, or tasks categorized as "In Progress", "Doing", or "High Priority". | ||
|
|
||
| **Querying guidelines**: | ||
| - Use the database ID from config. | ||
| - Filter for tasks matching today's date or active statuses. | ||
| - Limit to `config.notion.limit` (e.g., 3-5 tasks) to keep the briefing concise. | ||
| - If the tool call fails or no database ID is provided, silently omit the Notion section. | ||
|
|
||
| ### Step 7: Generate the Briefing | ||
|
|
||
| Using all gathered and processed data, compose the briefing text following the Output Contract. | ||
|
|
||
|
|
@@ -314,16 +328,26 @@ Using all gathered and processed data, compose the briefing text following the O | |
| ``` | ||
| - Format: `• Sender: Subject (truncated if needed)` | ||
|
|
||
| **Notion Priorities:** | ||
| ``` | ||
| 📝 **Notion Focus for Today:** | ||
| • High: Finish architecture docs | ||
| • In Progress: Refactor agent memory | ||
| ``` | ||
| - List top 3-5 active or due tasks. | ||
| - Format: `• Status/Priority: Task Name` | ||
|
|
||
| **Anchors:** | ||
| - Only if you can **confidently infer 1–3 real priorities** from user-provided context. | ||
| - If `config.notion.enabled` is true, use the top 1–2 items retrieved from Notion as the Daily Anchors and omit the dedicated Notion section, weaving them directly into the flow of the briefing. | ||
| - Otherwise, only include if you can **confidently infer 1–3 real priorities** from user-provided context. | ||
|
Comment on lines
+341
to
+342
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This instruction mandates omitting the dedicated Notion section whenever Notion is enabled, which conflicts with the layout and section-format rules that explicitly include a Useful? React with 👍 / 👎. |
||
| - Plain bullets, no heading. | ||
| - If not real/uncertain, **omit entirely** (do not invent). | ||
|
|
||
| **Closing Line:** | ||
| - Required. Use the `quote` field from the gathered JSON data. | ||
| - The orchestrator provides a random motivational quote each run. | ||
|
|
||
| ### Step 7: Output the Briefing | ||
| ### Step 8: Output the Briefing | ||
|
|
||
| Return **only** the briefing text. Nothing else. | ||
|
|
||
|
|
@@ -355,6 +379,11 @@ Configuration is read from `~/.openclaw/openclaw.json` at path `skills.entries.d | |
| "reminders": { | ||
| "enabled": true | ||
| }, | ||
| "notion": { | ||
| "enabled": false, | ||
| "tasksDatabaseId": "your-database-id", | ||
| "limit": 5 | ||
| }, | ||
| "emails": { | ||
| "enabled": false, | ||
| "icloudPassword": "", | ||
|
|
@@ -386,6 +415,9 @@ Configuration is read from `~/.openclaw/openclaw.json` at path `skills.entries.d | |
| | `reminders.enabled` | bool | true | Enable Apple Reminders | | ||
| | `reminders.dueFilter` | string | "today" | Due date filter: "today", "week", or "all" | | ||
| | `reminders.includePastDue` | bool | true | Include overdue/past-due reminders | | ||
| | `notion.enabled` | bool | false | Enable fetching tasks from Notion via Agent tools | | ||
| | `notion.tasksDatabaseId` | string | "" | Target Notion Database ID for daily tasks | | ||
| | `notion.limit` | int | 5 | Max number of Notion tasks to include | | ||
| | `emails.enabled` | bool | false | Enable important emails feature | | ||
| | `emails.icloudPassword` | string | "" | iCloud Mail app-specific password | | ||
| | `emails.limit` | int | 10 | Maximum emails to show | | ||
|
|
@@ -447,6 +479,10 @@ Good morning - Today is Saturday, February 3, 2024. Partly cloudy skies, around | |
| ✅ **Reminders:** | ||
| • Pick up prescription | ||
|
|
||
| 📝 **Notion Focus for Today:** | ||
| • High: Finish architecture docs | ||
| • In Progress: Refactor agent memory | ||
|
|
||
| 📧 **Emails needing attention:** | ||
| • Amazon: Your order has shipped | ||
| • Chase: Payment received | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Step 6 checks
config.notion.enabledandconfig.notion.tasksDatabaseId, but the gathered JSON schema used by this skill only exposes flat config fields (for exampleemails_enabled,emails_limit, etc. inscripts/daily_briefing_orchestrator.sh), and noconfig.notionobject is emitted. Because the workflow requires the agent to rely on that gathered file, this condition will never become true in normal runs, so the new Notion integration is effectively always skipped.Useful? React with 👍 / 👎.