How can I access tweets from protected Twitter accounts in Pipedream triggers?

Malk : just got it to work! Thank you very much for your help Danny :slightly_smiling_face:

Malk : One more thing, is it possible to set trigger words? I only want tweets that contain certain words to be pulled through to discord.

Malk : Also, the invocations add up quite quick when trying to check every few seconds. Is it possible to somehow set the workflow to only run specific days/times? If possible I’d create another workflow to do the same but have a longer refresh time on Saturdays and Sundays.

Malk : I’ve calculated how much it would cost per month at current use whilst discounting weekends and it comes up to almost 200000 invocations!

Danny Roosevelt : > One more thing, is it possible to set trigger words? I only want tweets that contain certain words to be pulled through to discord. (edited)
Totally! You can do this with a custom Node.js code step — check out this example: https://pipedream.com/@droosevelt/copy-of-tweeter-p_LQCQ1WG/edit

Danny Roosevelt : > Also, the invocations add up quite quick when trying to check every few seconds. Is it possible to somehow set the workflow to only run specific days/times? If possible I’d create another workflow to do the same but have a longer refresh time on Saturdays and Sundays.
Yep for your specific workflow, you’d probably want to enable the schedule on the source (pulling in user tweets) — if you click in to edit the ā€œcode and configurationā€ for your trigger, you’ll have access to do this:

image.png

Danny Roosevelt : Then you can enable the trigger to run every N minutes or at a specific time of day

Malk : Thank you Danny :slightly_smiling_face:

Malk : With the trigger words via node.js. Is it possible to set multiple words in one? For example I want to trigger for ā€˜long’ and ā€˜short’

Malk : Also it appears that the trigger words act as characters and not individual words. For example if I set ā€˜es’ as a trigger, any tweet with the characters in the same order will trigger it such as ā€˜press’ or ā€˜essential’.

Malk : Is there a way to make it more strict to only look for induvial words rather than the characters?

Danny Roosevelt : Yes! Twitter actually has pretty good documentation on this Search operators | Docs | Twitter Developer Platform

Malk : These don’t appear to work on node.js

Malk : The search operators I mean

Malk : Any ideas ? Sorry to keep this thread going for so long :sob:

Danny Roosevelt : Hey sorry for the delay! I haven’t forgotten about you! I’m having some trouble getting that source working the way I’d expect it to also, so I created a bug ticket to investigate further: [BUG] Twitter Search Mentions source not handling standard Twitter search operators Ā· Issue #1682 Ā· PipedreamHQ/pipedream Ā· GitHub, and @UR84EMEUT is going to help dig in when she frees up

Malk : Thank you so much for going out of your way!

Michelle Bergeron : Looking into this now! I’ll let you know what I find.

Michelle Bergeron : Hey , I think the Search Mentions source is actually working as intended. First off, make sure you’re entering your search terms into the source itself (see pic) instead of a subsequent step.
Another funny thing about this source is that it will only find tweets posted later than the last tweet found, so if you change the search terms and update the props, it will still only bring in tweets posted later than whatever it found previously. What this means is that you should set up the source with the props you want and kinda just leave them be. Then if you want to search for something different, you should create a new source with the new prop values. I hope this info is helpful and makes sense!

Malk : Hi , I don’t think this method works as it searches for the tweets of the private account which the twitter API is unable to see. The other method looks at user tweets which works with protected accounts.