Google Workspace app to provide CRM features within Gmail
  • JavaScript 100%
Find a file
2026-05-21 20:43:24 +08:00
.clasp.json.example proof of concept 2026-05-21 20:43:24 +08:00
.claspignore proof of concept 2026-05-21 20:43:24 +08:00
.gitignore proof of concept 2026-05-21 20:43:24 +08:00
appsscript.example.json proof of concept 2026-05-21 20:43:24 +08:00
Code.gs proof of concept 2026-05-21 20:43:24 +08:00
portal_client.gs proof of concept 2026-05-21 20:43:24 +08:00
portal_config.example.gs proof of concept 2026-05-21 20:43:24 +08:00
README.md proof of concept 2026-05-21 20:43:24 +08:00

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

  1. Open the project at script.google.com → Project settings → copy Script ID.
  2. Put it in .clasp.json (replace YOUR_APPS_SCRIPT_PROJECT_ID).
  3. Do not run clasp create.

Link an existing remote project

clasp clone <scriptId>

Then clasp push (not create).

Setup

  1. Same Google Cloud OAuth client as the portal google config; enable Gmail API.
  2. cp portal_config.example.gs portal_config.gs and set portalBaseUrl.
  3. Set up .clasp.json using option A or B above (or skip clasp and paste files in the web editor).
  4. clasp push and deploy.
  5. Workspace admin: install the add-on for your domain.

Portal endpoints

  • POST {portalBaseUrl}/integrations/google/faq-email-assistant/sender-lookup
  • POST {portalBaseUrl}/integrations/google/faq-email-assistant/sessions