How can i change my logic app path to the storage account monthly

FAHMY Ayoub (NPO) 1 Reputation point
Dec 21, 2022, 4:04 PM

I have logic app that retrive data from a storage account through a path folder that i have assigned manually, and send an email with file attached. This path is created by a Cost Export in a dedicated storage account.

272925-image.png

The problem is that Cost Export creates the folders in the storage account by month, hence the first path that i gave my logic app to retrive the data would be obsolete after a month, since i need to send the latest file uploaded daily.

272906-image.png

example of the folder for the month of December

How can i make dynamic the assignment of the path to the logic app without doing it manually?

Thank you for your time guys.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,257 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,741 Reputation points
    Dec 23, 2022, 6:36 AM

    @FAHMY Ayoub (NPO) Thanks for reaching out. As you are using the When a blob is added or modified (properties only) (V2) so your logic app will be triggered for every blob that would be created on the specified path. So as per your workflow so individual email will be sent for each blob that will be created on your path.

    To answer your question, you cannot specify the dynamic container path so you need to replace the storage trigger with the event grid trigger and configure event grid subscription on your storage account. Now you can configure the filter condition at the event grid subscription to only send event for specific path using filter condition. For more details, please refer to below document.
    https://video2.skills-academy.com/en-us/azure/storage/blobs/storage-blob-event-overview
    https://video2.skills-academy.com/en-us/azure/event-grid/event-schema-blob-storage

    Feel free to get back to me if you have any queries or concerns.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.