Objective: The aim of this project is to demonstrate how to automate the updating of Gmail signatures using Google Apps Script and OAuth2 authentication. This setup allows users to update their Gmail signature dynamically via a web app endpoint.
Steps to Follow:
Create and Configure Google Cloud Project: Follow this guide to setup your GCP.
Setup Google Apps Script: Use the OAuth2 library to handle the OAuth2 flow in Apps Script.
1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF
Also, enable Gmail and AdminDirectory services within Apps script editor
For API code reference, check here : CODE
Deploy as a Web App: Deploy the script as a web app. Access the web app URL with required parameters to change the Gmail signature.
Example :
https://script.google.com/macros/s/{DEPLOYMENT_ID}/exec?email=user@example.com&name=John%20Doe&position=Developer&info=About%20Me
Configure Sheetgo Connection: Use the “Form Connection” feature to configure an API request. Choose “GET” as the request method.
To get the Apps script token use this code : console.log(ScriptApp.getOAuthToken())