Skip to content

βœˆπŸ€πŸ€– Twitter bot that replies your aircraft type.

Notifications You must be signed in to change notification settings

sebagomez/IsIt737MAX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Build Build & Deploy

Are you flying a 737 MAX ?

TL;DR

Just twit your flight number (eg. AA984) to @isit737MAX and a bot will reply with the actual aircraft type you're flying. Try it here!

Long(er) story and tech stuff

I'm an avgeek, and as such, I was very curious about the recent news about the 737 MAX. Investigation is still underway but there's a good article from the New York times about it. What You Need to Know After Deadly Boeing 737 Max Crashes.

Every 737 MAX was grounded waiting for "the fix", so I thought I could create something to let people know if they're flying a 737 MAX or not. Why?, because I could, and because it would be a fun experiment. And that's it!.

So I created a new twiiter handle called isit737MAX, which, when you tweet a flight number to it, it will reply letting you know if you're flying a 737 MAX or not.

How does it work?

The code here it's been deployed to an Azure Function, which is the one sending out the twits. But who is calling that function, how do I know who to reply to and what to reply.

I used to implement that part with a Microsoft Flow, I then moved it to an Azure Logic app and it even worked for a while with an IFTTT applet. The problem with those integrations is that they were all pulling data from the twitter API asking for mentions. They obviously have a windows in which they work. The Azure Logic app pulled every 5 minutes, and the IFTTT applet once every hour. So I needed/wanted something faster. That's how I discovered Twitter's Account Activity API which allows you to setup a webhook from an account to your endpoint.

So right now I have a small app (not in this repo) that using the TwitterLib creates a webhook and a subscription for the @IsIt737MAX twitter handle. The urls for that webhook is my Azure function, so now every time somebody mentions* @IsIt737MAX on a twit, the function get called. The function process the twit and send out a reply to the twit with the actual aircraft that's being used for the mentioned flight.

Give it a try, twit any flight number and let @IsIt737MAX let you know if you're flying in a 737 MAX.

And let me know what you think.

About

βœˆπŸ€πŸ€– Twitter bot that replies your aircraft type.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published