Bohe Diet Notion Check-in
Required reference
Before writing to Notion, read references/notion-diet-schema.md. It contains the target data source, view, field names, type conventions, and upsert rules.
Workflow
Inspect every attached screenshot.
- If the image is available as a local path, use
view_image. - Extract only the diet record fields; do not record avatar, username, or account ID unless the user explicitly asks.
- If the image is available as a local path, use
Extract these fields from each screenshot:
- Date.
- Total intake, budget, remaining or over-budget calories, exercise calories.
- Carbs/protein/fat actual and target grams.
- Breakfast/lunch/dinner/snack calories and food text.
Normalize values.
- Convert dates to
YYYY-MM-DD. - Title format:
YYYY-MM-DD 饮食记录. - Source:
薄荷健康. 热量结余(千卡)is positive when the screenshot says还可以吃; negative when it says多吃了.超预算is__YES__only when the record is over budget; otherwise__NO__.- Use
0and empty text for a missing meal slot only when the screenshot clearly has no such slot.
- Convert dates to
Upsert into Notion.
- Query the
每日饮食记录view and look for an existing row with the samedate:日期:start. - If found, update that page.
- If not found, create a new page in the 饮食记录 data source.
- Never create a duplicate for a date that already exists.
- Query the
Verify after writing.
- Query the same view after create/update.
- Confirm the target date(s), total intake, calories balance, and meal text are present.
Reading rules
- Prefer exact visible text over inference.
- Preserve food names as shown. If OCR/visual reading is uncertain, write the best-effort text and mention the uncertain item in the final response.
- Do not invent macro values, meal calories, or food details. If a required number is unreadable, ask the user for that number instead of guessing.
Notion reliability
- Notion connector calls may intermittently fail with transport errors. Retry the same read/write once or twice.
- If a create/update call returns an async task ID, treat it as accepted, then verify by querying the view.
- If verification does not show the new row immediately after an accepted async create, do not blindly create it again; query once more before deciding it failed.
Final response
Report only the useful result:
- dates created;
- dates updated;
- any uncertain OCR/visual items that the user may want to correct.