'Gmail Push Notifications for regular Accounts

I'm trying to create an app that can send new mails in gmail to a Google Sheet. I'm trying to use the push notification from PubSub and trigger the push to Google Sheet. But the problem is PubSub works with Service Accounts and Service Accounts only works with Google Workspace accounts (like Organization accounts) and not regular gmail accounts. So, is it not possible to create Push Notification for Gmails for regular accounts?

Edit:

Sorry, I should have been more specific and clearer. I'm able to create service accounts. I'm able to create topics, subcriptions etc without need of Google Workspace. But the challenge I'm facing is on the authorization flow. A Gmail Web App needs authorization from the gmail account owner to access user. I'm able to do this using OAuth 2.0 Client IDs. The below flow process takes the user to the authorization page and the user is able to authorize the app.

flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
      CLIENT_SECRETS_FILE, scopes=SCOPES)

But for Service Accounts, I don't see a similar authorization flow. I'm trying to use this authorization and use pubsub to get gmail push notification to my app. I can provide more details if needed.



Solution 1:[1]

It is important to clarify that as long as you have a Google Account to login to GCP, you should be able to:

  1. Set up a Project
  2. Create a Service account.

The official documentation provides examples that it is possible to create service accounts with Gmail. You should be able to create projects with Pub/Sub. Using Workspace is not necessary however is highly marketed due to the high usage for private organizations.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ricardo Jose Velasquez Cruz