[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import sys
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
|
||||
NOTION_TOKEN_FILE = "/app/notion_token.txt"
|
||||
PERSONAS_DB_ID = "2e288f42-8544-8113-b878-ec99c8a02a6b"
|
||||
|
||||
def load_notion_token():
|
||||
with open(NOTION_TOKEN_FILE, "r") as f:
|
||||
return f.read().strip()
|
||||
|
||||
def query_notion_db(token, db_id):
|
||||
url = f"https://api.notion.com/v1/databases/{db_id}/query"
|
||||
headers = {
|
||||
"Authorization": f"Bearer {token}",
|
||||
"Notion-Version": "2022-06-28"
|
||||
}
|
||||
response = requests.post(url, headers=headers)
|
||||
return response.json()
|
||||
|
||||
token = load_notion_token()
|
||||
data = query_notion_db(token, PERSONAS_DB_ID)
|
||||
print(json.dumps(data.get("results", [])[0], indent=2))
|
||||
Reference in New Issue
Block a user