Tutorial: Twitter Notification Device Part Two

Open Source Detective
2 min readMar 28, 2024

--

IFTTT webhook creator

Introduction:

In this part of the tutorial we will setup the IFTTT webhook that sends post requests anytime you get a new follower.

Steps:

If you haven’t already, go to IFTTT and create an account. The app I’m building requires a pro membership which runs about $3 a month. There’s other webhooks you can create with a free account and continue to follow along, but in order to get the Twitter webhooks like ‘New Follower’, you’ll need a pro account.

  • Click ‘Create’ and select ‘Add’ from the ‘If This’ banner. Here you will select to add a Twitter service. If you haven’t already it will ask you to link your twitter account to IFTTT, follow those steps.
  • Once you’re done select the ‘New follower’ action.
  • With that selected now move on to the ‘Then That’ banner. Select the ‘Webhooks’ service and enter your ngrok public url. You’ll want to select ‘POST’ as the Method since that’s the type of endpoint we setup. You’ll also want to select ‘application/json’ as the Content Type.
  • For the body you’ll want to ‘Add ingredient’ and selec the FullName ingredient. You’ll need to format the JSON so that it doesn’t break our API. When you’re done it should look like this:
  • Now you can save and publish this applet. And as long as your local express api is running with Ngrok, anytime your twitter account gets a new follower you’ll see it logged to the console.

Conclusion:

Now that we have IFTTT setup and posting to our API anytime our Twitter account gets a new follower we have all the pieces in place to build a simple console app to display these updates on a screen. I’ll write the code for that in the final part of this tutorial and put everything together!

--

--