---
isPublished: true
knowledgeIndex: false
hidden: true
noindex: true
template: "page.peb"
title: "Send Email With Attachment Flow Reference"
description: "Send a native Salesforce email with an existing Attachment or File version."
contentType: "reference"
audience: "admin,developer"
---

# Send Email With Attachment

Send a native Salesforce email with an existing Attachment or File version.
The namespaced Apex action name is `rooms__SendDocumentAction`.

**Reference status: Limited.** Review the limitations below before using this action in a new Flow.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | No HTTP callout is made by the synchronous send path. It uses Salesforce email delivery. |
| Record writes | Validation or send errors can create DialogueOne Event records. Email Save As Activity can create email activity records when supported. |
| Platform event | The action does not directly publish a platform event. |
| Background work | Use Run Async `false`. The `true` branch does not submit email delivery. |
| Email | The synchronous path sends a native Salesforce email. |

The Run Async input must remain `false`. The `true` branch returns an acknowledgement without dispatching the email. Do not treat that acknowledgement as a queued or sent message.

Supply an Email To ID, or both Email To Address and Email To Name. Supply an Email Template Name, or both Email Subject and Email Body. Keep the deprecated Target Object Id blank unless an existing, reviewed Flow requires it.

## Inputs

Required describes the Flow input setting. Additional configuration rules can still require a value.

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `attachmentId` | Attachment ID | Yes | Existing Attachment or ContentVersion ID to attach. |
| `emailToId` | Email To ID (Target Object ID) | No | Contact, Lead or User recipient identity. Use with a template when personalization needs it. |
| `emailToAddress` | Email To Address | No | Required with Email To Name when Email To ID is blank. |
| `emailToName` | Email To Name | No | Required with Email To Address when Email To ID is blank. |
| `emailFromAddress` | Email From / Reply To Address | No | Reply-to address. A matching permitted organization-wide address can be used. |
| `emailFromName` | Email From Name | No | Sender display name when an organization-wide address is not selected. |
| `ccEmailAddresses` | CC Email Addresses | No | Optional comma-separated CC addresses. |
| `bccEmailAddresses` | BCC Email Addresses | No | Optional comma-separated BCC addresses. |
| `emailTemplateName` | Email Template Name (Developer Name) | No | Email template developer name. Otherwise supply Email Subject and Email Body. |
| `targetObjectId` | Target Object Id (Deprecated. See EmailToId) | No | Deprecated template-context override. Prefer Email To ID. This override can change recipient handling. |
| `emailSubject` | Email Subject | No | Required when Email Template Name is blank. |
| `emailBody` | Email Body | No | Required HTML body when Email Template Name is blank. |
| `whatId` | Email Template What Id (Example: Opportunity or Case ID) | No | Optional related record for template merge context, such as an Opportunity or Case. |
| `characterSet` | Character Set (Optional. The character set for the email. If this value is null, the users default value is used.) | No | Optional character set. Blank uses the Salesforce user default. |
| `saveAsActivity` | Email Save As Activity | No | Defaults to `false`. Enables native email activity saving when supported. |
| `runAsync` | Run Async (@future) | No | Defaults to `false`. Keep `false` for this supported send path. A `true` acknowledgement is not a submitted email job. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Immediate validation/send status for the synchronous path. It does not prove recipient delivery. |
| `message` | Message | Validation details or an asynchronous acknowledgement. Inspect DialogueOne Events for send errors. |
| `runAsync` | Run Async (@future) | Reports the requested asynchronous branch. It does not prove a job was submitted. |

## Configure the Flow

1. Select the existing Attachment or exact File version.
2. Configure the recipient and either a template or subject and body.
3. Set the sender and related template context as required.
4. Leave Run Async `false`. Store Success and Message.
5. Inspect the send result and DialogueOne Events before an email-only retry.

Confirm the Flow user's Apex action access and access to the records or Files used by this operation. Review the configured Salesforce API connection user's access when the action makes an API request. For native Salesforce email, also confirm email access, permitted sender configuration and any required activity access.

## Troubleshooting

**Success is true with Run Async true but no email arrives.** That branch does not dispatch delivery. Use the synchronous path after confirming that no previous message was sent.

**Validation fails.** Supply the required attachment, recipient and template/body values.

**A later callout fails with uncommitted work.** Email sending and error Events can leave pending work in the current transaction. Review the later callout boundary.

**Send status is uncertain.** Check the existing email result before retrying. Reuse the confirmed attachment; do not regenerate its document as an email retry.

See the [Flow action catalog](/content/build/flows/index.md) for related actions and transaction guidance. Confirm that the action and input fields are available in the installed package.
