Move Files/Folders
🔹 Definition
The “Move File/Folder” action allows you to relocate a specific file or folder from one directory to another within your OneDrive. Whether you're reorganizing your file structure, archiving completed documents, or consolidating project files, this action simplifies the process by letting you specify both the source item and destination location. It supports selection by file/folder ID or path, making it easy to dynamically reference items from previous steps in an automation flow. Additionally, you can rename the item during the move operation using the optional Item Name field. This action ensures accurate, seamless file transfers without the need for manual intervention.
Example Use Cases
1. Automated Project Organization
Easily move completed project files from a general "In Progress" folder to specific project folders, helping teams keep documents neatly categorized.
2. Post-Approval File Management
After a document receives approval (e.g., through an automation flow), it can be automatically moved to an "Approved" folder for compliance and tracking.
3. Archiving Old Documents
Automatically move outdated or unused files (e.g., monthly reports, old logs) to an "Archive" directory to maintain a clean and focused file system.
4. Dynamic File Sorting
Move files based on dynamic conditions (like file type, department, or date) into designated folders — for example, routing invoices to "Finance" and photos to "Marketing".
5. Organizing User Uploads
When users upload documents (e.g., via forms), this action helps move them to a relevant folder such as “/HR/Resumes” or “/Finance/Receipts” based on context.
6. Simplifying Folder Restructures
If you restructure your OneDrive layout, this action makes it easy to migrate files/folders from old locations to new directories without manual steps.
🔧 Inputs
1. Connection
Your authenticated OneDrive connection that allows this action to access your files and folders.Why it matters: Without this connection, the system won’t be able to interact with your OneDrive account. Make sure it's properly set up to authorize file operations.
2. Selecting File or Folder
Specify the file or folder you want to move within your OneDrive.How to provide it:
-
Option 1: Use OneDrive picker – Click the field and visually select the desired item from your OneDrive interface.
-
Option 2: Manual Input (ID or Path):
- If ‘Select By Path’ is disabled, provide the ID of the item (e.g.,
1EED600A8F0FD9A1!s75181466e59d4bacb1ec55930b932ed1
) - If ‘Select By Path’ is enabled, provide the full path (e.g.,
/drive/root:/Pictures/Screenshot 2023-05-10 125216.png
)
- If ‘Select By Path’ is disabled, provide the ID of the item (e.g.,
Why it matters: This tells the action what needs to be moved.
3. Selecting Destination Folder
Select the folder where the specified file or folder will be moved to.How to provide it:
-
Option 1: Use OneDrive picker – Click to select the destination visually.
-
Option 2: Manual Input (ID or Path):
- If ‘Select By Path’ is disabled, provide the folder ID
- If ‘Select By Path’ is enabled, provide the folder path (e.g.,
/drive/root:/Projects/Completed
)
Why it matters: This is the target location where your item will be moved. If not set properly, the item may end up in an unintended place or cause an error.
4. Item Name
The name you want to assign to the file or folder in its new location.Examples:
- For a file:
Final_Report.pdf
- For a folder:
Archived_Designs
Why it matters:
- If you want to rename the item during the move, this is where you define the new name.
- If you want to keep the same name, simply re-enter the current name.
📤 Outputs
When this action successfully completes, it returns detailed information about the moved file or folder. These outputs can be used in later steps of your flow — for logging, referencing, or further automation.
1. Id
The unique identifier of the moved file or folder in OneDrive.**Why it matters:**This ID can be used in subsequent actions (like update, share, or delete) to target this exact item. Especially useful when dynamic references are required.
2. Name
The final name of the moved file or folder after the action completes.**Why it matters:**Confirms the item's name, especially if it was renamed during the move. Can be useful for validation, notifications, or summaries.
3. Path
The full OneDrive path to the moved file or folder (e.g., /drive/root:/Documents/Reports/Final_Report.pdf
).**Why it matters:**This provides a human-readable reference to the item’s new location. Helpful for creating hyperlinks, logs, or visual confirmations.
4. Web URL
A web-accessible link to open the moved file or folder directly in the OneDrive interface.**Why it matters:**Use this to create direct access points in emails, dashboards, or workflow outputs — no extra lookup needed.
5. Download URL (only for files)
A pre-authenticated direct download link for the file, allowing you to retrieve its content without re-authentication.**Why it matters:**Useful in workflows that need to transfer the file to another system, attach it to an email, or download it for local storage.
6. MIME Type (only for files)
The MIME type (e.g., application/pdf
, image/png
) that identifies the file format.**Why it matters:**Helpful for conditional logic (e.g., send PDFs to one system, images to another), previewing, or setting correct content types in APIs.
7. Size (only for files)
The size of the file in bytes (e.g., 2048576
for ~2MB).**Why it matters:**Enables checks like maximum size validations, storage usage reporting, or conditional flows based on file size.
📘 Example
Scenario: Automatically Organizing Uploaded Reports in OneDrive
**Business Case:**A company receives weekly sales reports from various departments via a form submission workflow. All uploaded files are stored in a general "Uploads" folder in OneDrive. The goal is to automatically move each file to the correct department folder based on metadata provided in the form.
✅ Step-by-Step Implementation:
-
**Trigger:**The workflow is triggered when a form is submitted with a file upload and a "Department" field (e.g., Sales, HR, Finance).
-
**Identify Source File:**The uploaded file is stored in OneDrive under
/drive/root:/Uploads
. The file path or ID is retrieved from a previous step using the token picker. -
**Determine Destination Folder:**A conditional logic block checks the department name and maps it to a destination path like:
/drive/root:/Departments/Sales
/drive/root:/Departments/Finance
-
Configure Move Action:
- Connection: Connected to the user’s OneDrive account.
- Selecting File or Folder: The uploaded file (selected dynamically using the token from the form trigger).
- Selecting Destination Folder: Department folder path (set using conditional logic and path-based selection).
- Item Name: (Optional) The name remains the same or can be updated (e.g., “Weekly_Report_Sales.pdf”).
-
**Output Usage:**The outputs — like the new file
Path
,Web URL
, andDownload URL
— are used in a notification email to the relevant manager, with a direct link to the report.
Result: The uploaded file is seamlessly moved from the general "Uploads" folder to its respective department folder, keeping the OneDrive structure clean and organized without any manual sorting.
Updated about 14 hours ago