Skip to content

add support for google service accounts#1682

Open
mtuchi wants to merge 9 commits into
mainfrom
service-accounts
Open

add support for google service accounts#1682
mtuchi wants to merge 9 commits into
mainfrom
service-accounts

Conversation

@mtuchi

@mtuchi mtuchi commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Added support for Service Accounts credential type in gmail, googlesheets and googledrive adaptor

Related

Details

Service Account credentials requires private_key, client_email, and scopes. I have modify createConnection function to check if private_key and client_email is specified in state.configuration to use JWT auth otherwise we default to use OAuth2 auth.

Mandatory scopes are currently hardcoded for each adaptor. I used the mandatory scope specified on app when creation OAuth credential for each each adaptor (gmail, googlesheets and googledrive).

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to
know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Review Checklist

Before merging, the reviewer should check the following items:

  • Does the PR do what it claims to do?
  • If this is a new adaptor, added the adaptor on marketing website ?
  • If this PR includes breaking changes, do we need to update any jobs in
    production? Is it safe to release?
  • Are there any unit tests?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.
  • Have you ticked a box under AI Usage?

@mtuchi mtuchi requested a review from hunterachieng June 1, 2026 08:17
@mtuchi

mtuchi commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

Hiya @hunterachieng can you give this pr, I was able to test, GoogleDrive and GoogleSheets adaptor but Gmail adaptor is failing with an error saying "Error sending message: Precondition check failed. I think the error has nothing to do with how we are handling service account credential rather on admin settings to allow the service account permission to read and compose email

@mtuchi mtuchi mentioned this pull request Jun 1, 2026
@mtuchi

mtuchi commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

@hunterachieng

Copy link
Copy Markdown
Contributor

@mtuchi I see you mentioned that we have Gmail code, but then you have mentioned that it fails. Should we fix this first or?

@mtuchi

mtuchi commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

@mtuchi I see you mentioned that we have Gmail code, but then you have mentioned that it fails. Should we fix this first or?

@hunterachieng it's not failing because of the changes, it's failing because of permission, can you spend sometime to figure out the permission we need ?

mtuchi and others added 4 commits June 16, 2026 22:34
"type": "object",
"additionalProperties": true,
"required": ["access_token"]
"oneOf": [

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried this will break on lightning 🤔

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josephjclark would love you're input on this, I think lightning is expecting required filed not "oneOf".
Should we have have two different schema maybe 🤷🏽 ? But again lightning need to support both of those schema

@mtuchi

mtuchi commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

Hey @hunterachieng when you get sometime please review this pr again for me, I have updated the README.md for updated adaptors

@mtuchi mtuchi requested a review from josephjclark June 18, 2026 11:29
@mtuchi mtuchi marked this pull request as ready for review June 18, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants