@assemblyline-agents/gmail
v10.4.0
Published
Official Assembly Line direct Gmail API connection plugin.
Maintainers
Readme
@assemblyline-agents/gmail
Official Assembly Line Gmail connection plugin.
The selected plugin exposes Gmail threads, messages, attachments, drafts, and sends through a reviewed direct REST connection. Gmail authorization is independent from Google Calendar and Google Drive.
Install
assembly-line add gmail agentCreate a Google OAuth web client, enable the Gmail API, and set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET. Optionally set GOOGLE_REDIRECT_URI or GMAIL_API_BASE_URL. Assembly Line runs Authorization Code + PKCE, requests offline access, and stores the refreshable grant host-side. Gate or remove named actions through plugins.gmail.connections.gmail.approval or disable.
Gmail connections also expose the reviewed email.received event. Enable the
Gmail API and Pub/Sub API, then set GOOGLE_CLOUD_PROJECT,
GMAIL_PUBSUB_TOPIC, and a stable random
GMAIL_PUBSUB_VERIFICATION_TOKEN. The operator owns the Pub/Sub resources:
- Create the topic in
GOOGLE_CLOUD_PROJECT. - Grant
serviceAccount:[email protected]theroles/pubsub.publisherrole on that topic. - Run
assembly-line connections wireafter deployment and create a Pub/Sub push subscription for the reported callback URL. Append?token=<GMAIL_PUBSUB_VERIFICATION_TOKEN>using the actual secret value.
Assembly Line uses the user's existing Gmail OAuth grant only to create and
renew users.watch; it never needs a Google Cloud service-account key and does
not create or delete operator-owned Pub/Sub resources. Notifications are
expanded through Gmail History into one stable event per newly received
message; sent mail, drafts, spam, and trash are excluded. Add an explicit
automations/*.ts event automation to start agent work.
Part of Assembly Line
This package is part of Assembly Line. See the developer documentation for setup, agent authoring, and deployment guides.
License
MIT
