Implementierung E-Mail-Dokument-Automatisierung und technischer Check der Versand-Blocker. Workaround via SuperOffice-Aktivitäten etabliert.
51 lines
1.5 KiB
Python
51 lines
1.5 KiB
Python
import json
|
|
import os
|
|
import sys
|
|
from dotenv import load_dotenv
|
|
load_dotenv(override=True)
|
|
from superoffice_client import SuperOfficeClient
|
|
|
|
# Force unbuffered stdout
|
|
sys.stdout.reconfigure(line_buffering=True)
|
|
|
|
def discover():
|
|
print("🔍 Starting SuperOffice Discovery Tool (Direct Sending)...")
|
|
|
|
try:
|
|
client = SuperOfficeClient()
|
|
except Exception as e:
|
|
print(f"❌ Failed to init client: {e}")
|
|
return
|
|
|
|
if not client.access_token:
|
|
print("❌ Auth failed. Check .env")
|
|
return
|
|
|
|
# 4. Check Sending Endpoints
|
|
print("\n--- 4. Direct Sending Endpoints ---")
|
|
|
|
# EMail Agent
|
|
print(f"Checking Endpoint: Agents/EMail/GetDefaultEMailFromAddress...")
|
|
try:
|
|
res = client._get("Agents/EMail/GetDefaultEMailFromAddress")
|
|
if res:
|
|
print(f"✅ Agents/EMail active. Default From: {json.dumps(res)}")
|
|
else:
|
|
print(f"❓ Agents/EMail returned None (likely 404/403).")
|
|
except Exception as e:
|
|
print(f"❌ Agents/EMail check failed: {e}")
|
|
|
|
# TicketMessage
|
|
print(f"Checking Endpoint: Archive/dynamic (Ticket)...")
|
|
try:
|
|
res = client._get("Archive/dynamic?$select=all&$top=1&entity=ticket")
|
|
if res:
|
|
print(f"✅ Ticket entities found. Service module active.")
|
|
else:
|
|
print(f"❓ No Ticket entities found (Service module inactive?).")
|
|
except Exception as e:
|
|
print(f"❌ Ticket check failed: {e}")
|
|
|
|
if __name__ == "__main__":
|
|
discover()
|