DEV Community

Tod Sacerdoti
Tod Sacerdoti

Posted on • Updated on

This tweet has 78k+ impressions, 200+ likes & 40+ retweets

In fact, the exact metrics for this tweet are:

  • 78374 impressions
  • 5 replies

The reason the title doesn't include the exact numbers is due to limitations of the Twitter API, which I will get to later.

View the live workflow code here.

This workflow is powered by Pipedream's impossibly fast serverless integration platform and was inspired by similar self-reflexive automation efforts on Hacker News and YouTube.

How this workflow works (in three easy steps):


1. Event Source - emits new events when Tweet Metrics change

Note: Since the Twitter Tweet Metrics API is in preview, you must have your own Twitter developer credentials and activate the preview in your developer account.

Event Source

2. Code Step - post in markdown with title and description

Code Step

3. Action - update the article using the API


Why does the tweet not update in real time?

  • Unfortunately, Twitter doesn't update the data of twitter cards in real time, which is why the metrics are rounded in the tweet
  • Twitter cards can be updated via the Card Validator
  • However, doing this programmatically would violate Twitter's Developer Terms
  • Twitter says DO NOT "use non-API-based forms of automation, such as scripting the Twitter website. The use of these techniques may result in the permanent suspension of your account."

Why not build your own?

  1. View the live workflow code here
  2. Copy the workflow into your account
  3. Add your Twitter / credentials and make any code changes
  4. Deploy the workflow and you are live

Top comments (3)

ben profile image
Ben Halpern

So neat!

germangamboa95 profile image
German Gamboa

Very similar to Tom Scott's self updating video

waylonwalker profile image
Waylon Walker

I've been looking at pipedream, it looks so awesome. I tried using zappier a few months ago but, never did much with it. Thanks for making such a killer product and making engaging example!