Gmail
Connect your AI agents to Gmail.
Authentication: OAuth. See Magic Link for the runtime auth flow, or Application credentials to bring your own OAuth app.
Sample use cases
- Find every email from contacts at our top-10 accounts in the last 7 days that I haven’t replied to.
- Draft a follow-up reply to the latest message from
customer@acme.comthanking them for the call. - Search for emails containing
invoicefrom this month and forward them to accounting@.
Embed an image in an email
Add the image to attachments with its filename, base64 content, is_inline: true, and a unique content_id such as logo.png. Put <img src='cid:logo.png'> in body_html for a send, threaded reply, or draft. In a forward, put the tag in comment_html and use a content ID distinct from the original message’s images.
When updating a draft, reuse an image’s content ID to update it. Clearing regular attachments preserves inline images.