Hi all,
I have a spreadsheet on Google Sheets that is automatically updated and a workflow that is listening for New Row Events.
This works very well 99% of the time but there are times where I manually delete a few rows from the spreadsheet and the events stop getting in until I reach the same number of row I had before. To give you an example, if I have 12 rows in my spreadsheet and I received the New Row event for the 12th row, then I decide to manually delete 3 rows ending up with a total of 9 rows, I won’t receive New Row Events for row 10, 11, 12 but it’ll start back at row 13.
The way I think this works is by keeping some sort of last_row counter that is not updated on deletion, I might be wrong.
Is there a way to manually reset this counter or fix this behavior whenever I do manual deletion?
The behavior you’re experiencing is due to the concurrency settings in your workflow. By default, Pipedream workflows process events in parallel, which can lead to race conditions when multiple events try to write data to the same row in Google Sheets.
To avoid this issue, you can limit the concurrency of your workflow to a single worker. This means that only one event will be processed at a time, and the next event will not start processing until the first one is complete. This ensures that events are processed in the order they are received, preventing data from being overwritten.
To limit concurrency, you can use the concurrency option in your workflow’s configuration. Set it to 1 to restrict the workflow to a single worker. This will ensure that events are processed sequentially and prevent the issue you described.
Here’s an example of how to set the concurrency option in your workflow’s configuration:
{
"name": "My Workflow",
"description": "Description of your workflow",
"config": {
"concurrency": 1
},
"steps": [
// Your workflow steps here
]
}
By setting the concurrency option to 1, you’ll ensure that events are processed sequentially and that you won’t miss any events due to manual deletions.
I hope this helps! Let me know if you have any further questions.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.