Create a gist now

Instantly share code, notes, and snippets.

Embed
Simple Webhook Tutorial (Twitter -> Discord using IFTTT)

You can still find the guide in the revision tab. (On phones: A history-like button) However, it is very old and unmaintained, so it's for reference only.

My Discord account has become a victim in the selfbot crackdown. If you'd like to, send an email to support@discordapp.com with the following:

Hello Discord,
Recently, my dear friend austinhuang#1076 got his account deleted for selfbotting. I believe his actions were not meant to harm Discord and they were wrongfully punished. I know, and he also knows, that selfbotting is against ToS but you could've at least talk to him before deleting his account. I am writing this message to ask you to unban him. He has valuable assets like DiscordTel and valuable contributions like the AD and Webhook huides. 

Thanks for considering these aspects,

<Your Name>

I understand how you feel and will be with you forever.

To reach me, click here or here.

Another note: If you need support, go to http://discord.gg/ifttt (Nowhere associated with me).

@ElkoHRH

This comment has been minimized.

Show comment
Hide comment
@ElkoHRH

ElkoHRH Oct 30, 2016

Hi ! When I tweet, anything appear in my Discord Server. I need help ! Thank you

ElkoHRH commented Oct 30, 2016

Hi ! When I tweet, anything appear in my Discord Server. I need help ! Thank you

@onikolajev

This comment has been minimized.

Show comment
Hide comment
@onikolajev

onikolajev Dec 1, 2016

The first example of JSON body worked well with webhook
{ "username" : "IFTTT Twitter Test", "avatar_url" : "https://pbs.twimg.com/profile_images/767879603977191425/29zfZY6I_400x400.jpg", "embeds": [ { "title" : "{{CreatedAt}}", "url" : "{{LinkToTweet}}", "author" : { "name" : "@{{UserName}}", "url" : "https://twitter.com/{{UserName}}" }, "description" : "{{Text}}" } ] }
but I couldn't use 2nd JSON structure with preview:
{ "username":"IFTTT Twitter Test", "icon_url":"https://pbs.twimg.com/profile_images/767879603977191425/29zfZY6I_400x400.jpg", "text":"@{{UserName}} tweeted this at {{CreatedAt}}: {{LinkToTweet}}" }

onikolajev commented Dec 1, 2016

The first example of JSON body worked well with webhook
{ "username" : "IFTTT Twitter Test", "avatar_url" : "https://pbs.twimg.com/profile_images/767879603977191425/29zfZY6I_400x400.jpg", "embeds": [ { "title" : "{{CreatedAt}}", "url" : "{{LinkToTweet}}", "author" : { "name" : "@{{UserName}}", "url" : "https://twitter.com/{{UserName}}" }, "description" : "{{Text}}" } ] }
but I couldn't use 2nd JSON structure with preview:
{ "username":"IFTTT Twitter Test", "icon_url":"https://pbs.twimg.com/profile_images/767879603977191425/29zfZY6I_400x400.jpg", "text":"@{{UserName}} tweeted this at {{CreatedAt}}: {{LinkToTweet}}" }

@austinhuang0131

This comment has been minimized.

Show comment
Hide comment
@austinhuang0131

austinhuang0131 Dec 13, 2016

@sw1ch @mauri1790

{ "username":"IFTTT Twitter Test", "avatar_url":"https://pbs.twimg.com/profile_images/767879603977191425/29zfZY6I_400x400.jpg", "text":"@{{UserName}} tweeted this at {{CreatedAt}}: {{LinkToTweet}}" }
Owner

austinhuang0131 commented Dec 13, 2016

@sw1ch @mauri1790

{ "username":"IFTTT Twitter Test", "avatar_url":"https://pbs.twimg.com/profile_images/767879603977191425/29zfZY6I_400x400.jpg", "text":"@{{UserName}} tweeted this at {{CreatedAt}}: {{LinkToTweet}}" }
@mauri1790

This comment has been minimized.

Show comment
Hide comment
@mauri1790

mauri1790 Dec 23, 2016

I have the same problem, 2nd structure with preview doesn't work for me. Any suggestions?

I have the same problem, 2nd structure with preview doesn't work for me. Any suggestions?

@Godimas

This comment has been minimized.

Show comment
Hide comment
@Godimas

Godimas Jan 6, 2017

