Google Workspace · Integrations

Integrating Google Workspace with your systems: the decisions that define the project

Before writing code: the decisions regarding permissions, architecture, and scheduling that determine whether a Google Workspace integration succeeds or turns into an architectural problem.

The Cloud Collective Google Cloud Premier Partner Reading time: 12 min
Equipo de IT definiendo el modelo de permisos y OAuth de una integración con Google Workspace

The hard part of integrating Google Workspace with your systems isn't the code. It's what is decided before writing it.

The Gmail , Drive, Calendar, and Admin SDK APIs are well-documented, and any competent development team can handle the technical side. What derails projects is something else: discovering halfway through that The chosen permissions model necessitates reworking the architecture., that the integration requires approval from two super-admins, or that publishing it on the Marketplace adds months of verification that no one had factored into the schedule.

This guide is not a console tutorial. It is the set of decisions that should be made—and documented— before opening a code editor, aimed at IT managers, architects, and teams evaluating a Google Workspace integration project.

What is actually being integrated

When a company says "we want to integrate Google Workspace ," it is almost always describing one of these four scenarios:

ScenarioConcrete example
Automate an internal processUpon signing a contract in the CRM, generate the client folder in Drive, create the kick-off event, and notify the team.
Synchronize data with another systemDumping data from your ERP into a spreadsheet that feeds a dashboard every night.
Manage your own WorkspaceEmployee onboarding and offboarding synchronized with the HR system, without manual administrator intervention.
Extend the user experienceA Gmail add-on that allows you to view customer history without leaving your email.

Each of these scenarios has different implications for permissions, security, and timelines. And that is exactly why the first question is not "which API do we use?" but rather "On whose behalf is this going to act?".

The four pieces that are always present

Regardless of the scenario, every integration with Google Workspace relies on the same four elements. It is worth understanding what each one does, as they are the ones that come up in any technical conversation about the project:

PieceWhat it is used for
Google Cloud projectThe container where APIs are activated, credentials are managed, and quotas are controlled. Every integration resides within one.
Workspace REST APIsThe interfaces for Gmail , Drive, Calendar, Docs, Sheets, and Admin SDK can be consumed from any language: Python, Node.js , Java, Go, or PHP.
OAuth 2.0The mechanism that determines which data the integration can access and with what authorization.
Identity of integrationA service account, a consenting user, or a service account with domain delegation. It is the most important decision of the project.

All of this is configured in the Google Cloud console, in the section Google Auth Platform (where the " OAuth consent screen" used to be, now reorganized into the Branding, Audience, Data access, and Clients tabs). Google keeps the step-by-step instructions up to date on its official developer documentation, and there is no point in duplicating it here: it changes with every console redesign.

What does not change are the following four decisions.

Decision 1: On whose behalf does the integration act?

This is the decision upon which all others depend, and the one most frequently made incorrectly. There are three models, and they are not interchangeable.

Direct service account

The integration acts as itself—an independent identity that does not belong to any specific person. It operates when someone grants it explicit access to the resources it needs: adding it as a member of a shared Drive, granting it permission for a specific spreadsheet, or authorizing it in a Chat space. That is the model. simplest and safest, and that is why it should be the starting point.

Their limit: A service account is not a Workspace user. It does not have its own Gmail inbox, cannot own files in anyone's personal Drive, and cannot read an employee's calendar. If the project requires any of that, this model is not suitable.

Per-user OAuth consent

Each person explicitly authorizes the integration and sees exactly what permissions they are granting. They control the access and can revoke it at any time. It is the right model for add-ons and applications that employees use consciously.

Their limit: It requires a user to be present. It is not suitable for unattended processes that run overnight on organization-wide data.

Domain-wide delegation

A service account is authorized to act on behalf of any user in the domain without seeking their permission. This enables email archiving, compliance audits, migrations, and bulk synchronizations.

