Accident.com
April 2024

External Google Sheets Writing and Sharing for Third-Party Reporting

Streamlining third-party reporting with Google Sheets. Overcoming volume challenges and managing service accounts effectively.

Services

Google Sheets

Platforms

Web

External Google Sheets Writing and Sharing for Third-Party Reporting

Project Overview

Google Sheets serve as a convenient platform for sharing entity-specific data, such as with clients or vendors, without necessitating authentication or a separate database. Given their cost-free nature, they function effectively as external databases.

Sharing data with third parties is seamless due to the inherent email authentication feature. Simply adding the relevant individuals to the sheet ensures appropriate access without complex authentication procedures, and sharing the Google Sheet link with that individual. Separate permissions of viewer, commenter, and editor for each user can be added.

Approach Workflow

Managing Volume Challenges with a Single Service Account

Challenges

Rate Limit: Since Google Sheets API is a shared service, it has quotas and limitations to make sure it's used fairly by all users and to protect the overall health of the Google Workspace system. Sheets API has per-minute quotas, and they're refilled every minute. If per-minute quota is exceeded, it returns 429: Too many requests HTTP status code response.

Slow Read / Writes: Processing large volumes of data can slow down the API response times, impacting performance and user experience.

Solutions

Retry Mechanism with Exponential Backoff - Implement exponential backoff logic along with retries when encountering rate limit errors. This involves gradually increasing the time between retries to prevent overwhelming the API and giving up after a certain number of retry attempts

Batch Operations: Group multiple read or write operations into a single batch request to reduce the number of API calls and improve efficiency.

Distributed Service Accounts: Role-Based Separation

When dealing with a lot of data, it's best to use separate service accounts for reading, inserting, and updating. This way, if there's a rate limit issue, it won't affect all the tasks because the workload is spread out among different accounts. This setup makes everything more reliable and keeps things running smoothly.

Distributing tasks across multiple service accounts enables better scalability and load distribution. As the workload increases, you can allocate additional resources to specific tasks without impacting the performance of others. This flexibility allows for seamless scaling to meet growing demands.

Moreover, it's advisable to employ distinct service accounts tailored to each environment, such as local, staging, and production. This practice enhances security by ensuring that the permissions and access levels are appropriately configured for each environment, minimising the risk of unauthorised access or accidental data leakage across different stages of development and deployment.

Message Queues using google pub sub

Rather than processing tasks directly in a job queue, a more efficient approach is to send messages to Google Pub/Sub. This accelerates write operations, eliminating queue wait times. In case of failure, the job queue can retry failed entries from Pub/Sub.

Cloud Functions operate independently from your system, ensuring continuous operation even if your system is offline.

Challenges of Updating Un-inserted Records

When updating a Google Sheet record, the process hinges on having the correct row ID. If an insert hasn't occurred or is still underway, the absence of a row ID will lead to the update failing.

When encountering an empty row ID during update attempts, the status will transition to "on hold." granting the insert more time before retrying the update. On Hold jobs are processed concurrently, prioritising inserts over updates during self-healing operations.

Replaying Items Manually

Manual replaying provides meticulous oversight when automated processes encounter errors, ensuring the accurate processing of each item in Google Sheets. While automated systems have error handling mechanisms, nuanced issues may require human intervention for effective resolution. Manual replaying offers controlled error resolution and maintains data integrity. Additionally, it provides a transparent audit trail, crucial for compliance, troubleshooting, and accountability.

Testimonials

Don’t take our word for it.
See what our past clients say.

“Best Development Agency”

I'm impressed with the cloud and web development work done by Intuio! Their proficiency and effectiveness beyond my expectations. Strongly advised!

John Carter - Code Webflow Template
Jack C.
CEO at Accident LLC
Company Logo - Code Webflow Template

“One of the best agencies out there”

Outstanding assistance from Intuio! They have excellent cloud and mobile development services. delivered precisely and on schedule.

Will Spark - Code Webflow Template
Rahul B.
Partner at IP & Associates
Company Logo - Code Webflow Template

“True Experts in Cloud Development”

Happy with the outcome! With regard to cloud development services, Intuio excelled. dependable and competent service!

Sam Parker - Code Webflow Template
Marc D.
VP of Engineering at Stealth Startup
Company Logo - Code Webflow Template

“Best Development Agency”

Intuio's rapid POC implementation exceeded expectations, delivering quality results within the stipulated deadline. Highly recommend their expertise!

John Carter - Code Webflow Template
Thomas C.
Director at Telephony Company, USA
Company Logo - Code Webflow Template

“Best Professional Team”

I am extremely impressed Intuio's level of expertise and professionalism. Intuio is the best software consulting agency I have worked with.

Will Spark - Code Webflow Template
Will S.
Engineering at WXY
Company Logo - Code Webflow Template

“True Experts in Web Development”

When it comes to web development, Intuio is unmatched. Great experience always producing outstanding outcomes. Highly recommend Intuio !

Sam Parker - Code Webflow Template
Sam P.
VP of Engineering at Tin
Company Logo - Code Webflow Template
  Previous
Next   
Let’s get in touch

Ready to start working together with us?

 Email Icon - Code Webflow Template

Send us a message!

Don't miss out on the opportunity to take your business to new heights. Contact us now and let's embark on a journey of success together.

Contact us
Development Execution - Code Webflow Template

Browser our packages

From startups seeking a strong foundation to established enterprises aiming to optimize operations, our scalable and flexible packages cater to businesses of all sizes.

Browse packages