perform a action on new files in azure file service from a logic app

2.2k views Asked by At

I have a azure storage account with the File service named container-ftp.

I am needing to have a process that moves files that land here to a FTP server. There are currently no triggers for the Azure File Storage connector.

I have setup a scheduled trigger to run every :30

But how can I find out what files are new or are in there? I am OK with deleting the file after it runs, so does that help?

Using the blob storage I have it working by using the trigger on a file creation in blob storage, but they are wanting to use the Files vs Blob storage.

How would I go about doing this?

2

There are 2 answers

1
Fei Han On BEST ANSWER

Currently there is no trigger for Azure file storage in Azure Logic apps, a feedback: Add trigger for Azure File Storage has been submitted, you can vote for it.

how can I find out what files are new or are in there? I am OK with deleting the file after it runs, so does that help?

As you said, you can try to delete the files after the actions (read file and upload to ftp) executed, which can prevent your logic app from uploading ‘old’ files.

Besides, if possible, you can try other approaches to move files from Azure file storage to FTP server. For example, you can mount the Azure File share and run a FileTrigger WebJob to detect whether new files arrive and upload files to FTP server.

enter image description here

enter image description here

1
Paco de la Cruz On

Because there is no trigger yet, the easiest approach would be to delete the file after you have processed it. Otherwise you would need to keep a trigger state or polling watermark (stored somewhere else, like Azure Storage Table) to know when was the last time you checked, and then only get the files that are modified after that polling watermark.