Error 'Quota Exceeded For Quota Metric 'Write Requests' And Limit 'Write Requests Per Minute Per User' Of Service 'Sheets.googleapis.com' For ...'[429]' While Writing To Google Sheets

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 ...'[429]".

Issue Description

While writing to Google Sheets using Google Workspace (formerly GSuite) activities, the error "Quota exceeded for quota metric 'Write requests and limit 'Write requests per minute per user' of service 'sheets.googleapis.com' for ...'[429]" is observed.

Root Cause

The error is encountered due to quotas set for Sheets API as explained in the Usage Limits. Since Google Sheets API is a shared service, quotas have been applied and limitations to make sure it's used fairly by all users and to protect the overall health of the Google Workspace system. The number of write requests per minute per user per project is 60.

Google will not increase UiPath quota limits for API calls without a history of high usage. Therefore, UiPath customers are advised to create their own OAuth application according to their requirements.

Resolution

Try the below possible solutions:

  1. Implement the Exponential Backoff algorithm as explained Exponential Backoff Algorithm when the "429" error is observed while writing Google Sheets. This can be implemented using the Try-Catch block.
  2. 'Retry scope' activity can be used to retry the write after a specified amount of time when this error is observed.
  3. Use the Batch Document Updates activity 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. The batch Document Update activity supports only 'Write Cell' and 'Write Range' activities.
  4. Use a customer-specific Google Project instead of the default UiPath Google Project. This can be done by setting the Google Workspace Scope activity's "OAuthClient" property to "Custom" instead of UiPath.
  5. Request Google for a quota increase.
2 Likes