Google Sheets "Max Rows To Poll" Functionality Gone

For the Google Sheet trigger for a new row, you USED to be able to limit the amount it took to 1 to 10 at a time. Because I have long flows that call on GPT multiple times, and I add 10 to 20 rows at a time, the flows ALWAYS fail due to GPT’s API limit… But these worked GREAT when I could limit it to only taking one new row at a time…

What method are we supposed to use now to limit the number of rows to start at a time now?

What does the output of the “New Row Added” trigger look like?
As far as I remember (can’t check now unfortunately) this trigger always pulls one row per run, instead creating a separate run per row.

I am not sure I understand the question.

But I think by output you mean runs? It would run once for each new row. It still does that, but it does it all at once. So they all fail if I add more than one row at a time… manually.

Before it would wait for however many you entered in the Max Rows to Poll before moving onto the next rows.

So if you entered 3, it would create 3 runs and run through them before starting the next 3.

Because my flow is so complex, it runs through GPT many times in a single flow, so having all of those API calls all at once overwhelms the limits quickly, and all of the flows fail.

I ended up figuring out what the problem was, apparently AP figured out how to get around the triggering too many API calls without having to go one by one, maybe some kind of delay? Or OpenAI updated their API limits? I just assumed since that was the issue before when a batch would fail, but looking at the logs, it was actually failing due to trying to add the blog post to the sheet, and exceeding Googles 50k character limit…

Removing that part of the piece allowed them to all work in a batch, at least so far, reran it and they are slowly but surely all finishing as they are supposed to… Which is better. Missed the part about being able to see the runs IN the actual pieces now, so that is awesome.

Glad to hear you managed to solve your issue!

With ‘output’ I meant this section, but the confirmation that each row gets a separate run works too :smiley:

Hmm interesting. This sounds like a poor man’s, perhaps accidental, implementation of flow-level rate-limiting. This indirect/implicit combination of “batch size” and “batch delay” only applies to polling-based triggers, which I suspect is why the option disappeared for “New Row Added”.

I think a proper implementation of this for all types of flows/triggers would be a great addition to Activepieces. Instead of this implicit relation between polling-based trigger options we could have one universal straightforward setting at the flow-level, something along the lines of “Execute this flow a maximum of X times per Y amount of time”. This would cover all combinations of pieces/API’s and triggers while ensuring the user has a clear view of what’s going on.

1 Like

Ohhh, yeah I should have been able to figure that out about the solution. It pulls those in perfectly fine.

I DID run into another issue that this is causing.

My Piece runs through an iteration of logically piecing together an article, as I would personally. Creating an overall outline, then writing it section by section, taking the other topics into consideration and trying to lead into the next.

How I do that is I run a GPT to write an outline based on a description, keyword and title, then have it loop through the subheadings and descriptions one by one and add them to AP storage… I use a unique identifier (also generated by GPT) to separate them in the storage.

However, when I went to check out the blog posts on the website, they were all jumbled together and like the length of all 20 articles almost, mixed and matched… If I could just force it to iterate through them one at a time, instead of all at once, this problem wouldnt be a problem…

So I guess still not solved… at least for me.

This sounds like you’re looking for the storage scope option, specifically “Run”. Each run then gets its own separate storage area, preventing any crosstalk.

Hi @here

We are working on new utility piece called “queue” you can push things into it and pop then in another flow with scheduled trigger.

Another workaround for now use schedule with Get Next Row action in google sheet, you can specify a memory key :key:

So for example you can say run daily and pull new 5 rows with Get Next Rows action.

I hope the second workaround fixes your issue