Pipory
Node reference

Gmail (OAuth)

Gmail (OAuth) node reference - all 45 operations, the credential it needs, and a worked example.

Gmail through a connected Google account. Send, search and read mail with bodies and attachments; manage threads, drafts, labels; and read or change auto-reply, filters and send-as settings.

Credential: Google account - see Credentials.

Scopes

Each operation below lists the scope it needs. Scopes are ticked as a scope preset when you connect the Google account, then consented to on Google's screen. If a run fails with a permission error, the node names the missing scope in the error - grant it and re-run; you do not need to rebuild the workflow.

Operations (45)

Send

OperationWhat it doesScope
sendSend emailGmail (send) — gmail.send
sendWithAttachmentSend email with attachmentsGmail (send) — gmail.send
sendAsSend email from an aliasGmail (send) — gmail.send
replyReply in threadGmail (send) — gmail.send
forwardForward a messageGmail (send) — gmail.send

Messages

OperationWhat it doesScope
listSearch messagesGmail (read-only) — gmail.readonly
getMessageGet message (with body)Gmail (read-only) — gmail.readonly
trashMessageMove message to trashGmail (modify) — gmail.modify
untrashMessageRestore message from trashGmail (modify) — gmail.modify
archiveMessageArchive messageGmail (modify) — gmail.modify
unarchiveMessageMove message back to inboxGmail (modify) — gmail.modify
modifyLabelsAdd/remove labelGmail (modify) — gmail.modify
batchModifyLabelsAdd/remove labels in bulkGmail (modify) — gmail.modify
markReadStatusMark read/unreadGmail (modify) — gmail.modify
getAttachmentMetadataList attachmentsGmail (read-only) — gmail.readonly
getAttachmentDownload attachmentGmail (read-only) — gmail.readonly

Threads

OperationWhat it doesScope
listThreadsSearch threadsGmail (read-only) — gmail.readonly
getThreadGet threadGmail (read-only) — gmail.readonly
modifyThreadLabelsAdd/remove labels on a threadGmail (modify) — gmail.modify
trashThreadMove thread to trashGmail (modify) — gmail.modify
untrashThreadRestore thread from trashGmail (modify) — gmail.modify

Drafts

OperationWhat it doesScope
createDraftCreate draftGmail (compose drafts) — gmail.compose
listDraftsList draftsGmail (compose drafts) — gmail.compose
getDraftGet draftGmail (compose drafts) — gmail.compose
updateDraftUpdate draftGmail (compose drafts) — gmail.compose
sendDraftSend draftGmail (send) — gmail.send
deleteDraftDelete draftGmail (compose drafts) — gmail.compose

Labels

OperationWhat it doesScope
listLabelsList labelsGmail (read-only) — gmail.readonly
getLabelGet labelGmail (read-only) — gmail.readonly
createLabelCreate labelGmail (manage labels) — gmail.labels
updateLabelUpdate labelGmail (manage labels) — gmail.labels
deleteLabelDelete labelGmail (manage labels) — gmail.labels

Account

OperationWhat it doesScope
getProfileGet mailbox profileGmail (read-only) — gmail.readonly
listHistoryList mailbox historyGmail (read-only) — gmail.readonly

Settings

OperationWhat it doesScope
getVacationGet auto-reply settingsGmail (settings) — gmail.settings.basic
updateVacationSet auto-reply (out of office)Gmail (settings) — gmail.settings.basic
listFiltersList filtersGmail (settings) — gmail.settings.basic
getFilterGet filterGmail (settings) — gmail.settings.basic
createFilterCreate filterGmail (settings) — gmail.settings.basic
deleteFilterDelete filterGmail (settings) — gmail.settings.basic
listSendAsAliasesList send-as aliasesGmail (settings) — gmail.settings.basic
getSendAsAliasGet send-as aliasGmail (settings) — gmail.settings.basic
updateSendAsAliasUpdate alias signatureGmail (settings) — gmail.settings.basic
listForwardingAddressesList forwarding addressesGmail (settings) — gmail.settings.basic
getForwardingAddressGet forwarding addressGmail (settings) — gmail.settings.basic

Example

Reply in-thread to the customer email that started the run

A support workflow classifies an inbound email and sends the drafted answer back on the same thread. The node re-reads the original message, so it fills in the recipient, the Re: subject and the In-Reply-To / References headers itself.

Set Operation to reply, then fill in:

FieldValueNotes
messageId{{trigger.messageId}}The message being replied to - required; the recipient defaults to its From header
bodyHi {{trigger.fromName}}, {{ai.answer}}Reply body; Handlebars resolves against the run context
bodyTypetexttext or html - reply defaults to plain text

Sets {{sent.messageId}}, {{sent.threadId}}, {{sent.to}} and {{sent.subject}}. Careful: messageId is the id of the message just SENT, not the one you replied to; threadId is the thread both now live on.