Google Workspace app to provide CRM features within Gmail
- JavaScript 100%
| .clasp.json.example | ||
| .claspignore | ||
| .gitignore | ||
| appsscript.example.json | ||
| Code.gs | ||
| portal_client.gs | ||
| portal_config.example.gs | ||
| README.md | ||
member_portal-gmail
Gmail add-on (Google Apps Script) for the Perth Artifactory member portal FAQ email assistant.
What it does
- Adds a sidebar card when you open a Gmail message.
- Optionally shows CRM info for the sender (portal member lookup).
- Send to FAQ assistant creates a session on the portal and offers Continue in portal (requires an existing portal browser login).
Volunteers must link their association Google Workspace account under volunteer portal Admin Tools → Gmail / Workspace account.
Configuration (portal URL)
Set your portal origin in portal_config.gs
clasp (optional CLI)
clasp uploads local .gs files to Google. You need a .clasp.json with a real scriptId (gitignored).
“Project file already exists”
clasp create only works when .clasp.json is missing. If you already copied .clasp.json.example to .clasp.json, create will fail
Option A — new Apps Script project
rm .clasp.json # only if it is still the placeholder copy
clasp login
clasp create --type standalone --title "Member Portal CRM"
# clasp writes .clasp.json with a real scriptId
Option B — project already exists in the browser
- Open the project at script.google.com → Project settings → copy Script ID.
- Put it in
.clasp.json(replaceYOUR_APPS_SCRIPT_PROJECT_ID). - Do not run
clasp create.
Link an existing remote project
clasp clone <scriptId>
Then clasp push (not create).
Setup
- Same Google Cloud OAuth client as the portal
googleconfig; enable Gmail API. cp portal_config.example.gs portal_config.gsand setportalBaseUrl.- Set up
.clasp.jsonusing option A or B above (or skip clasp and paste files in the web editor). clasp pushand deploy.- Workspace admin: install the add-on for your domain.
Portal endpoints
POST {portalBaseUrl}/integrations/google/faq-email-assistant/sender-lookupPOST {portalBaseUrl}/integrations/google/faq-email-assistant/sessions