-
Create a new project in Google Apps Script.
-
Upload the code inside action.gs.js.
-
Enable Advanced Services.
-
Configure token, label and endpoint constants.
-
Ensure that some emails have the label and are unread.
-
Save and run (Need to give permissions first).
And example server made with Fastify was made to demostrate usage. Ensure to configurate the project’s tokens and endpoints.
Use make install
and make serve
to run.
This is an small proof of concept. A simple gmail script that will fetch unread emails with a specific label. Then sent them to an specific server endpoint where you can process them further or save them to a database or another place.