> For the complete documentation index, see [llms.txt](https://docs.couchdrop.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.couchdrop.io/get-started/build-your-first-automation.md).

# Build your first automation

Automations let Couchdrop handle repetitive file operations without scripts or manual work.

### Introduction

[Automations](/automations/overview.md) let Couchdrop perform file operations when a defined event occurs.

In this guide, you will create an automation that runs when a file is uploaded, renames the file, and moves it into a folder based on the upload date.

## Creating an automation in Couchdrop

{% hint style="warning" %}

#### Before you start

To complete this guide, you will need:

* Administrator access to your Couchdrop account
* A folder you can upload a test file to
* The storage connection you created in the previous guide, if you want to test the automation against your own storage
  {% endhint %}

{% stepper %}
{% step %}

### Create an automation

In Couchdrop, select:

**+ Create → Create Automation**

Enter a name for the automation, for example:

`Organize uploaded files`
{% endstep %}

{% step %}

### Choose the trigger

Select the [trigger](/automations/triggers.md) for when a file is uploaded.

Set the source to the folder you want Couchdrop to monitor.

For this guide, use the connected storage folder you configured in the previous step.
{% endstep %}

{% step %}

### Add a rename action

Add a **Rename** [action](/automations/actions.md).

Set the new filename format. For example:

`{TIMESTAMP}_{EXISTING_NAME}`

Use the variable picker in the Automation Builder to insert [dynamic variables](/automations/variables.md).
{% endstep %}

{% step %}

### Add a move action

Add a **Move** action after the rename step.

Set the destination folder using date variables:

`/{YYYY}/{MM}/{DD}/`

For example, a file uploaded on July 27, 2026 moves to:

`/2026/07/27/`

Couchdrop creates the folder path if it does not already exist.
{% endstep %}

{% step %}

### Enable the automation

Review the trigger and actions.

Enable **Automation Enabled**.
{% endstep %}

{% step %}

### Test the automation

Upload a small test file to the source folder.

Open **File Browser**, or check your underlying storage, and confirm the file:

* Has been renamed
* Has moved to the correct date folder

Open **Activity** to confirm each automation step completed successfully.
{% endstep %}
{% endstepper %}

{% hint style="success" %}

### Automate your SFTP workflows

You already have an SFTP user pointing to your connected storage.

Upload another file using that SFTP user.

The file should arrive in the connected storage location, trigger the automation, then be renamed and moved into the date-based folder structure.

Open **File Browser** to confirm the final location, then check **Activity** to see the automation run.
{% endhint %}

### Next steps

You now have a working end-to-end flow:

**SFTP upload → connected storage → automation**

From here, you can build automations for other file transfer workflows using different triggers, actions, and storage locations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.couchdrop.io/get-started/build-your-first-automation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
