Improving efficiency of a Twitter Advanced Search

In Twitter’s Advanced Search module either I’d like to use field: “Since ID”, because I want to exclude all tweets which has already been found, so I want to strore the latest execution’s “Since ID” somewhere temporarily and only search for newer-than-that tweets in next execution!
I think it should be solved by using Data strores, but watching that doc page doesn’t suggest me a clear and easy solution.

My other option would be to add “yesterday’s date” to Twitter’s Search’s query parameter
(Twitter doc link),
but in this case I should be able to add a dynamic part to the “Search Term” field - beside the static search term.
How can I do that?
I prefer this second solution, I think adding a dynamic part to a search query is a very useful knowledge for me for later…
Thanks !

Before Twitter’s Advanced Search I added this Node step:

// To use any npm package on Pipedream, just import it
import moment from "moment"

export default defineComponent({
  async run({ steps, $ }) {
    var yesterday = moment().subtract(1, 'days');
  $.export('yesterday', yesterday);

This way I can add:
to search query,
and it’s doing what I need ! :slight_smile:

1 Like