# Mate Drive

## Introduction

The Mate Drive feature in Autom Mate is a dedicated utility designed to provide a secure and structured environment for storing and managing files that are essential to your workflows. It functions similarly to organizing folders on your computer, enabling users to categorize, access, and maintain files in a centralized location.

By acting as a unified repository, Mate Drive simplifies file management, minimizes redundancy, and ensures that critical files remain consistently available during workflow execution. This allows users to focus on building and running Automations without the operational overhead of handling file storage individually.

{% embed url="<https://drive.google.com/file/d/1MeDCdSYVU03RhbLzUvbXK3Tn460wnesQ/view?usp=sharing>" %}

## What is Mate Drive?

The Mate Drive serves as a virtual storage space within Autom Mate, allowing users to upload, store, and manage files used in their automation processes. It provides a seamless way to handle files without relying on external storage solutions.

#### Key Features

* **Add Files**: Upload files to the Mate Drive from your computer.
* **File Copying**: Copy files within the Mate Drive for reuse in different workflows.
* **Store Outputs**: Save task outputs directly to the Mate Drive for future reference.
* **File Download**: Download stored files to your computer for offline use.
* **File Editing**: Edit, rename, or delete files within the Mate Drive as needed.

{% hint style="warning" %}

#### Operational Considerations

At this time, Mate Drive does not provide proactive alerting or notification when storage capacity is close to being exceeded. It is therefore the customer’s responsibility to regularly monitor and manage their allocated storage usage.

⚠️ **Important:** If the available storage space is fully consumed, **Automs will fail to execute** until sufficient capacity is restored. To avoid workflow interruptions, we strongly recommend implementing internal monitoring practices and periodically reviewing usage.

*Threshold-based notifications are planned to be introduced in a future release.*
{% endhint %}

## How To Use Features

### Adding Files

**Description:** Add files to the Mate Drive for use in your workflows.

**Steps:**

1. Click on the "Add File" button.
2. Select the file you want to upload from your computer.
3. The file will be uploaded and stored in the Mate Drive

{% hint style="danger" %}

#### Upload Limitation

For direct local uploads, the maximum supported file size is **50 MB**.
{% endhint %}

### File Copying

**Description:** Copy files stored in the Mate Drive for reuse in different workflows.

**Usage:**

* Copy the desired file as "**root**" to access it in any part of your workflow.

### Storing Outputs

**Description:** Save task outputs directly to the Mate Drive for future reference.

**Usage:**

* After completing a task, store its output in the Mate Drive.
* Access the latest versions of files whenever needed.

#### File Download

**Description:** Download files stored in the Mate Drive to your computer.

**Usage:**

* Select the file you want to download.
* Download the file to your local system for offline access.

### File Editing and Management

**Description:** Edit, rename, or delete files within the Mate Drive.

**Usage:**

* Click on the file to view options for editing, renaming, or deleting.
* Maintain file organization and manage files efficiently.

{% embed url="<https://drive.google.com/file/d/1VFumJ9KQm0pgLZLCbJZVZle_n9-G1o-j/view?usp=sharing>" %}

## How To Use Actions

<figure><img src="/files/6QhkK5ADHVNIKU2oEveN" alt=""><figcaption></figcaption></figure>

### **Delete from Mate Drive**

**Description and Purpose:** This action is designed to delete files from the Mate Drive. It is useful when files recorded in the Mate Drive during the running of Autom need to be deleted as part of a process. This action can handle the deletion operation efficiently.

Additionally, users can utilize this action to delete any file from the Mate Drive as per their requirements.

**Usage:** To use this action, the user must configure two essential parts:

1. **Folder Path:** The user needs to specify the folder path within the Mate Drive where the file to be deleted is located. This can be done by clicking on the Mate Drive icon on the right side and selecting the appropriate folder.

<figure><img src="/files/tr75ct2UaqhiehzR9WHM" alt=""><figcaption></figcaption></figure>

2. **Filename with Extension:** After defining the folder path, the user must specify the file name along with its extension (e.g., example.txt). Once Autom is run, the specified file in the Mate Drive will be deleted.

<figure><img src="/files/G6NBbdgRqPb2BJiK8pqH" alt=""><figcaption></figcaption></figure>

**Inputs:**

* **Folder Path:** Specify the folder path in the Mate Drive by selecting it via the Mate Drive icon.
* **Filename with Extension:** Enter the complete filename, including the extension, of the file to be deleted (e.g., example.txt).

**Action Output:** The successful deletion of the specified file from the Mate Drive.

