Quantcast
Channel: Mattermost Discussion Forums - Latest posts
Viewing all articles
Browse latest Browse all 26210

Incoming WebHook Integration:

$
0
0

Requesting Assistance

I'm very new to Mattermost and creating custom integration's. I'm using the following script to monitor a folder and forward changes to Mattermost:

#!/bin/bash

tail -n0 -F "$1" | while read LINE; do
* (echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode *
** "payload={\"text\": \"$(echo $LINE | sed "s/\"/'/g")\"}" "$2";**
done

The script work as designed but it is missing the option to override the username (payload={"username": "robot",) channel (payload={"channel": "off-topic") and icon (payload={"icon_url": "http://somewebsite.com/somecoolimage.jpg").

Can someone help me with formatting to convert the script to add these functions (ie: where does the double quotes and backslashes go?).

Thank you.


Viewing all articles
Browse latest Browse all 26210

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>