Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Webhooks allow you to send You can use Flock's webhooks to send and receive messages from external services . Flock's webhooks work with using JSON packets to transmit messages. You can also use services like IFTTT and Zapier to set up simple integrations to read RSS feeds, enable web tickers, etc. An incoming webhook posts messages to a Flock channel from an external service.

Create an incoming webhook

...

Code Block
themeEclipse
curl -X POST <Incoming Webhook URL> -H "Content-Type: application/json" -d '{
"text": "This is a test message"
}'

Transforming JSON payload formats


Flock's incoming webhooks support Message objects with two common attributes or keys - "text" for message content and "flockml" for message formatting. Please refer to Message for other attributes.

Code Block
themeEclipse
curl -X POST <Incoming Webhook URL> -H "Content-Type: application/json" -d '{
"text": "This is a test message."
}'

...

Code Block
themeEclipse
curl -X POST <Incoming Webhook URL> -H "Content-Type: application/json" -d '{
"flockml":"<flockml>Hello! Welcome to <b>Flock</b>!</flockml>"
}'


Transforming JSON payload formats


Some external apps and services may send data that does not follow Flock's Message JSON payload format, and hence it is not parsed.

...