@austinhuang0131
How would you go about including an image thats attached to a tweet - if there is one?

Godimas commented Jan 6, 2017

@austinhuang0131
How would you go about including an image thats attached to a tweet - if there is one?

@SillyBirds

This comment has been minimized.

Show comment
Hide comment
@SillyBirds

SillyBirds Jan 9, 2017

Any chances you could also make one of these, but with facebook?

Any chances you could also make one of these, but with facebook?

@Chewsterchew

This comment has been minimized.

Show comment
Hide comment
@Chewsterchew

Chewsterchew Jan 29, 2017

@SillyBirds shouldn't be too difficult, follow same process but search for "Facebook" and select "New status message by you"

@SillyBirds shouldn't be too difficult, follow same process but search for "Facebook" and select "New status message by you"

@Erictigerawr

This comment has been minimized.

Show comment
Hide comment
@Erictigerawr

Erictigerawr Feb 1, 2017

Very helpful, thank you!

Very helpful, thank you!

@aensaro

This comment has been minimized.

Show comment
Hide comment
@aensaro

aensaro Feb 11, 2017

Really cool! I'd want to that for a RSS feed but the content of the feed is HTML and I don't know how to parse it. Here are the possible ingredients for an RSS feed in IFTTT:
000857 if new feed item from http

aensaro commented Feb 11, 2017

Really cool! I'd want to that for a RSS feed but the content of the feed is HTML and I don't know how to parse it. Here are the possible ingredients for an RSS feed in IFTTT:
000857 if new feed item from http

@Ulexos

This comment has been minimized.

Show comment
Hide comment
@Ulexos

Ulexos Mar 11, 2017

How does one add paragraphs to the part in "content" ?

Ulexos commented Mar 11, 2017

How does one add paragraphs to the part in "content" ?

@MichaelLawrenceDee

This comment has been minimized.

Show comment
Hide comment
@MichaelLawrenceDee

MichaelLawrenceDee Mar 20, 2017

Is there a way so I can automatically detect the image of the twitter account?

Is there a way so I can automatically detect the image of the twitter account?

@Barkpuppy1

This comment has been minimized.

Show comment
Hide comment
@Barkpuppy1

Barkpuppy1 Mar 25, 2017

i cant do step 3 because i dont see that wat it said about

i cant do step 3 because i dont see that wat it said about

@NNTin

This comment has been minimized.

Show comment
Hide comment
@NNTin

NNTin Mar 28, 2017

I wrote a discord-twitter-bot.

Advantages:

  • follows multiple twitter users
  • if desired posts in multiple text channels
  • no delay
  • more customization (more control over text formatting, image integration)

Disadvantages:

  • need a machine running 24/7 (e.g. a raspberry pi) or running it on a VPS which costs money. (Github offers a education pack which gives you $50 store credit on Digital Ocean for free, enough to host this bot for 10 months.)
  • setting it up is less user friendly. I've created a setupBot.py for that reason.

Here is the bot's discord server. Currently it mirrors tweets for 3 games: Dota 2, CS:GO and LoL.

NNTin commented Mar 28, 2017

I wrote a discord-twitter-bot.

Advantages:

  • follows multiple twitter users
  • if desired posts in multiple text channels
  • no delay
  • more customization (more control over text formatting, image integration)

Disadvantages:

  • need a machine running 24/7 (e.g. a raspberry pi) or running it on a VPS which costs money. (Github offers a education pack which gives you $50 store credit on Digital Ocean for free, enough to host this bot for 10 months.)
  • setting it up is less user friendly. I've created a setupBot.py for that reason.

Here is the bot's discord server. Currently it mirrors tweets for 3 games: Dota 2, CS:GO and LoL.

@coffffeeee

This comment has been minimized.

Show comment
Hide comment
@coffffeeee

coffffeeee Apr 12, 2017

does anybody know how to modify this to have it work for an RSS feed to discord instead of twitter

does anybody know how to modify this to have it work for an RSS feed to discord instead of twitter

@atomicfirepit

This comment has been minimized.

Show comment
Hide comment
@atomicfirepit

atomicfirepit May 19, 2017

@austinhuang Any chance you can do a tutorial with Twitch to Discord? Pretty please?

@austinhuang Any chance you can do a tutorial with Twitch to Discord? Pretty please?

