---
name: "email_save_attachments"
area: "email"
title: "Save an email's attachments"
price: "$0.001 per file saved"
method: "POST"
url: "https://api.conecto.chat/v1/tools/email_save_attachments"
mcp_server: "https://api.conecto.chat/mcp/email"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/email/email_save_attachments"
---

# Save an email's attachments (`email_save_attachments`)

Saves the files attached to one received email into the file store, each linked to the email.

Save the attachments of one received email into the file store, each linked to the email, then read them like any file (files_read_text, documents_read_pdf, files_ocr). Ones saved before are kept, not saved again. Inline pictures (a signature's logo) and mail marked as spam are not saved. $0.001 per file saved; the original email is kept 30 days.

Price: $0.001 per file saved. A call that fails costs nothing.

## Use it when

An email brought a file the business needs to keep or read: a supplier's invoice, a signed form, photos of a damage.

- For reading a file once it is saved, use [files_read_text](https://conecto.chat/tools/files/files_read_text.md).

## Say this to your agent

> Paul Hoffmann sent photos of the scratch on his frame. Keep them so the workshop can see them.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `message_id` | string | yes | Exactly 36 characters. |  |  |

## Example

Written for Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon.

MCP: call `email_save_attachments` on the MCP server `https://api.conecto.chat/mcp/email` with these arguments:

```json
{
  "message_id": "6e0b3f52-8d1a-4c7e-b2f9-3a5d7c9e1f04"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/email_save_attachments \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message_id": "6e0b3f52-8d1a-4c7e-b2f9-3a5d7c9e1f04"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "email_save_attachments",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.002",
  "balance_usd": "$19.75",
  "result": {
    "message_id": "6e0b3f52-8d1a-4c7e-b2f9-3a5d7c9e1f04",
    "saved": [
      {
        "file_id": "6861c63e-9399-45d6-bb99-6919461c383f",
        "name": "Scratch 1.png",
        "size": 40
      },
      {
        "file_id": "5e546420-256d-42e5-8612-314a5e2935ff",
        "name": "Scratch 2.png",
        "size": 40
      }
    ],
    "attachments": [
      {
        "filename": "Scratch 1.png",
        "content_type": "image/png",
        "size": 40,
        "file_id": "6861c63e-9399-45d6-bb99-6919461c383f"
      },
      {
        "filename": "Scratch 2.png",
        "content_type": "image/png",
        "size": 40,
        "file_id": "5e546420-256d-42e5-8612-314a5e2935ff"
      }
    ]
  }
}
```

`result`: saved: the files saved now, each with its file_id, name and size; attachments: every attachment of the email, with the file it became or why it was skipped (an inline picture, spam).

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No message of the business has that message_id. | Find the message with email_list_messages and use its message_id. |
| `invalid_input` | 400 | The message was sent by the business; only received emails keep their original. | Use a received message: email_list_messages with direction in. |
| `gone` | 410 | The original email is no longer kept (30 days) or could not be read. Nothing was charged. | Ask the sender for the files again. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [email_create_inbox](https://conecto.chat/tools/email/email_create_inbox.md): A new email address for the business on its own subdomain, which sends and receives at once. $1.00 a call.
- [email_list_inboxes](https://conecto.chat/tools/email/email_list_inboxes.md): The business's inboxes, whether each opens tickets or saves attachments, and when each renews. Free up to 1,000,000 reads a month.
- [email_update_inbox](https://conecto.chat/tools/email/email_update_inbox.md): Changes an inbox's sender name, switches saving its attachments to the file store on or off, or changes how much it saves a day. $0.001 a call.
- [email_send](https://conecto.chat/tools/email/email_send.md): Sends an email from one of the business's inboxes, with files from the store attached, or answers a received message in its thread. $0.001 per recipient, plus $0.001 per started MB of attachments for each recipient ($0.001 to one person without attachments), up to $0.52.
- [email_list_messages](https://conecto.chat/tools/email/email_list_messages.md): Messages in the business's inboxes, newest first: received, sent or both, for one inbox, one sender or since a time. Free up to 1,000,000 reads a month.
- [email_get_message](https://conecto.chat/tools/email/email_get_message.md): One message in full: its text, HTML and attachment names. Free up to 1,000,000 reads a month.
- [email_get_thread](https://conecto.chat/tools/email/email_get_thread.md): Every message of one conversation, oldest first. Free up to 1,000,000 reads a month.
- [email_update_thread](https://conecto.chat/tools/email/email_update_thread.md): Marks an email thread open, waiting, handled or archived, and sets its labels. $0.001 a call.
- [email_release_inbox](https://conecto.chat/tools/email/email_release_inbox.md): Stops renting an inbox: mail sent to it later bounces, and its stored messages stay readable. Free.
