> For the complete documentation index, see [llms.txt](https://academy.shade.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.shade.inc/guides/automations/auto-organize-new-uploads.md).

# Auto-organize new uploads

Set metadata, rename, and file new uploads into the right project folder the moment they land.

**Outcome:** files dropped into an `Incoming` folder are tagged with their project, renamed consistently, and moved into that project's folder, without anyone sorting them by hand.

**Who it's for:** teams that receive a steady stream of media (camera cards, agency deliveries, contributor uploads) and spend time sorting it.

**Time:** about 20 minutes.

## Before you start

* Build [Your first automation](/guides/automations/your-first-automation.md) first if you haven't used the automation editor.
* Agree on a filename convention that starts with a project code, for example `ACME_interview_01.mov`. This recipe reads the project code from the start of the filename.
* Add a **Project** text field to the drive's metadata. See [Metadata and Custom Fields](https://academy.shade.inc/ai-tools/custom-and-automated-metadata).
* Create a destination folder for each project, such as `Projects/ACME/Footage` and `Projects/ACME/Stills`. **Move Asset** moves files into folders that already exist. It doesn't create them.

## How it works

```mermaid
flowchart LR
  T["Asset Uploaded (Incoming)"] --> X["Transform Text: project code from filename"]
  X --> M["Update Asset Metadata: Project"]
  M --> S{"If / Else: asset type"}
  S -->|video| V["Move Asset to Projects/code/Footage"]
  S -->|image| I["Move Asset to Projects/code/Stills"]
```

## Steps

{% stepper %}
{% step %}

### Trigger on uploads to Incoming

Create a new automation named `Sort Incoming`. Choose **Asset Uploaded** and set **Upload location** to `Incoming`.
{% endstep %}

{% step %}

### Pull the project code out of the filename

Add a **Transform Text** step:

* **Input text:** type `{` and choose the uploaded asset's **name**. The name doesn't include the file extension.
* **Operation:** split, keeping the first part.
* **Delimiter:** `_`

For `ACME_interview_01.mov`, the step outputs `ACME`.
{% endstep %}

{% step %}

### Tag the file with its project

Add **Update Asset Metadata**:

* **Asset:** the uploaded asset from the trigger.
* **Fields to update:** set **Project** to the output of the Transform Text step.

Now the file is searchable and filterable by project, even if someone moves it later.
{% endstep %}

{% step %}

### Route by file type

Add an **If / Else** step that checks the uploaded asset's **type**.

* On the video branch, add **Move Asset** with **Destination folder** set to `Projects/`, then the Transform Text output, then `/Footage`.
* On the other branch, add **Move Asset** with `Projects/`, the Transform Text output, then `/Stills`.

Type `{` in the **Destination folder** field to insert the project code between the fixed parts of the path.
{% endstep %}

{% step %}

### Optional: rename to your house style

Before the move, add **Rename Asset** if you want consistent names, for example the project code, the shoot date, and the original name. The original file extension is kept automatically, so don't type it.
{% endstep %}

{% step %}

### Save, activate, and test

Click **Save**, then **Activate**. Upload a test file named with a real project code and check that it ends up in the right folder with **Project** filled in. If it doesn't, open **Runs** to see which step failed and why.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
Automations act with the permissions of the person who created them. If the creator loses edit access to the destination folders, the **Move Asset** step fails.
{% endhint %}

## Variations

* **Unknown project codes:** before moving, add **Find Record** to look the code up in a **Projects** custom object, and send files with no match to an `Incoming/Unsorted` folder instead. See [Model projects and clients as custom objects](/guides/custom-objects-and-metadata/model-projects-and-clients-as-custom-objects.md).
* **Let AI tag the content:** turn on **Autofill with AI** for fields such as Shot type or Tags, so they fill in from the image or video itself. You don't need an automation step for that.
* **More than two file types:** use **Switch** instead of **If / Else** to send video, audio, images, and documents to separate folders.

## Related guides

* [Your first automation](/guides/automations/your-first-automation.md)
* [Design a metadata schema that scales](/guides/custom-objects-and-metadata/design-a-metadata-schema-that-scales.md)
* [Create a folder for every new project](/guides/custom-objects-and-metadata/create-a-folder-for-every-new-project.md)


---

# 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 dynamically by asking a question.

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

```
GET https://academy.shade.inc/guides/automations/auto-organize-new-uploads.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 `build a script that syncs our docs to a CMS` 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.
