import sqlite3,json
c=sqlite3.connect("/home/ultimo/.n8n/database.sqlite")
nodes=json.loads(c.execute("SELECT nodes FROM workflow_entity WHERE id=?",("qBWf8H9yx6JkR1or",)).fetchone()[0])
print("=== TODOS os nós do dispatcher ===")
for n in nodes:
    t=n["type"].split(".")[-1]
    dis=n.get("disabled",False)
    mark=" [DESATIVADO]" if dis else ""
    trig=" <== TRIGGER" if ("trigger" in n["type"].lower() or "schedule" in n["type"].lower()) else ""
    print("  ",n["name"],"|",t,mark,trig)
