From 5d3080ba7434d690aa65451b06050926aa0bf709 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Sat, 31 Jan 2026 17:37:32 +0000 Subject: [PATCH] Fix notion script + update lead-engine debug tools --- lead-engine/debug_leads.py | 15 +++++++++++++++ scripts/clawd_notion.py | 1 + 2 files changed, 16 insertions(+) create mode 100644 lead-engine/debug_leads.py diff --git a/lead-engine/debug_leads.py b/lead-engine/debug_leads.py new file mode 100644 index 00000000..7ae2b630 --- /dev/null +++ b/lead-engine/debug_leads.py @@ -0,0 +1,15 @@ +from db import get_leads +import json + +def debug(): + leads = get_leads() + print(f"--- DEBUGGING LEADS ({len(leads)}) ---") + for lead in leads: + print(f"ID: {lead['id']}") + print(f" Company: {lead['company_name']}") + print(f" Status: '{lead['status']}'") # Anführungszeichen wichtig um Leerschritte zu sehen + print(f" Enrichment: {lead['enrichment_data']}") + print("-" * 20) + +if __name__ == "__main__": + debug() diff --git a/scripts/clawd_notion.py b/scripts/clawd_notion.py index b0f1d999..675c8a90 100644 --- a/scripts/clawd_notion.py +++ b/scripts/clawd_notion.py @@ -76,6 +76,7 @@ def get_status_options(db_id): status = props.get("Status", {}).get("status", {}) return [opt["name"] for opt in status.get("options", [])] +def get_page_properties(page_id): res = request("GET", f"https://api.notion.com/v1/pages/{page_id}") return res.get("properties", {}) if res else {}