And it is also the model that requires more care, for a reason Google explains bluntly in its own documentation: delegation does not allow restricting which specific user is impersonated. It authorizes impersonating anyone in the organization—including super admins—making that service account a prime target for privilege escalation. The official recommendation is avoid it whenever the use case can be resolved with a direct service account or with OAuth consent.

Three operational details worth knowing before committing to a schedule:

  • The activation is performed by a super administrator in the Workspace Admin console, not the development team.
  • If the organization has the multi-party approval ...is enabled, authorizing a new integration requires a second super-administrator to confirm it. That means days, not minutes, once vacations or schedules come into play.
  • It does not work with personal Gmail accounts, only on Google Workspace domains.
ModelWhen is it the right option?What's going to block you?
Direct service accountThe integration only requires resources that can be explicitly shared with it.It does not access user mailboxes or personal Drives.
OAuth ConsentThe end user interacts with the integration and must be able to revoke it.You need someone to provide authorization.
Domain delegationOrganization-wide unattended processes.Super-administrator, potential dual approval, and a risk surface that must be governed.
The practical question

Does this integration need to access data of individuals who will not authorize it on a case-by-case basis? If the answer is no, do not use domain delegation. If it is yes, plan it as a security project, not just a development project.

Decision 2: Google Apps Script or a full integration?

It is the decision that saves or wastes the most budget, and the one most often resolved out of inertia.

Google Apps Script It is a low-code platform that lives within Workspace. It requires no infrastructure, deployment, or maintenance team. For automation that takes place within a single domain—such as a form that triggers an email and updates a spreadsheet, or a reminder that checks a calendar every morning—it is the right solution, and setting it up takes days, not weeks.

Its limitations become apparent sooner than expected: execution quotas that are exhausted by high volumes, difficulty working in teams with version control and rigorous testing, and limited capacity for complex business logic or robust error handling.

One integration with in-house service (deployed on Cloud Run or an equivalent) is what you need when there is a genuine second system on the other end—an ERP, a CRM, or a database—when volumes are high, when the process is critical and requires monitoring, or when the code must go through the same CI/CD cycle as the rest of your software.

Rule of thumb: If the automation involves only Workspace tools and is maintained by the person who wrote it, start with Apps Script. As soon as an external system is involved or the process becomes business-critical, the integration needs to reside externally.

If you are looking to go beyond fixed-workflow automation toward agents that reason about your data, that is a different type of project; we cover it in the guide on Gemini Enterprise for Spanish companies.

Decision 3: Will only your organization use it, or are you going to distribute it?

This decision does not affect the architecture. It affects the schedule., and that is why it must be taken on the first day.

If the integration is internal —it is used only by accounts within your own domain— the path is short. You configure, test, and deploy.

It is external, because you are going to publish it on the Google Workspace Marketplace or it will be used by clients with their own domains, Google's verification process comes into play. And if it also uses scopes considered restricted (such as broad access to Gmail or Drive), an independent security assessment is added, which must be renewed periodically.

⚠️

That's what they are. calendar weeks or months that do not depend on your teamDiscovering this when development is already complete is one of the most expensive ways to mismanage an integration project.

Decision 4: How up-to-date do you need the data to be?

There are two ways for your systems to find out that something has changed in Workspace.

Check periodically. Every hour, every night, or every fifteen minutes, your integration asks, "Is there anything new?" It is simple to build and sufficient for most business processes. The trade-off is that it constantly consumes your quota—even when nothing has happened—and introduces a delay equal to the polling interval.

Subscribe to changes. Workspace notifies your system when something happens. It is more efficient and immediate, but requires additional infrastructure to receive and process those notifications.

The question that resolves the decision

It is not technical: What happens if the data arrives with a two-hour delay? If the answer is "nothing," poll periodically and avoid the complexity. If the answer is "a process breaks," you need event subscriptions.

The three mistakes that come at a high price

01

Requesting more permissions than necessary

