> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Handle attachments safely

> Route email attachments and ambiguous content to human review without claiming that the Voiceflow text relay has read the files.

An attached receipt or screenshot can matter to a support request. The supplied Email relay holds messages with files for a person to review; it does not automatically upload or interpret attachments. This guide helps the reviewer answer without losing the customer's original evidence.

## Before you begin

Have a working [Email connection](/docs/guides/channels/email), access to the original message at the provider and a reviewer authorized to handle customer files. Agree on allowed file types, retention and a private alternative for sensitive evidence. Keep `AUTO_SEND=false` during this test.

## Handle the customer’s evidence

### 1. Identify why the message was held

Use `cli.mjs list` and `cli.mjs show JOB_ID` with the command prefix in [Review replies before sending](/docs/guides/channels/email/review-replies-before-sending). Expect `review-input` for an attachment, inline file, HTML-only message without usable plain text, forwarded content, changed Reply-To or over 12,000 text characters. This prevents a partial body from being treated as complete evidence.

| Source | What the sample uses |
| --- | --- |
| Gmail, Graph, Zoho, SES, IMAP | Parse MIME; count attachments, pass plain text only for eligible messages. |
| SendGrid | Parse the raw MIME `email` field after verifying the signature. |
| Mailgun/Postmark | Use parsed text/reply text and attachment count; do not forward file content. |
| Resend | Fetch received message text/headers/attachment metadata; do not follow download URLs. |
| Brevo/Mailjet | Normalize parsed text and file metadata; do not fetch attachment tokens or content. |

The inbound request/MIME limit is 10 MiB. Polling records oversized/invalid MIME as `quarantined` without a body and continues to later mail; inspect/reply at the provider. Oversize webhook requests are rejected before a queue item exists. Mailgun may supply generated plain text for HTML-only mail; that text becomes a review candidate rather than an automatic HTML interpretation.

### 2. Review the original in the provider

Open the original mail through your approved mailbox/provider interface. Follow your organization's scanning and file-handling policy. Inline logos can count as files too. Check quoted and forwarded material against the latest question; the relay’s quote removal is deliberately limited and cannot recognize every language or inline reply.

If evidence needs another secure channel, write a short next step explaining how the customer can provide it. Do not ask them to email credentials or move private evidence into a public transcript. A From address or filename does not establish identity or safe content.

### 3. Write and deliver the reviewed answer

Write a plain-text response based on what the reviewer actually inspected. Use `cli.mjs reply JOB_ID ./reviewed-reply.txt`, then `cli.mjs approve JOB_ID`. The review guide includes local and Docker file-copy commands. This sends a human-authored answer without another agent turn; it does not feed the attachment or its contents into the stored agent session.

If the message should receive no reply, discard it and use the approved separate support process. No file is attached to the outgoing answer by this implementation.

## Test the evidence path

### 1. Send a small harmless attachment

From the allowed test sender, attach a sample text file to a question. Verify the original file remains available at the provider, the job is held and no agent answer is sent automatically. Write and approve a human reply; confirm only its plain text arrives.

### 2. Check content variants

Test an inline image, HTML-only mail, a forwarded thread and an over-limit body. Confirm the documented hold/oversize behavior. Send a later plain-text follow-up and check what context the agent actually has: the manually reviewed file was never inserted into its memory.

### The customer says the agent ignored their file

Explain the actual reviewed support path.

Check whether the original had a real MIME attachment, embedded image or external URL. Inspect the held job and provider original. The text relay does not interpret any of them automatically. Correct the reply and tell the customer the next useful action; do not imply that a provider's attachment URL is an implemented upload or extraction workflow.

### Quoted text changes the meaning of the question

Keep ambiguous input in review and test your language mix.

Compare the original with the stored text. The small heuristic removes `>` lines and common English reply delimiters; provider extraction is also best effort. Keep review-first when that is insufficient. Adapt and test the parser before enabling automatic sending for those mail formats; do not solve ambiguity by treating an entire forwarded history as trusted instructions.

## Retain only the required evidence

Set the retention policy across provider mail, relay records, transcripts and backups. The sample has no automatic purge and does not delete the original attachment. Coordinate deletion through each owning system after the request is resolved; deleting one local queue record does not remove provider copies or backups.
