David Simpson Apps

Using Power Automate with monday.com automations

The Microsoft 365 SharePoint & Outlook integration app allows monday.com to organise your Microsoft 365 files. If you wish to copy files from one place in Microsoft 365 to another, Microsoft Power Automate is your friend.

One use case for the Templated folder generation automation is when an item is used for each job and receipts are added into a subfolder of the job item. If you need to send a copy of all receipts for all jobs to a separate folder for your accounting staff to process, a Power Automate flow will copy each receipt upon upload to the folder for your accounting staff.

Creating a Power Automate flow to copy files from named subfolders

This guide walks you through creating a Power Automate flow that triggers when a file is added to any subfolder with a specific name pattern (e.g., "Receipts") within a parent folder in SharePoint, and copies the file to another destination folder.

Step 1: Sign in to Power Automate

Go to Power Automate and log in with your Microsoft account.

Step 2: Create a New Flow

  1. In the left-hand menu, click Create
  2. Choose Automated cloud flow
  3. Give your flow a name (e.g., "Copy files from Receipts subfolders")
  4. Under Choose your flow's trigger, search for SharePoint
  5. Select When a file is created (properties only) as the trigger
  6. Click Create

Step 3: Configure the Trigger

  1. Site Address: Select the SharePoint site where the parent folder is located
  2. Library Name: Choose the document library e.g. Documents
  3. Folder: Select the parent folder where the subfolders are located. Leave this at the parent level so the flow triggers for all files created in subfolders below it.

Step 4: Add a Condition to Filter by Subfolder Name

  1. After the trigger step, click + New step
  2. Search for Condition and select it
  3. In the condition settings:
    • In the first field, choose Folder path from the dynamic content
    • Set the condition to contains
    • In the value field, type the name pattern of your subfolders, e.g., Receipts

This condition ensures the flow only triggers for files in subfolders containing "Receipts" in their folder path.

Step 5: Configure the Action to Copy the File

In the If yes branch of the condition (meaning the file was added to a matching subfolder):

  1. Click + Add an action
  2. Search for SharePoint and select Copy file
  3. Configure the Copy file action:
    • Current Site Address: Select the SharePoint site where the source folder is located
    • Configure the destination site and folder as required

Step 6: Handle the "If no" Condition (Optional)

  • If you want to take any action for files that do not meet the folder name condition, you can configure the If no branch of the condition.

You can leave this empty if no action is needed.

Step 7: Save the Flow

  • Click Save at the top to save your flow.

Step 8: Test the Flow

  1. Upload a file into one of the subfolders that matches the name pattern e.g. /Boards/My Board/Item A/Receipts
  2. Check if the file is copied to the destination folder as specified in the flow.

Example Setup:

  • Parent Folder: /Shared Documents/Projects
  • Subfolder Pattern: Subfolders named "Receipts" inside various project folders e.g.
    • /Boards/My Board/Item A/Receipts
    • /Boards/My Board/Item B/Receipts
  • Destination Folder: /Shared Documents/Receipts Files

This flow will automatically copy any file uploaded to a "Receipts" subfolder to the /Shared Documents/Receipts Files folder.

Key Points:

  • The Folder Path dynamic content is used in the condition to identify files added to specific subfolders.
  • The Copy file action is used to move the files to a different destination.
  • Ensure the parent folder is monitored to allow the flow to trigger for subfolders.