How to retweet specific user’s tweets with specific word only using IFTTT

if-this-then-thatretweet

I am looking for a recipe to retweet someones post only if a specific word was used (always at the beginning of the tweet if this is of any help).

I could not find ready to use recipe and creating one does not allow to chose specific word (only specific user).

Best Answer

Create your own applet!

You can use IFTTT's platform (create you own IFTTT applets) to achieve that task.

With Platform, you can add a filter, written in JavaScript that will run between the trigger and the action(s).

So in your case, you can set the action for New tweet by a specific user from Twitter, than apply a JavaScript code to filter, and select the Post a tweet action.

About the JavaScript filtering:

  • When you click to create a filter, you'll see a list [1] of variables/functions you can use, depending on the chosen trigger and action.
  • Depends on your criteria, you can set the action to trigger or skip.
  • A very simple JavaScript filtering example for the applet:

    if (Twitter.newTweetByUser.Text.indexOf("YOUR_PHRASE") != -1) {
        Twitter.postNewTweet.setTweet(Twitter.newTweetByUser.LinkToTweet);
    } else {
        Twitter.postNewTweet.skip();
    }
    
    • It will tweet the user's tweet if it contains YOUR_PHRASE.

[1] The available variables and functions for the chosen trigger and action:

Trigger data
Twitter.newTweetByUser.Text
Twitter.newTweetByUser.UserName
Twitter.newTweetByUser.LinkToTweet
Twitter.newTweetByUser.TweetEmbedCode
Twitter.newTweetByUser.CreatedAt

Actions
Twitter.postNewTweet.skip()
Twitter.postNewTweet.setTweet()

Other
Meta.currentUserTime
Meta.triggerTime

Screenshot

enter image description here