Showing results for 
Search instead for 
Did you mean: 
Advocate IV
Advocate IV

Create Blob in For Each

Does Create Blob not work in a for each action?
Trying to get SQL binary blobs into Azure Storage Blob
I get data from sql database (SQL query (V2)), get the table into an array (Compose- not necessary just makes it cleaner), and then a for each on the compose array.
Inside the for each I set a filename for already initialized variable using ID_name_data from other columns. then I use Compose the content of the blob


doc_bin being sql column that has the blob data, then Create Blob. Create blob itself works a file is created in the container but that's it. One file no matter how many items in array.
Looking at run history everything works in the for each except when it comes to the Create Blob part. The Create Blob has the same file name for all files, so it only creates one file in the blob folder. The filename variable is correct in the set action, but in the Create Blob action it's not. They are different sizes when I click through each item so it doesn't technically 'create' the same file, but it's giving each file the same name, randomly it appears.
What am I doing wrong here?



Advocate IV
Advocate IV

After HOURS of trying this decided to try setting values inside the action instead of using set variables and it worked. Not sure why, or what the difference is but it is now creating all the files in the for each in Azure Storage Blob. Posting solution here if anyone else runs into issue




But this WORKS





Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,138)