跳转到内容
Agentic Workflowdocs
v0.8.2免费安装

节点 / builtin / integration

Gmail

Integrate with Gmail to perform operations on messages and drafts.

集成 扩展程序网页应用

此内容尚不支持你的语言。

Send email, read and search your Gmail messages, and manage drafts from a workflow.

The Gmail node works on two kinds of things (Resource):

  • Message: Send an email (with optional HTML body, CC, BCC and file attachments), Get one message, Delete a message, or Search your mailbox.
  • Draft: Create, Get, Update, Delete or List drafts. Drafts are saved, not sent, so you can review them in Gmail first.

Delete moves a message to the Trash, where you can still restore it; it does not erase it for good. Search and List return complete messages or drafts, up to Page Size (100 by default). Once a credential is set, Message ID and Draft ID are lists loaded from your mailbox.

Temporary Google errors (too many requests, server errors) are retried automatically before the node fails.

  • Email yourself a daily digest or a report built by earlier nodes.
  • Send a file produced by the workflow, such as a CSV export or a screenshot, as an attachment.
  • Have an AI node draft replies as Gmail drafts, then review and send them yourself.
  • Read recent messages and pass them to Summarization.
适用于所有选项
设置项类型作用
Credential (必填)CredentialThe Credential to use to make request.

9 个选项 · 选择“Resource and Operation”以查看其设置

Message
Draft

Message · Send 的设置

设置项类型作用
To (必填)ListEmail addresses to send to.
Subject (必填)TextEmail subject.
Body (必填)Long textEmail body (plain text).
HTML Body TextEmail body (HTML).
CC ListCarbon copy recipients.
BCC ListBlind carbon copy recipients.
Attachments ListLogical $binary keys on the incoming item to attach as email files. Each selected key is read from the item and added to the message; leave empty to send with no attachments.

正在显示 Message · Send 的设置

  • To, CC and BCC take one address per entry, for example {{ $input.email }}. Every address is checked before sending.
  • Body is plain text. If you also fill HTML Body, mail apps that show HTML use it, and the others fall back to Body.
  • Attachments lists the file keys to attach from the incoming item, usually data. Files come from nodes such as Convert to File, Http Request or Screenshot Page.
  • Search Query is not applied yet: Message → Search currently returns your latest messages, up to Page Size. Filter them afterwards with Filter, for example on the From header.
  • Output
  • Message → Send returns the new message’s id and threadId.
  • Message → Get returns the Gmail message: id, threadId, labelIds, snippet (a short preview of the text) and payload, which holds the headers (Subject, From, Date) and the body parts.
  • Search returns a list of messages; use Split Out to handle them one per item.
  • Draft → List returns drafts, a list of drafts, and nextPageToken when there are more.
  • Delete returns success, deleted and the id of the message or draft.

Gmail connects by signing in to your Google account (OAuth). You first create your own Google OAuth client once, with the Gmail API enabled: follow Create your OAuth client. Then create a Gmail credential, paste the Client ID and Client Secret, click Check connection and approve the Google window. AWFlow asks for permission to read, compose and send email, and to move messages to the Trash. The sign-in is kept and refreshed for you. See also Create a credential.

  1. A Schedule trigger runs every Monday at 8:00.
  2. Data Store reads the list of prices you saved during the week.
  3. CSV and Convert to File turn it into a file under the key data.
  4. Gmail, Message → Send, To you@example.com, Subject Weekly prices, Body Attached., Attachments data.
  • “Invalid email address: …”. One of To, CC or BCC is not a valid address. Check the value, or the expression that builds it.
  • “No $binary found on the incoming item for attachment key “data”“. The previous node did not produce a file under that key. Check the key name, or add a node that creates the file.
  • “Request had insufficient authentication scopes” or a 403 error. The Gmail API is not enabled for your OAuth client, or the sign-in is missing a permission. Enable the API in Google Cloud, then click Check connection again on the credential.
  • The node starts failing with a sign-in error after a week. Your Google OAuth client is still in testing mode, where Google ends sign-ins after 7 days. Click Check connection again, or publish the client.
编辑此页

最近更新:

Was this page useful?
向 Aria 询问“Gmail”