How would I do this?

Hello all, Bubble newbie here.
2021 is the year when I want to commit to learning to build applications in Bubble.
I’ve dived through the learning videos.

But, before I commence fully on a specific idea, I want to sense-check with you how / whether you would accomplish the broad brush strokes of it…

  • Users have accounts, which require Gmail/Google authentication. (I know there is a Google Sign-In Integration plugin - is that the right method?)

  • Using that same Google Account, we should - with permission - gain access to the user’s Gmail account, likely using the Gmail API… (I see there is an AirDev Gmail plugin for Bubble, amongst several Gmail plugins, but is that necessary where is just a direct Gmail API? In fact, I see these plugins are either not verified by Google or outright blocked by it.

  • When the user receives a new email in their Gmail Inbox…

  • Perform a series of checks against header content. Call an Airtable table, compare certain Gmail headers against Airtable records. If certain conditions are met/matched…

  • Then, carry out some Gmail label management, as supported by the Gmail API.

Up until this morning, I was comfortable that I could imagine the broad building blocks of this workflow in Bubble.

However, in particular, the necessity to continually watch for new inbound emails, even when the user is not inside the Bubble app, and then to immediately (not even on a cron job, just immediately) perform certain actions, got me thinking about how (whether!) this is possible…

The Gmail API has a watch method that seemingly can be wired to Pub/Sub for providing notification of new messages via webhook (more here).

A couple of new concepts in there for me - using the Gmail API for the first time and Pub/Sub for the first time.

Is there an optimum way to be imagining that continual-checking piece?
And how about the subsequent lodging of Gmail API requests based on conditional searches against Airtable records?

Assuming all that is a goer, and is the best/least-difficult method, are there good, viable ways of making this work in Bubble?

Thanks!

Oath access to Google private accounts is possible. You need to get a permission from Google.

Much to figure out for your project but most of what you list seems doable with Bubble.

Best of luck!