Skip to main content
Skip table of contents

Using Power Automate with monday.com automations

The Microsoft 365 SharePoint • Automate & Embed app allows monday.com to organise your Microsoft 365 files, but if you wish to copy files from one place in Microsoft 365 to another, then 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. Perhaps you need to send a copy of all receipts for all jobs to a separate folder for your accounting staff to process. This Power Automate flow will copy each receipt upon upload to the folder for your accounting staff.

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. The flow will copy the file to another destination folder.

Step 1: Sign In to Power Automate

  1. 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 (for Matching Subfolders)

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

    • Click + Add an action.

    • Search for SharePoint and select Copy file.

  2. Configure the Copy file action:

    • Current Site Address: Select the SharePoint site where the source folder is located (same as earlier).

    • File to Copy: Use the dynamic content and select File Identifier (this refers to the file that triggered the flow).

    • Destination Site Address: Select the SharePoint site where the destination folder is located (can be the same or a different site).

    • Destination Folder Path: Specify the path to the folder where the file should be copied.

    • If Another File is Already There: Choose the desired behavior (e.g., Copy with a new name).

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

  1. 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

  1. 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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.