monstertjie_za
monstertjie_za

Reputation: 7823

Azure Logic App. Write to different blob containers, based on email attachment name

I am in the process of creating an Azure Logic App.

My requirements are as follow:

  1. Check Office365 mailbox every 5 minutes for new mail.
  2. Trigger when new email with attachment is detected.
  3. Copy that attachment (.xls file) and place in respective blob folder, based on name of attachment.

I have the following so far. The mail trigger with attachment is set, and is set to check every 5 minutes.

enter image description here

How can I, based on the name of the attachment, write to different blob folders?

Upvotes: 1

Views: 533

Answers (1)

Joey Cai
Joey Cai

Reputation: 20127

If the file name contains X, send it to FolderExampleName1, if file name contains Y, send it to FolderExample2.

According to your description, I think you could use a condition to achieve what you want.

When your Attachment Name contains "hello", it will go to /data/f1 folder, otherwise it will go to /data/f2 folder. You could refer to the snapshot as below: enter image description here

Also, if you have two more folders, you could Add a parallel branch under the MailBox trigger. enter image description here

Upvotes: 1

Related Questions