Skip to content

Instantly share code, notes, and snippets.

@Shillos
Forked from DerEnderKeks/WebhookTutorial.md
Created June 16, 2022 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shillos/ab287c73918576568882544368e28195 to your computer and use it in GitHub Desktop.
Save Shillos/ab287c73918576568882544368e28195 to your computer and use it in GitHub Desktop.
Simple Webhook Tutorial (Twitter -> Discord using IFTTT)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel.

Step 1 - Register on IFTTT

  1. Go to https://ifttt.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets.

  2. In the settings for that channel, find the Webhooks option and create a new webhook.

Note: Do NOT give this URL out to the public. Anyone can post messages to this channel using it, without even needing to be in the server. Keep it safe!

  1. You can name the webhook whatever you want, and give it any image; for this tutorial we override them later anyway. Keep track of the URL; we'll need it later.

Step 3 - Make an IF recipe

  1. Click on you profile icon in the top right corner
  2. Click on Create
  3. Click on This
  4. Search for Twitter
  5. Click on the Twitter square
  6. Select a trigger like New tweet by you or New tweet by a specific user
  7. Set the options for the selected trigger (depending on which you selected)
  8. Click on That
  9. Search for Webhook
  10. Select the Webhook square
  11. Select the Make a web request action

Step 4 - Setup the webhook

  1. Paste your webhook URL in the URL box.
  2. Select Post in method, and application/json in content type.
  3. Paste the following snippet into the Body field and modify it to your liking. You should at least set the icon_url. (You can add other details like the post time, click the Add ingredient button to see what is available)
{
  "username":"@{{UserName}}",
  "icon_url":"<url to image>",
  "content":"{{LinkToTweet}}"
}

Step 5 - Profit

Now what you have to do is just click Create Action. It will start to run immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment