I have an unattended automation loaded into the orchestrator that has a Google Sheets “new row added to bottom of spreadsheet” trigger
I want these automations to run as fast as possible, but only want one automation to run at a time as I only have one machine to run the automations on.
In a perfect world, I want the polling intervals to be as low as possible, does the orchestrator add new triggered automations to a queue? Or if the polling interval is too low will it automatically run these automations all at once?
UiPath Orchestrator triggered by new rows in Google Sheets, considering your limited single-machine setup.
Understanding Orchestrator Triggering and Execution:
Polling: Orchestrator doesn’t introduce queues for triggered automations. Instead, it uses a polling mechanism to check for new rows at specific intervals defined in your trigger settings.
Execution: Upon detecting a new row, Orchestrator initiates a single automation instance.
Ensuring Single Automation Execution:
While lowering the polling interval can increase responsiveness, you need to address parallel execution to prevent multiple instances running on your single machine:
Exclusive Robot Type:
Create an “Exclusive” robot type in Orchestrator. This type guarantees only one robot instance of this type can execute automations at a time. Assign your Google Sheets-triggered automation to this “Exclusive” robot.
“Maximum Active Transactions” (Optional):
If your automation uses queues for task management:
In the “Queue” activity properties, set “Maximum Active Transactions” to 1. This enforces processing of only one transaction at a time.
Optimizing Polling Interval:
The ideal polling interval depends on the trade-off between responsiveness and Orchestrator load:
Set a Reasonable Base: Start with a moderately low interval (e.g., 30 seconds) instead of an extremely low value.
Monitor and Adjust: Track trigger frequency and execution times in Orchestrator logs. If responsiveness is critical, experiment with slight interval reductions while keeping performance in mind.
Google Sheets API Rate Limits: Consider potential API rate limits from Google Sheets. Maintain a buffer between your polling interval and any limits to avoid disruptions.
Additional Tips for Efficiency:
Code Optimization: Streamline your automation workflow for faster execution:
Use efficient UiPath activities for data manipulation, interaction, and logic.
Profile your automation to identify bottlenecks.
Consider caching mechanisms for frequently accessed data.
Error Handling: Implement robust error handling in your automation to gracefully handle unexpected issues.
By combining these strategies, you can achieve a responsive and efficient system for triggering your automation based on Google Sheets updates, ensuring single execution even on a single machine. Remember to test and monitor the impact of changes to find the optimal configuration for your scenario.