Esteban Chornet
Esteban Chornet

Reputation: 1237

How can I attach all content files from folders in my blob container with a Logic App?

I have a blob container "image-blob", and I create a folder blob with OCR image text and the image (two files, image.txt (with the text of an image) and image.png). The container have multiple folders, and inside each folder both files. How can I make a Logic App in which it sends an email with both files of every folder? (this would be an email for each folder with 2 files). The name of the folder is generated randomly and every file has the name of the folder + extension.

I've tried making a condition and if isFolder() method, but nothing happens.

This is how my container looks like:

containers

This is files each folder have:

files

Upvotes: 1

Views: 1030

Answers (2)

George Chen
George Chen

Reputation: 14334

You could try with List blobs in root folder if your folders are in the root of the container or if not you could use List blobs.

If you try List blobs in root folder, your flow would be like the below pic shows. After List blobs you will get all blob info and you could add action like Get blob content using path.

enter image description here enter image description here

And if you use List blobs, only the first step is different. And you need specify the container path. The other steps just like the List blobs in root folder.

enter image description here

In my test, I add the get blob content using path action and here is the result.

enter image description here

It did get all blob , however due to the For each action, you could only get one by one, so in your situation, you maybe need to store the info you need into a file then get the whole information sheet from the file.

Hope this could help you, if you still have other questions, please let me know.

Upvotes: 2

Joey Cai
Joey Cai

Reputation: 20127

How can I make a Logic App in which it sends an email with both files of every folder?

It's hard to put two files in an email. The following snapshot shows that send an email with each files of every folder.

enter image description here

If you still have any problem, please feel free to let me know.

Upvotes: 0

Related Questions