Skip to content

Instantly share code, notes, and snippets.

@Catbuttes
Last active July 26, 2020 20:24
Show Gist options
  • Save Catbuttes/cddb44aafdbc93186dd0717ca2ffcae2 to your computer and use it in GitHub Desktop.
Save Catbuttes/cddb44aafdbc93186dd0717ca2ffcae2 to your computer and use it in GitHub Desktop.

Setting up a webhook to post new subreddit posts to a discord channel

Set up the webhook

  1. Go to Edit Channel on the channel you want to add the webhook to, then Integrations on the left hand side
  2. If the channel already has webhooks, click on View Webhooks and then the New Webhook button. If there are no existing webhooks, then you will only have a Create Webhook button in place of View Webhooks
  3. In the new webhook screen, enter in the name you wish to have the posts come in under and an avatar for the name
  4. Copy the Webhook URL - KEEP THIS PRIVATE
  5. Click save.

Set up IFTTT

  1. Go to IFTTT and log in
  2. Start a new applet
  3. Set the trigger service to Reddit and select the Any new post in subreddit option
  4. Enter the subreddit name eg. "RealEngineering" and create the trigger
  5. Set the action to Webhook and select the Make a web request option
  6. Set the URL field to the Webhook URL you copied earlier
  7. Set the Method to POST
  8. Set the Content Type to application/json
  9. Set the body to the following
{"embeds":[{"title":"{{Title}}","type":"rich","description":"{{Content}}","url":"{{PostURL}}","color":1127128}]}
  1. Hit Save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment