#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 Zapier, which automates many actions online with multiple services. I'm not paid by Zapier for this post; I just found it does the simplest job of automation.
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.
Registering with Zapier is pretty simple with an e-mail and password. You're defaulted to their Free Plan, which allows you to create up to 250 different Zaps (tasks that they run/monitor) and for those Zaps to run 100 times per month. Obviously there are paid plans that up these rate limits, but for many content creators they will not be hitting those limits. Discord allows you to generate Web Hooks that will give services access to posting on your channel. These work similarly to API Keys or Channel Invites: you generate them, and can revoke them if they stop working, cause problems, or other reasons.You can generate a web hook for a channel by going to the "Edit Channel" option (the gear to the right of the channel name). This is also where you would edit the channel's name, invites and permissions. You can also access this menu by going to the Server Settings, as well.
Clicking "Create Webhook" generates a key ("Webhook URL") that is for a specific channel. This is where your messages will be posted after we set up Zapier. Everything else (name, icon, etc) is pretty unimportant.
Going back to Zapier.com and signing in, we can search for a couple things to get started. Click the "Make a Zap" button in the top-right corner of the site to start making a new one.Depending on what service you're posting your content to, you can search for "Wordpress," "YouTube," "RSS," "Twitter," "Instagram," or any other kind of service.
Again, you only have 100 posts per month across all Zaps, so adding every single service you use will burn them out quickly.
I've set up three that suit my needs:
- A Wordpress Zap for new blog posts. You can also use the RSS app if your blog isn't hosted on Wordpress.
- A YouTube Zap for new videos.
- A Twitter Zap that will repost tweets I make from my account that have the link "http://twitch.tv/mattdemers" in them.
For instance, in the RSS app you can choose when your site updates. For YouTube, you can set when a new video is uploaded to a channel, by a person, or when something new appears in a search.
This is the step where you would set up what happens after the Zap triggers: posting to Discord.After saving the triggering action, you'll be brought to a second step where you search for an app again. This time, you'll look for "Webhooks by Zapier."
In the next step, select "POST."
In the next step, place your webhook URL that you got from Discord in Step 2 in the URL field.
In the "Payload Type" field, enter "json."
In the "Data" field, you'll select how your post will look in Discord. First, type "content" in the left field. To the right, you'll have a bigger area where you can craft the post itself.
Clicking the small square in the top-right (red square) gives you template options that you can insert into your message that will be filled in by the information Zapier received. For instance, you can add your blog's post title, or YouTube video title, or even the YouTube thumbnail.
Keep in mind, this field works exactly like Discord, so you can add emote text that will show up when the message is sent. You can attach links to text by using Markdown syntax:
[Label goes here](http://linkyouwanttoattachtoit)
Otherwise, I leave the rest of the form blank besides adding "no" into the "Wrap Request In Array" and "Unflatten" fields farther down.
Hitting "Continue" allows you to test the Zap. Testing the Zap will post to your channel, so if you're screwing around, be careful not to spam. You can alleviate this by making a private channel, generating a webhook for it, and then changing the webhook URL later.
After completing the process, you can turn your Zap 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.Again, keep in mind all of your Zaps can only run 100 times a month.
You can also Copy your Zap from the Zapier dashboard to make the process easier; changing the trigger means you don't have to re-input the webhook URL or mess with the settings. You will have to change the content, as if you change the app (YouTube to Twitter, for example) the information it pulls in will be different.
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.
Wordpress:
- Triggered on "New Post"
- Wordpress was signed in using a sign-in
- Post Status = "published" in "Edit Options"
- 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"
- YouTube ID is added to "Edit Options"
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.
The MIT License (MIT) Copyright (c) 2016 Matt Demers
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.