Copy Image files from one drive to blob storage

Chandrayee Majumder 25 Reputation points
2025-08-29T10:58:22.46+00:00

I need to copy image files from One Drive location to Blob Storage and the process should be automated, whenever a new image is put in one drive, that should be copied to the blob. How I can do that?

Azure Blob Storage
Azure Blob Storage

An Azure service that stores unstructured data in the cloud as blobs.

0 comments No comments

Answer accepted by question author
Marcin Policht 113.6K Reputation points MVP Volunteer Moderator
2025-08-29T11:22:55.9233333+00:00

You can automate the sync of new image files from OneDrive to Azure Blob Storage using Power Automate or Azure Logic Apps. Both support triggers on OneDrive and actions on Azure Blob Storage. Here’s how you can set it up:

Option 1: Power Automate (easiest / no-code)

  1. Go to Power Automate.
  2. Create a new Automated Cloud Flow.
  3. Select the trigger: "When a file is created (OneDrive)".
  4. Add an action: "Create blob (Azure Blob Storage)".
    • Configure your Azure Storage account connection.
    • Set the Blob container name.
    • Use File Content from the OneDrive trigger as the blob content.
    • Use File Name as the blob name.
  5. Save the flow and test by dropping an image in your OneDrive folder.

Option 2: Azure Logic Apps (scalable / integration-heavy)

  1. Create a Logic App (Consumption) in the Azure Portal.
  2. Add a trigger: OneDrive – When a file is created.
  3. Add an action: Azure Blob Storage – Create blob.
    • Configure connection with your Storage account.
    • Map file name and file content to the blob.
  4. Deploy and let it run continuously.

Logic Apps is essentially the same as Power Automate but runs in Azure, which may be preferable for enterprise deployments.

Option 3: Custom script / function (more control)

If you want full control or more complex processing:

  • Use Microsoft Graph API to watch OneDrive folders for new files.
  • Write an Azure Function or Python/Node.js app that:
    1. Subscribes to OneDrive webhooks.
    2. Downloads new files when notified.
    3. Uploads them to Azure Blob Storage using the Azure Storage SDK.

This is more effort but allows custom logic (e.g., renaming, resizing images, metadata tagging).


If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

hth

Marcin

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.