Skip to content

Email (Gmail)

Send emails through connected Google accounts — gated by the per-account daily send budget and warming system — and configure Google App Passwords.

Full name: campaignstack_send_gmail

google_integrations:write Destructive

Send an email via Gmail using a connected Google account. Requires a Google account to be connected and linked to the workspace. Use the Google integrations settings in the app to connect one first. With one connected Google account, googleAccountId can be omitted; with several it is required. Returns the Gmail messageId and threadId on success. Provide htmlBody for rich formatting; body is used as the plain-text fallback. Optional attachments are passed as public URLs and downloaded server-side. Call this once the recipient and wording are approved. This reaches a real person. Before calling it, tell the user exactly who it goes to and read the wording back to them, and wait for an explicit yes. It goes out as soon as this call succeeds: there is no draft state and nothing to recall. One person per call. There is no bulk form, and calling this in a loop over a list is not the supported way to reach a list: put the leads in a lead list with campaignstack_add_leads_to_list and run a workflow over it with campaignstack_trigger_workflow, which paces the sends and applies the review step the workspace configured.

NameTypeRequiredDefaultDescription
workspaceIdstringNoWorkspace ID. REQUIRED for a user key (csu_), which spans every workspace you belong to; omitted for a workspace key (cs_), which is bound to one and ignores this argument. campaignstack_whoami reports which kind of key you are holding and, for a user key, the workspaces it can reach.
tostringYesRecipient email address
subjectstringYesEmail subject line (min length: 1)
bodystringYesPlain-text email body (min length: 1)
htmlBodystringNoOptional HTML email body (used instead of body for rich formatting)
googleAccountIdstringNoGoogle account ID to send from. Optional while the workspace has exactly one connected Google account; required once it has several.
attachmentsobject[]NoUp to 5 files to attach (18 MB total). Downloaded server-side into storage before sending.