# Workflow Automation: Attach Files

Use **Attach File(s)** to attach a file or files from previously collected *Items*. Files with Workflow Automation cannot be pushed, they can only be pulled. That means that the destination item does the work.

**Note: These files must be uploaded to the Podio item directly and not externally on Dropbox, Google Drive, etc.**

For example, Workflow Automation is a great tool for archiving *Items* from *App A* to *App B*. When creating an Archive App, be sure to include a *Relationship field* to the Original App.

First, create a flow to make a copy of the *Item* in *App A*

1. Set flow to **Trigger on Update** of an *Item* in *App A*

   ![Attach Items 1](https://www.progress.com/podio/documentation/assets/db61959be5f4150e5a4d2cf16db46a5c/attachitems1.png)

2. Add **Filters** to decide if the flow has run

3. Add the **Create Item** action to create in *App B* and copy all fields over. Don't forget to set up the relationship to this *Item* on the new *Item* and activate the [*Hook Event*](https://www.progress.com/podio/documentation/workflow-automation/getting-started/understanding-hook-events) option under *(opt)*

   ![Attach Items 2](https://www.progress.com/podio/documentation/assets/71e36d8ffc363e67ef1f807441f13276/attachitems2.png)

Next, create a flow to collect the files from the old *Item* in *App A* to the new *Item* in *App B*

1. Set flow to **Trigger on Create** of an Item in App B

   ![Attach Items 3](https://www.progress.com/podio/documentation/assets/0a5b30bd1ef1e91e4e893e8cab8fe21a/attachitems3.png)

2. Add the **Get Referenced Item** action and set to follow the reference direction to the App

   ![Attach Items 4](https://www.progress.com/podio/documentation/assets/7d6d0a59fcab22ab32000fdf7f9b0e38/attachitems4.png)

3. Add the **Attach File(s)** action to add the files from the collected App. You can choose All Files or just The Most Recent one.

   ![Attach Items 5](https://www.progress.com/podio/documentation/assets/2dcdadbe05747d236dbb047467a0124f/attachitems5.png)

You can take this a step further and choose to delete the original *Item* in *App A* since the Archive has now been created.

First, add another Status option to *App A* and then do a Refresh from Podio in your Workflow Automation account.

Next, open the flow you created to Attach File(s) and add a **Wait** action to ensure that the files are copied over and the **Update Referenced** action to set the status to 'Ready for Deletion'

![Attach Items 6](https://www.progress.com/podio/documentation/assets/1edbb647b0533fe75283886450f0f41e/attachitems6.png)

Finally, create a flow to delete the original Item.

1. Set flow to **Trigger on Update** of an *Item* in *App A*

   ![Attach Items 7](https://www.progress.com/podio/documentation/assets/8717fa05171007498fb6946372e1dade/attachitems7.png)

2. Add **Filters** to decide of the flow is ran

3. Add the **Delete Item** action

   ![Attach Items 8](https://www.progress.com/podio/documentation/assets/b2e72a7db2b30efb510b5c7adcb9759a/attachitems8.png)
