import requests from app.config import settings # MVPではZapier/IFTTTなどWebhookにMarkdownを渡す方式を採用 def post_to_note(title: str, body_md: str): if not settings.NOTE_WEBHOOK_URL: # Webhook未設定の場合はスキップ return {"status": "skipped", "reason": "NOTE_WEBHOOK_URL not set"} resp = requests.post(settings.NOTE_WEBHOOK_URL, json={"title": title, "content_md": body_md}) return {"status": resp.status_code, "resp": resp.text[:200]}