Email

Save an email's attachments

email_save_attachments · Changes data · Markdown

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

$0.001 per file saved

From your agent’s balance. A call that fails costs nothing.

An example

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

Your agent callsemail_save_attachments$0.001 per file saved

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "message_id": "6e0b3f52-8d1a-4c7e-b2f9-3a5d7c9e1f04"
}
What comes back
{
  "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"
    }
  ]
}

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.

What it does

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.

What comes back

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). Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
message_idRequiredstringExactly 36 characters.

The call

Over MCP, call email_save_attachments on https://api.conecto.chat/mcp/email. Over REST:

Terminal
curl -X POST 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"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No message of the business has that message_id.Find the message with email_list_messages and use its message_id.
invalid_input400The message was sent by the business; only received emails keep their original.Use a received message: email_list_messages with direction in.
gone410The original email is no longer kept (30 days) or could not be read. Nothing was charged.Ask the sender for the files again.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md