Tutorial: Automate Discord to post your new content
Discord has become a great hub for a lot of creators to center their communities. However, it adds one more place that people need to publish content when it comes out.
While there are many bots that can take care of these things, I wanted something really simple without having to add all the other functionality that comes with it: I wanted something to monitor an RSS feed and then post a notice to a channel when something changed. The idea is that I wouldn’t have to remember to let the people on my server know when I made a new YouTube video or published a new blog; it would just kind of happen for me.
I found a solution to my issue by using Discord’s Web Hooks feature and a service called IFTTT, which automates many actions online with multiple services. I use this method because I do not know how to code my own Discord bot, and I dislike adding a completely new bot just to add one function that the one I’m using doesn’t do.
Step 1: IFTTT
You can sign up for IFTTT on their site. A previous version of this guide used Zapier, another service that was limited in its free usage; IFTTT doesn’t have that problem.
Step 2: Get a Discord URL
In Discord, go to the channel you want to post your messages to and click the gear icon beside its name in the menu. Go to the “Webhooks” menu at the bottom, and click “Create Webhook.”
From there, you can give your hook a name (this is what the name of the announcements will show up as in the chat) and choose where it will post. The URL at the bottom is important because you’re going to be using it in Step 3 and 4 below. Keep that on hand.
Step 3: Make a new Applet
Going to “My Applets” at the top of IFTTT when logged in and clicking “New Applet” will bring you to a screen that asks you “If this, then that.” You can click on the “this” to choose a trigger and “that” to choose an action.
For this example, I want a message to be posted when I post new YouTube videos. In the search field, I search for YouTube and choose it; I then choose the trigger “New public video uploaded by you.” Other triggers may ask you for deeper options, like setting custom parameters.
Next, we choose an action by clicking on the “That” in “If This, Then That.” Once there, type in “webhook” into the search to bring up “Maker Webhooks.” From there, choose “Make a Web Request” as an action.
Step 4: Customizing the web request
The web request part of the recipe is a bit complicated, but I’m going to go through it step by step. There are four fields for you to fill out in order to get the process working.
URL (required): this is the Discord URL you got in Step 1. Input it here.
Method: This should be set to POST
Content Type: This should be set to “application/json”
Body: This is where you put the message you want to be sent to the Discord channel. Hitting the “+ Ingredient” button will bring up elements of your Trigger (in this case, things like the YouTube video title, its description, or URL) in order to include in the message. Use these to make a message that works for you. Keep in mind you can use things like Discord emotes if you include them as text, or format text as links through markdown “[linked text](http://urlgoeshere.com)”
Step 5: Enjoy and experiment!
After completing the process, you can turn your Applet on and the event should happen every time the triggering action does. Right now, my Discord server will create messages when I post a new blog, video, or specific tweet.
You can find setups for mine below: I encourage you to mess around with what works for you! Keep in mind that every app has its own unique settings, so you may need to pay attention (gasp) to what it’s asking from you.
- Triggered on “New Post”
- WordPress was signed in using a sign-in
- “Any new post”
- Triggered on “Search Mention”
- Using Twitter’s query operators, I can specify that I want tweets only from me that have “http://twitch.tv/mattdemers” in them to trigger. I enter “from:mattdemers http://twitch.tv/mattdemers” in the “Search Term.”
- Triggered on “New Video In Channel”
Matt Demers writes about video games, culture and the Internet. You can find him on Twitter and watch him stream on Twitch. Subscribe to his e-mail newsletter to get a weekly digest of the new things he posts.