@austinhuang0131

This comment has been minimized.

Show comment
Hide comment
@austinhuang0131

austinhuang0131 May 22, 2017

@Godimas @MichaelLawrenceDee It's impossible to determine If it has an image or not, and If it Doesn't it'll Show a stupid image Not found placeholder
@atomicfirepit Go to IFTTT, Twitch, new stream by You, maker,

{ "embeds": [ { "title" : "I'm streaming!", "url" : "http://twitch.tv/austinhuang0131", "description" : "Come watch!", "image":{"url":"https://cdn.discordapp.com/avatars/155784937511976960/dbfe71a042b9ace8936c8cf0a408e8db.webp"} } ] }

(The Example is mine so u must replace it or it'll Show me instead)
@NNTin tfw webhook No host No limit

Owner

austinhuang0131 commented May 22, 2017

@Godimas @MichaelLawrenceDee It's impossible to determine If it has an image or not, and If it Doesn't it'll Show a stupid image Not found placeholder
@atomicfirepit Go to IFTTT, Twitch, new stream by You, maker,

{ "embeds": [ { "title" : "I'm streaming!", "url" : "http://twitch.tv/austinhuang0131", "description" : "Come watch!", "image":{"url":"https://cdn.discordapp.com/avatars/155784937511976960/dbfe71a042b9ace8936c8cf0a408e8db.webp"} } ] }

(The Example is mine so u must replace it or it'll Show me instead)
@NNTin tfw webhook No host No limit

@sneak310

This comment has been minimized.

Show comment
Hide comment
@sneak310

sneak310 Jun 3, 2017

This doesn't consistently post the Tweets in Discord. It only catches some of them for some reason.

sneak310 commented Jun 3, 2017

This doesn't consistently post the Tweets in Discord. It only catches some of them for some reason.

@fourjr

This comment has been minimized.

Show comment
Hide comment
@fourjr

fourjr Jun 7, 2017

is there a way to send a message in discord and it will auto tweet?

fourjr commented Jun 7, 2017

is there a way to send a message in discord and it will auto tweet?

@cryotic

This comment has been minimized.

Show comment
Hide comment
@cryotic

cryotic Jun 8, 2017

How could I make it so that it doesn't post replies or retweets?

cryotic commented Jun 8, 2017

How could I make it so that it doesn't post replies or retweets?

@Odin2

This comment has been minimized.

Show comment
Hide comment
@Odin2

Odin2 Jun 14, 2017

Wondering about retweets as well ^

Odin2 commented Jun 14, 2017

Wondering about retweets as well ^

@darkash

This comment has been minimized.

Show comment
Hide comment
@darkash

darkash Jul 13, 2017

in case anyone still use this, the name is now "Webhook" instead of "Maker"

darkash commented Jul 13, 2017

in case anyone still use this, the name is now "Webhook" instead of "Maker"

@zecmo

This comment has been minimized.

Show comment
Hide comment
@zecmo

zecmo Jul 30, 2017

Thanks! This was helpful.

zecmo commented Jul 30, 2017

Thanks! This was helpful.

@Alejandro-AC

This comment has been minimized.

Show comment
Hide comment
@Alejandro-AC

Alejandro-AC Aug 19, 2017

@cryotic @Odin2

You can do that by using the "New tweet from search" Trigger of Twitter. And typing in the Search for parameter the following:
"From:TwitterUsername AND -Filter:Replies"

You can add several users separating them with " OR " and many other things can be done, check the api search operators.

Also I wanted to point that the second example, the simplified one, uses "icon_url" which doesn't work and the correct is "avatar_url" used on the first one.

@cryotic @Odin2

You can do that by using the "New tweet from search" Trigger of Twitter. And typing in the Search for parameter the following:
"From:TwitterUsername AND -Filter:Replies"

You can add several users separating them with " OR " and many other things can be done, check the api search operators.

Also I wanted to point that the second example, the simplified one, uses "icon_url" which doesn't work and the correct is "avatar_url" used on the first one.

@ipugsiehd

This comment has been minimized.

Show comment
Hide comment
@ipugsiehd

ipugsiehd Aug 29, 2017

Please note the second script still works, just GIFS will be shown as shortened links, therefore, they don't work.
Images and Videos should show a thumbnail still though.

Please note the second script still works, just GIFS will be shown as shortened links, therefore, they don't work.
Images and Videos should show a thumbnail still though.

@sigmap

This comment has been minimized.

Show comment
Hide comment
@sigmap

sigmap Aug 31, 2017

This might be outdated now, IFTTT doesn't have recipes anymore

sigmap commented Aug 31, 2017

This might be outdated now, IFTTT doesn't have recipes anymore

@Megalithe

This comment has been minimized.

Show comment
Hide comment

@sigmap use Webhooks https://ifttt.com/maker_webhooks
instead of Maker

@Megalithe

This comment has been minimized.

Show comment
Hide comment
@Megalithe

Megalithe Sep 2, 2017

What are the Avatar_url and icon_url supposed to do? I do not see references for these in the Twitter API documentation.
Having either present in my IFTTT recipe does not appear to have any effect in the post in discord?

What are the Avatar_url and icon_url supposed to do? I do not see references for these in the Twitter API documentation.
Having either present in my IFTTT recipe does not appear to have any effect in the post in discord?

@saltyNaCl

This comment has been minimized.

Show comment
Hide comment
@saltyNaCl

saltyNaCl Sep 15, 2017

Does anybody know how to write a json code to embed images instead of posting urls of the image?

Does anybody know how to write a json code to embed images instead of posting urls of the image?

@ethanxlee

This comment has been minimized.

Show comment
Hide comment
@ethanxlee

ethanxlee Sep 16, 2017

I cannot find the Maker thing in IFTTT, is it only in America or somthing? Thanks for the cool thing =D

I cannot find the Maker thing in IFTTT, is it only in America or somthing? Thanks for the cool thing =D

@oraclec137

This comment has been minimized.

Show comment
Hide comment
@oraclec137

oraclec137 Sep 21, 2017

Hey. Hope you're doing great , i'm trying to get my emails with a specific title be posted to one of my discord server channels by using ifttt.com and it's webhook feature to connect discord webhook feature, I thought you may be able to help me, i dont know what i'm doing wrong and why it's not working
{
"username":"Recieved Email",
"avatar_url":"http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-G-black-icon.png",
"content":"There is a new email:",
"embeds":[
"author":{
"name":"Recieved Email",
"icon_url":"http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-G-black-icon.png"
},
"color":8806760,
"title":"Email recieved {{ReceivedAt}}",
"description":"{{BodyPlain}}"
]
}

oraclec137 commented Sep 21, 2017

Hey. Hope you're doing great , i'm trying to get my emails with a specific title be posted to one of my discord server channels by using ifttt.com and it's webhook feature to connect discord webhook feature, I thought you may be able to help me, i dont know what i'm doing wrong and why it's not working
{
"username":"Recieved Email",
"avatar_url":"http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-G-black-icon.png",
"content":"There is a new email:",
"embeds":[
"author":{
"name":"Recieved Email",
"icon_url":"http://icons.iconarchive.com/icons/hydrattz/multipurpose-alphabet/256/Letter-G-black-icon.png"
},
"color":8806760,
"title":"Email recieved {{ReceivedAt}}",
"description":"{{BodyPlain}}"
]
}

@wrathsoffire76

This comment has been minimized.

Show comment
Hide comment
@wrathsoffire76

wrathsoffire76 Sep 25, 2017

@oraclec137 The problem could be with your Embeds and Author being open tags

@oraclec137 The problem could be with your Embeds and Author being open tags

@jayreddin

This comment has been minimized.

Show comment
Hide comment
@jayreddin

jayreddin Oct 1, 2017

Pop on over to IFTTT's Reddit page or to the IFTTT Discord Channel for more help with webhooks.

Pop on over to IFTTT's Reddit page or to the IFTTT Discord Channel for more help with webhooks.

@oraclec137

This comment has been minimized.

Show comment
Hide comment
@oraclec137

oraclec137 Oct 15, 2017

Hey, thanks. can you send me a fixed code thanks @wrathsoffire76

Hey, thanks. can you send me a fixed code thanks @wrathsoffire76

@MarketingMaster

This comment has been minimized.

Show comment
Hide comment
@MarketingMaster

MarketingMaster Feb 8, 2018

Is there any way to exclude replays and retweets from webhook and only feed original posts?

Is there any way to exclude replays and retweets from webhook and only feed original posts?

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