[MUSIC]
>> Today's stream is
going to be fantastic because
then you're going to be able to use it.
Even if you're not familiar with coding,
even if you don't know how to code,
even if you're not very familiar with Azure,
I will show you how to make all of that work.
We're going to be building a Twitter logic app
that then checks for
new tweets based on any hashtag that we
want and then have it go directly to a Discord channel.
That's going to be fun. Let's get started.
Here we go. We're going to make an Azure logic app.
Here's how you do it.
All you got do is you go to the portal,
portal.azure.com, and then you log in.
Then you go to the portal,
you search for logic app,
and then you say "Add"
a Logic App "Comfytweets"
and go to hosting and Azure storage is fine.
The plan is going to be "Workflow Standard", that's okay.
Windows plan size, this will be fine.
We "Apply" and then "Monitoring", deployment in progress.
Good job, you're done,
we're done. There you go.
There's the entire Azure expansive segment
of the day. I'm just kidding.
We're going to actually have it hook up to
all the Twitter accounts and things.
We're going to click the "Stateful"
one and then we'll say the workflow name is
going to be "Twitter_monitor", "Create".
This is really fast.
If you just search for tweet,
this is the one that we're going to search for.
Look, there's a Twitter one when a new tweet is posted.
We're going to create a connection.
This is going to be "Instafluff_tweet".
I could create my own Twitter application if I
want but I think the shared default and application is fine.
Then I sign in. I'm going to have to
sign in with my Twitter account.
I could make a logic app that knows when I tweet something like
a new content and then have it go directly
into a Discord channel, that's pretty useful.
Let's see if it works. We can do it
from:@instafluffTV and then we can test if we have a tweet.
Right now, it's just a trigger
and then we have to add an action to it.
We have connectors here.
The one that we're going to look for is Discord.
Look, Discord.
Here's the actions.
You can execute webhook, you can get current user,
Get Current User Guilds, user Connections.
We just need the webhook.
I'm going to create a channel inside our own Discord.
Azure-logic-app-tweets, a text Channel, yes.
"Select" the server, the "Comfy Corner" and then Add Webhook To.
I'm going to go here.
I'm going to create webhook.
I have to go to "Integrations" and then "View Webhooks".
Would you look at that? I'll create a new webhook.
The other end part of this is
the webhook token that goes after this.
It goes up like all of
that stuff and it's like a giant long string.
Finally, I go here.
The content is going to be the actual tweet texts.
There it is, "Profile Image Url" and
then use that and then all right, there we go.
We've got the Excecute Webhook, and this is super simple.
All it is is just like when a new tweet is
posted then execute Webhook and then you just save it.
Right now, the key thing is that it checks every minute for
a new tweet and so I think it's time to actually test this out.
This is where, supposedly,
if I post a new tweet then,
now that we hooked it all up and everything,
it's going to show up here anytime I post a new tweet.
This is a test tweet using an Azure logic app.
Would you look at that. This is a test tweet.
That was fast. This is really neat. Let me see.
What else can we do? I guess we can just make
another one, "Bitcoin_tweets".
We're going to make another logic app.
We're going to create a tweet one.
Maybe we could just even make other ones too, this would be neat.
Let's check for Bitcoin tweets.
This will be very interesting.
Every 30 seconds it's going to check
for a new tweet about Bitcoin.
I go to the "Integrations",
I go here, here's Captain Hook,
"Copy" the web url.
I'm going to save this out into a notepad on the side.
Where's my notepad? Come here. Perfect.
Here's the Discord channel,
and then I get the webhook ID,
Avatar url, why not?
The content is going to be the "Tweet
text" and then the username is going to be "Tweeted by".
I put it in the token and then I save it.
I'm going to try just running this trigger.
I wonder if this works.
It worked. Holy crap.
Bitcoin, BTC,
there's something in French.
What a beautiful day for our community.
I feel like this Twitter thing has
so much potential but I don't know what else it could do.
There's even different triggers.
Maybe we can even just start over and make a new trigger.
Can I delete this one and then add a completely different trigger?
Look, I can. This is pretty nice.
What should we do" "Choose An Operation".
Wait a minute.
Would you look at that, "Animal Crossing DLC".
That will be a good one. I think.
You could search for the term animal crossing DLC like this and do
maybe every 30 Seconds when a new tweet is posted.
I can add an action.
I bet you could even send e-mails to yourself,
create an e-mail address.
Add Subscriber, Create List, e-mail,
you can send text messages to yourself anytime that happens.
Send e-mail, you can send e-mail,
delete e-mail, get e-mail details, move e-mail to trash.
What I'm going to
do is I'm going to go back to the Discord thing here and we're
going to add a Discord Channel action
and I could do "Execute Webhook".
That sounds pretty good and then I have it saved and do,
"Content", "Username",
"Avatar URL".The content is going to be "Tweet
Text" and username is going to be, there we go.
When a new tweet is posted about animal crossing DLC then we
should see them in this channel but we could also,
theoretically, put it into our animal crossing channel.
That's just going to spam it and so probably don't want it there.
Is it saved? It's saved.
Let's see if this works. Look, there is one.
There's a new tweet that says retweet,
"Roseofbattle, happy home paradise DLC giveaway.
I'm streaming the animal cross in DLC now.
I'm picking one winner in an hour so come on."
It works you-all. This is so easy.
There's ways to format in and
stuff so that we don't have to worry about
doing all this stuff, but this is neat.
There's no code.
We did not write a single line of code
today to do all of these things.
When a new tweet is posted then it executes a webhook
and it executes the Discord webhook and you just create it.
Then you go here and then your like
"Integrations" and then you do this and then take the webhook.
When you get the webhook, then I can show you how you get it.
You copy the webhook url,
this first part right here.
That is the webhook ID.
That's the one that you put into here, Webhook ID.
Then the second part,
all of this other second part here is what you put into
the webhook token here and then
you set the content then username, etc.
Then you save it.
Then you're done, and then you run it and you're good to go.
If you don't want to have it,
keep processing and charging you money for it or whatever,
eventually because I think
it'll keep running otherwise, here we go.
"Delete Webhook".
Now, it's clean,
and then I'll go back here and go to comfytweetmonitor.
I'll go here and then I can delete this app and delete deployment.
It's going to delete the Logic App.
That's how you clean up.
[MUSIC]