The difference between requesting read-only access to Drive and requesting full access might seem like a mere configuration detail. It isn't: it determines whether your application needs to undergo verification, how long that verification takes, and the extent of the damage a compromised credential could cause. The principle is simple, yet hardly anyone applies it fully: the minimum permission that enables the use case, reviewed periodically to remove what is no longer in use.

02

Treating credentials like just another password

The common pattern—downloading the service account key file and storing it alongside the code—is precisely the one Google recommends avoiding. Many organizations already block this as a matter of corporate policy, so an integration designed in this way It doesn't even start up in production.Alternatives exist and are better: platform-managed credentials when code runs on Google Cloud , identity federation when it runs elsewhere, and secret management instead of files in the repository.

03

Leave no trace

An integration with domain-wide delegation can read email across the entire company. If it does not log what actions were taken, when, and on which data, there is no way to respond to an audit, an employee inquiry, or a security incident. The transaction log is not an enhancement added later; it is part of the design.

At their core, these three errors are data governance issues rather than programming mistakes. If you are reviewing the security posture of your entire environment, the starting point is our guide on Cloud security and GDPR compliance with Google Cloud.

How long does it actually take?

There is no single answer, but there are honest ranges:

Project typeReasonable time
Internal automation in Apps ScriptDays
Integration of a flow with an external systemFrom two to six weeks
Platform that connects multiple systems with their own business logicMonths

What drives the timeframe It's almost never the code.It comes down to the quality of the API of the system on the other end, the need for domain delegation and the associated approvals, the verification process if the integration is external, and the speed at which your organization makes decisions regarding permissions and security.

Any provider that gives you a firm deadline without having asked about those four factors has not understood the project.

How we approach it at The Cloud Collective

As Google Cloud Premier Partner in Barcelona, we approach these integrations by starting at the end: which business process needs to function and what data is required for it. From there, we define the identity model with the minimum necessary permissions, We avoid domain delegation when the use case supports a more secure alternative., and we documented the permissions model so your team can conduct audits without relying on us.

Next, we support the deployment to production on Google Cloud , including the integrations with Gmail , Drive, Calendar, and Admin SDK required by the project, as well as the operation logging necessary for compliance. If you are still evaluating the platform prior to integration, start with our page on... Google Workspace for Business.

Frequently Asked Questions

APIs usage is free within standard quotas. Exceeding them may result in temporary request limits but does not incur a direct charge. Two important points to note: some APIs are available only in specific Workspace editions, and the actual cost of an integration lies in the underlying infrastructure and development, not in the API calls themselves.

For simple automation using Apps Script, no: a technical profile with knowledge of Workspace is sufficient. For a production-grade integration, however, knowledge of Google Cloud is required, as decisions regarding identity, permissions, and deployment are made there—and these determine whether the integration is secure and maintainable.

Almost always. The limitation rarely lies with Google—which exposes standard REST APIs that can be consumed using any language—but rather with the integration capabilities of the other system. This is the first point to evaluate in any project of this kind.

It depends on the chosen identity model, which is one of the reasons why that decision matters so much. With individual OAuth consent, access is lost when the account is removed. With a service account, the integration continues to function regardless of personnel changes. It is worth addressing this question during the design phase, rather than on the day the issue arises.

Choose a single process—the most tedious and repetitive one you have—and integrate it from start to finish. A real-world case in production teaches you more about your own internal constraints than three months of analysis, and establishes a foundation for scaling.

Conclusion

Google Workspace APIs are robust and well-documented: Technology is rarely the bottleneck.What determines the success of an integration project is having answered four questions early on: on whose behalf the integration operates, whether it requires its own infrastructure, whether it will extend beyond your organization, and how up-to-date the data needs to be.

Answer them before writing code, and the project becomes a execution problem. Answer them late and it becomes a architectural problem.

Are you evaluating an integration with Google Workspace ?

At The Cloud Collective we can help you define the permission model and architecture before your team starts building. We offer a no-obligation initial assessment that focuses on business processes rather than technology.

Speak with a certified partner