---
title: "Send Gmail Email with Attachments"
method: POST
path: "/api/v1/workflow/agent/send-gmail"
tags: ["Workflow"]
---

# Send Gmail Email with Attachments

`POST /api/v1/workflow/agent/send-gmail`

## Request

- Base URL: `https://api.kolect.com`
- URL: `https://api.kolect.com/api/v1/workflow/agent/send-gmail`
- Auth: HTTP bearer

Sends an email using available Gmail accounts with optional file attachments.
The system automatically selects the best Gmail account based on daily send limits
and downloads attachments from provided URLs.

## Request body

- object
  - `receiver_address` string, email, required: Email address of the recipient
  - `subject` string, required: Email subject line
  - `body` string, required: Email body content (supports HTML and markdown)
  - `sender_name` string: Display name for the sender
  - `attachments` string[]: Array of URLs to download and attach as files

## Response `200`

Email processing completed (success or failure)

- object
  - `send_address` string, email: Gmail account used to send the email (null if failed)
  - `receiver_address` string, email: Email address of the recipient
  - `subject` string: Email subject line
  - `status` 'success' | 'failed': Status of the email sending operation
  - `message` string: Detailed message about the operation result
  - `time_elapsed` number: Time taken to process the request in milliseconds
  - `attachments_processed` number: Number of attachments successfully downloaded and attached
  - `messageId` string: Gmail message ID (only present on success)
  - `threadId` string: Gmail thread ID (only present on success)

## Other responses

- `400`: Bad request - missing required fields
- `500`: Internal server error

---

[API](https://skmtc.dev/kolect/apis/kolect-api.md) · [All operations](https://skmtc.dev/kolect/apis/kolect-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kolect/apis/kolect-api/revisions/fe54528e8f54?raw)
