> For the complete documentation index, see [llms.txt](https://docs.ownchat.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ownchat.app/bot/ask-action/ask-file.md).

# Ask File

The **Ask File** action allows the chatbot to request and collect **file uploads from users** during a conversation.

This action is useful when businesses need users to upload documents, images, videos, or audio files as part of a process such as applications, verification, or support requests.

The uploaded file is captured and stored in a variable, allowing the system to process or reference the file later in the workflow.

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

### **When to Use Ask File**

Use the **Ask File** action when the chatbot needs to collect a **file or document from the user**.

**Common Use Cases**

* Resume submission for job applications
* Identity verification documents
* Invoice or receipt uploads
* Image uploads for support requests
* Audio or video submissions

Example interaction:

Bot: Please upload your updated resume in PDF format for the internship application.\
\
User: Uploads file

The chatbot captures the uploaded file and stores it for further processing.

### **How to Add Ask File**

Follow these steps to add the Ask File action to your bot workflow.

* Open **Bot Builder**
* Click **Add Node**

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

* Select the **Ask** tab
* Choose **Ask File**

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

* Configure the required fields
* Click **Create**

Once added, the chatbot pauses at this step until the user uploads the required file.

### **Ask File Configuration**

When creating an Ask File action, several configuration fields must be completed.

#### **Action Name**

The **Action Name** identifies the file upload step in the workflow.

This name is visible only within the bot builder.

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

Example:

Resume Collection\
Upload Verification Document\
Submit Invoice File

In the walkthrough example, the action name is **"Resume Collection for Job Application."**

#### **Message**

The **Message** field contains the prompt shown to the user.

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

Example:

Hi,\
\
Please upload your updated resume in PDF format for the internship application.

This message informs users what type of file they need to upload.

The message supports:

* Dynamic variables
* Text formatting
* Emojis

Variables can be inserted using the **Add Variable** option.

#### **File Type**

The **File Type** field specifies what type of file the user must upload.

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

Available file types include:

* **Image**
* **Video**
* **Audio**
* **Document**

Only one file type can be selected for each Ask File action.

Example:

File Type: Document

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

This ensures the chatbot only accepts the required file format.

#### **Error Attempt**

The **Error Attempt** field defines how many invalid attempts are allowed.

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

Example:

Error Attempt: 2

If the user uploads an incorrect file type multiple times, the chatbot triggers the configured **Action on Invalid** behavior.

#### **Error Message**

The **Error Message** appears when the user uploads an invalid file type.

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

Example:

Invalid file format. Please upload your resume in PDF format only to continue.

This helps guide users to upload the correct file type.

#### **Action on Invalid**

This setting defines how the chatbot responds when the user exceeds the allowed number of invalid attempts.

Available options include:

**End the Flow**

Stops the chatbot conversation.

**Skip the Question**

Continues the workflow without collecting the file.

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

**Fall Back Flow**

Redirects the user to another predefined flow.

### **Store Response in Variable**

The **Store Response in Variable** option saves the uploaded file reference.

Example variable:

user\_upload\_pdf

The walkthrough shows creating a variable such as **user\_upload\_pdf** to store the uploaded document.

#### **Creating a New Variable**

If a variable does not already exist:

* Click **Create New Variable**.
* Enter a variable name.

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

Example:

user\_upload\_pdf

* Select the variable in the **Store Response** field.
* Click **Create** to save the configuration.

### Save and Deploy &#x20;

After configuring the action:

1. Click **Create** to add the action to the flow<br>

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

2. Connect the node appropriately
3. Click Publish to deploy the configuration

### **Example Ask File Interaction**

Example chatbot conversation:

Bot: Please upload your updated resume in PDF format for the internship application.\
\
User: Uploads resume.pdf

The chatbot stores the uploaded file reference in the variable:

user\_upload\_pdf

and continues the workflow.

### **Best Practices**

Follow these recommendations when using Ask File.

**Clearly specify the file type**

Tell users exactly what file format they should upload.

**Limit file types**

Select the correct file type to avoid incorrect uploads.

**Provide helpful error messages**

Explain why a file upload failed and what format is required.

**Store uploaded files properly**

Save file references in variables for later processing.

**Use uploads for workflow automation**

Use the uploaded files for verification, processing, or review.

### **Summary**

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

The **Ask File** action allows chatbots to collect **file uploads from users during conversations**.

With Ask File, you can:

* Request documents or media files from users
* Restrict uploads to specific file types
* Handle invalid file uploads with error messages
* Store uploaded files in variables
* Use uploaded files in automated workflows

This feature enables businesses to **collect documents and media efficiently through chatbot automation**.
