Create a bubble loop workflow

Hello bubblers ! ! :wink:

I’m starting bubble since a few months and I would like now to create loops on the workflow API. And I would like some advice on how to do it or see some examples !

In my case the data comes from the connector api and more precisely from the Twitter api.

I want to rebuild twitter threads if you know.

Here is a clear explanation of what I want to do: Conversation ID | Twitter Developer

I call “https://api.twitter.com/2/tweets/[:id]” to retrieve the id of the tweet and to go back to the previous one I retrieve the referenced_tweets id to inject it in the id to retrieve the previous one and make a loop to go back to all the discussion.

Example:

tweet 1 of the discussion
"id: “1377698889113931785” of the first tweet
“referenced_tweets”: [
{
“type”: “replied_to”,
“id”: “1377270074634076166”
}
] and referenced_tweets is the tweet id of the previous tweet to which we reply

tweet 2 of the discussion
“id”: “1377270074634076166” of the second tweet
“referenced_tweets”: [
{
“type”: “replied_to”,
“id”: “1377270074634079087”
}
] and referenced_tweets is the tweet id of the previous tweet to which we reply

tweet 3 of the discussion
“id”: “1377270074634079087” of the third tweet
“referenced_tweets”: [
{
“type”: “replied_to”,
“id”: “1377270074634067854”
}
] and referenced_tweets is the tweet id of the previous tweet to which we reply

The purpose of my loop is to take the id of the tweet and fetch the referenced_tweets id.
Then to take referenced_tweets id and to inject it in the id to go up like that until referenced_tweets id will be empty and the loop stops.

I hope I was clear ! Thanks for your feedback

This topic was automatically closed after 70 days. New replies are no longer allowed.