# Send Document

{% embed url="<https://app.supademo.com/demo/cmm3gs2uj1c31q1bryc0b6e6l?utm_source=link>" %}

### Overview &#x20;

The **Send Document** action allows you to send document files within a bot flow.

This action:

* Sends files such as PDF, Word, Excel, or PowerPoint
* Supports optional caption text
* Does not collect user input
* Automatically proceeds to the next connected node

### Add a Send Document Action &#x20;

1. Click **Add Node**
2. Select **Send Action**
3. Choose **Send Document**

The Send Document configuration panel will open.

#### **Action Name**&#x20;

The **Action Name** is used for internal reference.

* Helps identify the action within the flow
* Does not appear to customers

Examples:

* Product Brochure
* Invoice Copy
* Pricing Sheet

### File Name Configuration &#x20;

You must configure how the document file name appears to the customer.

#### File Name Type &#x20;

Select the file naming method.

Available options:

* **Default**
* **Manual**

**Default** &#x20;

The original file name from the uploaded document will be used.

**Manual** &#x20;

You can manually define a custom file name.

#### File Name &#x20;

If **Manual** is selected:

* Enter the desired file name
* The document will be delivered using this name

Example:

* Company PDF
* Product Catalog 2024

#### Upload Type – From Media &#x20;

Use this option to select a document from the Media Collection.

Steps:

1. Select **Upload Type – From Media**
2. Click **Upload Media**
3. Choose the required document from the popup
4. Confirm selection

The selected document will be attached to the action.

#### Upload Type – URL &#x20;

Use this option to send a document using a direct URL.

**URL** &#x20;

Enter the publicly accessible document URL.

**Fallback URL** &#x20;

Enter a backup document URL.

If the primary URL fails or is inaccessible, the fallback URL will be used.

### Caption (Optional) &#x20;

You can add caption text along with the document.

Caption features:

* Maximum length: **4096 characters**
* Supports emojis
* Supports text formatting
* Supports variables

Use the caption to provide context or additional information about the document.

#### **Text Formatting Options (Caption)**&#x20;

**Bold** &#x20;

1. Select the text
2. Click **B**

**Italic** &#x20;

1. Select the text
2. Click **I**

**Strikethrough** &#x20;

1. Select the text
2. Click **S**

**Emojis** &#x20;

Click the Emoji icon to insert emojis.

### Add Variable &#x20;

Use **Add Variable** to insert dynamic data into the caption.

When sent, variables are automatically replaced with customer-specific data.

#### Customer Fields &#x20;

Predefined fields stored in the customer profile.

Examples:

* Customer Name
* Phone Number
* Total Amount
* Custom Fields

Example usage:

Hi {{customer.name}}

To insert a variable:

1. Click **Add Variable**
2. Select the required field
3. The variable will be inserted automatically

#### Supported File Formats &#x20;

* application/pdf
* application/vnd.ms-powerpoint
* application/msword
* application/vnd.ms-excel
* application/vnd.openxmlformats-officedocument.wordprocessingml.document
* application/vnd.openxmlformats-officedocument.presentationml.presentation
* application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

#### File Size Limit &#x20;

Maximum file size: **100 MB**

Files exceeding this limit will not be accepted.

#### Save and Deploy &#x20;

After configuring the action:

1. Click **Create** to add the action to the flow
2. Connect the node within the flow
3. Click **Publish** to deploy changes

#### Validation Before Publishing &#x20;

Before publishing:

* Confirm file format and size meet requirements
* Verify URL accessibility (if using URL upload type)
* Ensure fallback URL is valid (if configured)
* Confirm file name type is set correctly
* Test the flow to confirm correct document delivery


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ownchat.app/bot/send-action/send-document.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
