Integration with discord can be used to send alerts to users and channels to notify when certain events are triggered.
Configuration config.json was created using AutoFlow version 0.2.5
Is you have questions about this example, feel free to post your question on the community "Ask Questions" website.
- Create an HTTP Server
- Create an endpoint
- NOTE: under properties the method must be POST
- From the right panel, press Action tab -> communication, Drag and drop HTTP-Request to the end of the flow
- From the right panel, press Action tab -> data, Drag and drop Set to the end of the flow
Discord takes in HTTP request body as below
{
"content": "Message content"
}
Use Data/Set action to create the object.
- url: NOTE: Paste the discord webhook
- Method: POST
- Body: Contents of what is being posted to discord. NOTE: May need to specify the content type as application json. { “Content-Type”: “Application/JSON” }
- Header: blank
- Query: blank
- Timeout: Default
- Output-location: Drag and drop the response body from right data panel
Select Method Post and Paste your discord http server. NOTE: Yours may differ
In the HTTP Request Header, insert the message you want to send. For example
Hello World!
https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
https://birdie0.github.io/discord-webhooks-guide/discord_webhook.html