1
votes

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?

1
Do you want the blob folder the same name with attachment name, or just want to send attachment to several blob folder with some condition? - Joey Cai
@JoeyCai The folders already exist, I just need to, based on the name of the attachment, add it to a certain folder. - monstertjie_za
What your criteria for the classification about the attachment name? - Joey Cai
If the file name contains X, send it to FolderExampleName1, if file name contains Y, send it to FolderExample2. - monstertjie_za

1 Answers

1
votes

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