web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to check if the bl...
Power Automate
Unanswered

How to check if the blob already exists in blob container by contents

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a file which I read from SharePoint folder and upload it in Blob storage using Create Blob action, Now there might be case that this blob is already present. In that case, I would not be running Create Blob action. How can I check if the blob already exists?

 

I cant check by Name, because there can be same name of blob coming in and in that case it will be overwritten in Blob container.

 

Is there a way I check the content of blob with the content of file in SharePoint before using Create Blob action.

 

I used "Get file content using path" and there i get "$content" but in action "Get Blob metadata using path" I get the metadata but in there I dont have "content" and in action "Get Blob content using path" I get the actual file content and not the encoded(base64) value as in $content. So I cant check both these values'

Categories:
I have the same question (0)
  • brricard Profile Picture
    Microsoft Employee on at

    Hello,

     

    "I cant check by Name, because there can be same name of blob coming in and in that case it will be overwritten in Blob container."

     

    I don't see why is this a problem.

     

    Example if the name of the blob is the same than the files' name:

    Blob1: samplefile

    File1: samplefile.pdf

    File2: samplefile.png

    ---

    A new file is uploaded to sharepoint;

    1) Check file name: samplefile.pdf

    2) Check all blobs - list blobs action

    3.1) If there is a blob with the same name check the files

    a) If there is a file with the same name, do nothing;

    b) If there is NO file with the same name, upload it.

    3.2) If there is no blob with the same name;

    a) Create blob and upload the file.

     

    This will work if there is a consistency between blob name and files listed there.

    --------

     

    Regarding your question, I do see the same behavior between checking content in sharepoint vs get blob connectors; 

     

    brricard_0-1620808264389.png

     

    Also, please keep in mind we are storing files in different types of data source. If I find a way to compare both outputs (we can use a substring just to compare the first values - part of it are equal) I will share it.

     

    Thank you,

    BR

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    "I cant check by Name, because there can be same name of blob coming in and in that case it will be overwritten in Blob container."
    I don't see why is this a problem.

    There is a problem, let say I have a file coming in SharePoint as Test1.csv and metadata.csv. These two files are moved to Blob container and later by some functionality, contents of these two files are combined and copied in a Tabular storage. Now I get test2.csv and metadata.csv in SharePoint. Now the metadata.csv is a new file which is overwritten with the existing one in SharePoint. Flow triggers and send these two files in Blob container and I am ok with my metadata.csv replacing the old metadata.csv in Blob container. and later on Test2.csv and new metadata.csv is combined and copied in tabular storage.
    There may be scenario where I get only Test3.csv file in SharePoint. In that case test3.csv is combined with last metadata.csv file in SharePoint and since this metadata.csv was already copied in the blob , it replaces it and then both files are combined and copied in tabular storage. So each time i need to check if the metadata file coming in SharePoint already exists in Blob container or not. If it does not exist then I would like to copy it else I would not.and this has to be done by checking the content.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 173 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 95 Super User 2026 Season 1

Last 30 days Overall leaderboard