Unable to write on Google sheet due to error "Quota exceeded for quota metric 'Write requests and limit 'Write requests per minute per user' of service 'sheets.googleapis.com' for ...'".
Issue Description: While writing to Google Sheet using Google Workspace (formerly GSuite) activities, error "Quota exceeded for quota metric 'Write requests and limit 'Write requests per minute per user' of service 'sheets.googleapis.com' for ...'" is observed.
The error is encountered due to quotas set for Sheets API as explained in the Usage Limits. Google Sheets API is a shared service. To ensure fair usage and to protect the overall health of the Google workspace system, quotas and limitations have been set. The number of write requests per minute per user per project is 60.
For the quota issue, solutions are as possible:
- Implement Exponential Backoff algorithm as explained Exponential Backoff Algorithm when the "429" error is observed while writing Google Sheets. This can be implemented using Try-Catch block.
- 'Retry scope' activity can be used to retry the write after a specified amount of time when this error is observed.
- Use the 'Batch Document Updates' activity (Documentation Batch Document Updates) and put write cell activities inside this scope, which will send them to the server all at once. Because the batch update is a single call to the server, the execution of the included activities is faster than running the same activities individually. Batch Document Update activity supports only 'Write Cell' and 'Write Range' activities
- Use a customer specific Google Project instead of the default UiPath Google Project. This can be done by setting "GSuiteApplicationScope" activity's "OAuthClient" property to "Custom" instead of UiPath.
- Request Google for quota increase.