Projekt

Allgemein

Profil

Aktionen

Webhooks

technische Voraussetzung:

  1. Installation PostgreSQL HTTP Client https://github.com/pramsey/pgsql-http
  2. Datenbank-Update ausführen

Konfiguration

  • Webhooks werden werden über das tabellarische Modul Webhooks konfiguriert Hauptmenü
  • Jeder Eintrag führt zur Anlage eines Datenbank-Triggers der bei Ausführung einen HTTP-Request an die konfigurierte URL schickt.
  • Beispielkonfigurationen:
    wh_name wh_schema wh_table wh_timing wh_event wh_url wh_data wh_data_type
    slack_webhook_eingrech public eingrechdokument AFTER INSERT https://hooks.slack.com/triggers/...... '{"Rechnungsnummer": "' || ($1).beld_dokunr || '"}' application/json
    slack_webhook_bdepab public bdepab AFTER INSERT https://hooks.slack.com/triggers/....... '{ "mitarbeiter": "' || (SELECT nameAufloesen(ll_db_usename) FROM llv WHERE ($1).bdab_minr = ll_minr) || '", "bdab_id"": "' || ($1).bdab_id || '", "bdab_anf"": "' || ($1).bdab_anf || '", "bdab_end"": "' || ($1).bdab_end || '", "abw_grund"": "' || (SELECT ab_txt FROM bdeabgruende WHERE ($1).bdab_aus_id = ab_id) || '" }' application/json
    teams_webhook_eingrech public eingrechdokument AFTER INSERT https://.....webhook.office.com/webhookb2/........ '{ "type"":"message", "attachments":[ { "contentType":"application/vnd.microsoft.card.adaptive", "contentUrl":null, "content":{ "$schema":"http://adaptivecards.io/schemas/adaptive-card.json", "type"":"AdaptiveCard", "version":"1.2", "body":[ { "type": "TextBlock", "text": "neue Eingangsrechnung: ' || ($1).beld_dokunr || '" } ] } } ] }' application/json

Von [X] Philipp Wolak vor 5 Monaten aktualisiert · 1 Revisionen