Skip to content

Instantly share code, notes, and snippets.

View senk's full-sized avatar

Robin Naundorf senk

  • Germany, Muenster
View GitHub Profile
### Keybase proof
I hereby claim:
* I am senk on github.
* I am senk (https://keybase.io/senk) on keybase.
* I have a public key ASACfhKrgZhB4aroHk8ITjgBoLaxAxAktvVULj6PvL5D0Ao
To claim this, I am signing this object:
@senk
senk / otrs2mattermost.sh
Last active August 18, 2021 20:13 — forked from meilon/otrs2mattermost.sh
Post OTRS Ticket notifications to Mattermost
#!/bin/bash
# This is a script to send a notification from OTRS to Mattermost.
# Create a new Generic Agent and select "TicketCreate" under event based events.
# Finally, put in the path to the script into the command box.
# Of course you could use it for different notifications, but OTRS is only giving the ticket number and id to the script.
WEBHOOK_URL="<HOOKURL>"
BOT_NAME="OTRSbot"
#!/bin/bash
# This is a script to send a notification from OTRS to Mattermost.
# Create a new Generic Agent and select "TicketCreate" under event based events.
# Finally, put in the path to the script into the command box.
# Of course you could use it for different notifications, but OTRS is only giving the ticket number and id to the script.
header="Content-Type: application/json"
ticketid=$2
request_body=$(< <(cat <<EOF
### Keybase proof
I hereby claim:
* I am senk on github.
* I am senk (https://keybase.io/senk) on keybase.
* I have a public key whose fingerprint is 0482 DA4E 7C6C FF94 83CE 01AC 9BEE 35DB 1407 478E
To claim this, I am signing this object: