@devries-cameron20 / OCIU-npo Mirror · read-only
Fork 0

Mirrored from https://github.com/Camo67/OCIU-npo.git

Synced Nov 21, 03:37 UTC

1 import requests
2 import os
3
4 class AutomationLayer:
5 def __init__(self):
6 self.webhook_url = os.getenv("N8N_WEBHOOK_URL")
7
8 def trigger_workflow(self, data: dict):
9 if self.webhook_url:
10 return requests.post(self.webhook_url, json=data)
11 return {"status": "no-webhook-configured"}
12
13 automation = AutomationLayer()