<figure><img src="/files/XyhpAzRAZXkgFA5uqIWS" alt=""><figcaption></figcaption></figure>

### **Save to MateDrive**

#### **Description and Purpose**

The **Save to MateDrive** action allows Autom Mate users to store files in MateDrive, Autom Mate’s internal file storage system. This action supports two types of content inputs — a **base64-encoded string** or a **local file path** — making it suitable for both **cloud** and **on-premise** installations.

By defining the folder, filename, file content, and overwrite behavior, users can persist dynamic documents, transformed files, or AI-generated content during workflow execution. The saved file’s path is returned for further use in downstream actions.

***

#### **Usage Instructions**

{% stepper %}
{% step %}
**Choose Target Folder in Mate Drive**

**Folder Path**: Define where the file will be stored.\
Example: `mate:/documents`

{% hint style="info" %}
Use folders (e.g., `mate:/logs/` or `mate:/output/`) to keep files organized and prevent clutter in the root directory.
{% endhint %}
{% endstep %}

{% step %}
**Provide File Name**

**Filename with Extension**: Enter the desired name and format of the file to be saved.\
Example: `summary.txt`, `report.pdf`

{% hint style="danger" %}
If the filename already exists in the selected folder and "overwrite" is disabled, the action will fail. Use dynamic naming (e.g., with timestamps) to avoid collisions.
{% endhint %}
{% endstep %}

{% step %}
**Provide File Content**

Choose **one** of the following content inputs:

**🔹 Base64 Content (Cloud or Hybrid Installations)**

**File PathBase64**: Use a base64-encoded string (e.g., `##base64[Base64]##`). This is typically generated using the `ENCODE` action in the same flow.

**🔹 Direct File Path (On-Prem Installations Only)**

**File Path**: Enter a file path from the on-prem server's file system (e.g., `C:/autom/reports/file.xlsx`).

{% hint style="danger" %}
Using local file paths is only supported in **on-premise deployments**. Cloud-hosted environments do not have access to local file systems and will return an error if a direct path is provided.
{% endhint %}

{% hint style="info" %}
Ensure the file path is correct and accessible by the Autom Mate agent running on the server. Use absolute paths for reliability.
{% endhint %}
{% endstep %}

{% step %}
**Set Overwrite Behavior**

**Overwrite existing file if the same name exists**:\
Enable this if you want to overwrite any existing file with the same name in the selected folder.

{% hint style="info" %}
Enable this option if you're saving regularly updated reports or logs under the same filename.
{% endhint %}
{% endstep %}

{% step %}
**Capture the Output Path**

**New File Path**: Select a `string` variable (e.g., `NewFilePath`) to store the full path of the newly saved file.\
This path can be reused in later steps such as messaging, downloading, or emailing.

{% hint style="info" %}
Use this path in a `MESSAGE`, `EMAIL`, or `DOWNLOAD FILE` action to inform users or link them directly to the file.
{% endhint %}
{% endstep %}
{% endstepper %}

***

#### **Inputs**

| Field                               | Description                                                         |
| ----------------------------------- | ------------------------------------------------------------------- |
| **Folder Path**                     | The destination directory in MateDrive (e.g., `mate:/`)             |
| **Filename with Extension**         | Name of the file, including the extension (e.g., `log.txt`)         |
| **File PathBase64** / **File Path** | Either base64 string (cloud) or on-prem file path (on-premise only) |
| **Overwrite existing file**         | Boolean setting to enable file replacement if it already exists     |

***

#### **Outputs**

| Field                        | Description                                                                       |
| ---------------------------- | --------------------------------------------------------------------------------- |
| **New File Path** (`string`) | Contains the full path to the saved file in MateDrive (e.g., `mate:/summary.txt`) |

***

#### **Example Output**

```json
"mate:/summary.txt"
```

This value is stored in the selected variable (e.g., `NewFilePath`) and can be used in subsequent actions such as notifications, download, or file linking.

{% hint style="danger" %}

#### Upload Limitations

Mate Drive has defined storage limits that must be observed when saving files:

* The maximum supported file size for the **Save to Mate Drive** action is **250 MB**.
* For direct local uploads, the maximum supported file size is **50 MB**.
* Files that exceed these limits cannot be stored, and the action will return an error.
* To remain compliant with these limits, we recommend applying proper file handling practices such as compression or splitting large files before upload.
  {% endhint %}

***

## Additional Tips

### [**Use Cases**](/userguide/use-cases.md)

### [FAQ](/userguide/faq.md)


---

# 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.autommate.com/userguide/libraries/utility/mate-drive.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.
