Skip to content

Instantly share code, notes, and snippets.

@jagrosh
Last active December 4, 2023 20:28
Show Gist options
  • Save jagrosh/7606268fc9f1d3e90ce9efc79294f960 to your computer and use it in GitHub Desktop.
Save jagrosh/7606268fc9f1d3e90ce9efc79294f960 to your computer and use it in GitHub Desktop.
Simple Webhook Tutorial (Twitter -> Discord)

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 Zapier

  1. Go to https://zapier.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 or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

  3. 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 a Zap

  1. Click the "Make a Zap" button. When selecting a trigger app, search for Twitter and select "My Tweet" and then Save + Continue TwitterTriggers

  2. Connect your twitter account (if you haven't already) and Save & Continue

  3. Make sure you've tweeted at least once, and press the Fetch & Continue button, and then Continue if it succeeds.

  4. For the Action App, select Webhooks, and then pick POST Webhooks POST

  5. Fill in the template as shown below. Make sure to use the webhook URL we got from Step 2. Also, in the "Data" section, you can edit the fields, but don't edit the names of the fields, or Discord might not accept the input. Template
    Also make sure to scroll down and fill this one in exactly like this: ContentType

  6. Test to make sure that it's working. If successful, it will post to your Discord channel Success

  7. Finish and turn the Zap on, so it's always running!

Other Resources

Copy link

ghost commented May 29, 2018

thanks a lot! its working l 👍

@K2NK
Copy link

K2NK commented Jun 4, 2018

Hi..how to make the weebhook include/embed attachment?
Thanks

@TheBloodHound
Copy link

Thank you!

@gavwin
Copy link

gavwin commented Jul 3, 2018

Nice tutorial 👍

@NNTin
Copy link

NNTin commented Jul 9, 2018

I added a Heroku Button to my discord-twitter-bot project. You can now deploy the bot on Heroku free of charge in under 5 minutes.

YouTube Video

@prepper25
Copy link

any way to add embed with zapier?

@WonDerMeGa1
Copy link

Hey, I got a question, I basically followed that tutorial step by step since I definitely don't have the knowledge to figure this all out on my own with the only change being that the webhook is to another user's twitter account. So far so flawless, with one exception, which is that the webhook doesn't seem to be showing pictures or any other form of media if it gets posted alongside the tweet. I even tried to experiment with the File field and filling the "Entities Attached Media Media URL" in there, but that on the other hand when I go for the test tweet only shows me the picture and not the text or anything else, and when I simply insert it into "content" field it obviously only spits out the link and doesn't display the picture. So, since I have now run out of my limited options, since this is my first time setting up a webhook in general, I'd really appreciate some help from some of you who are more experienced then me. Thank you in advance!

@NoobKeksTV
Copy link

doesnt work. says "We had trouble sending your test through. Please try again. Error:
discordapp.com returned (400) Bad Request and said nothing"

@ivancano19
Copy link

the bad thing that, when you reach the limit, you have to pay if or if the other tweets come out. Does anyone have another option?

@Blapor
Copy link

Blapor commented Sep 19, 2018

Really useful, thanks!

@Aurorum
Copy link

Aurorum commented Jan 5, 2019

For those asking about the trial: no, if you're ONLY using this, you won't run into any issues. 100 requests per month is more than enough, however there's a delay of 15 minutes instead of 5. As soon as you add another step to your zap, then it'll stop working after the trial.

@I-have-two-brain-cells
Copy link

I-have-two-brain-cells commented Feb 18, 2019

can you use this for other platforms or just twitter

@juanissoawesome
Copy link

Does anyone know how to make the bot keep tweeting up-to-date posts continuously?
If so, DM me on discord and tell me who you are and how you found me before you tell me how: who_doge#7132

@Deanosim
Copy link

This doesn't appear to work anymore
The app returned "405: Method Not Allowed". It looks like the app or service is experiencing a problem. Please contact our support team for help fixing this error.

@wissehes
Copy link

wissehes commented Jun 8, 2019

@Deanosim, yes it does

@lights0
Copy link

lights0 commented Jun 17, 2019

Hi can you tell me how to Data for "tweet in list". When I try to type in specific usernames and tweets show up instead of general "username", "text", "url", "profile url".

@Photolinkeeper
Copy link

Hi! does anyone know how to view just the tweets from a specific account? I did all the steps and everything works fine but for example right now the zap shows the retweets that this account made, so there is my question, how can set up that? I just want to see the tweets and not the retweets from this account.

@Blue-Waffle
Copy link

doesnt work. says "We had trouble sending your test through. Please try again. Error:
discordapp.com returned (400) Bad Request and said nothing"

Has anyone found the solution yet? It seems like emoji in the tweet cause this error. I sent a test of a tweet with emoji and it returns error 400 bad request, but when I test one without emoji, it goes through fine.

@LimePotato
Copy link

simply doesnt work

@Rexogamer
Copy link

webhooks are paid now

@xardit
Copy link

xardit commented Aug 7, 2020

no longer possible, since needs twitter auth

@Wafelack
Copy link

Wafelack commented Oct 6, 2020

Thx a lot, it works better than IFTTT

@Jeydin21
Copy link

As of 2020, this is no longer working because Zapier hasn't verified their Discord bot yet if anyone's wondering.

Copy link

ghost commented Nov 23, 2020

Yeah..... not helpful because i am not overpaying for this.

@richardr35
Copy link

Easy to follow and works fine so far. This works as of 4/21

@PaimonWheeWhee
Copy link

Yea it got verified like a few days after the verification came out lol

@aboutyurin
Copy link

Thanks :D

@xoussamax
Copy link

now twitter is premium on zapier and ifttt

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