Share via

FTP Connector Action 'Get file metadata' Errors When Provided Folder Id (Logic Apps)

Eliot Cole 91 Reputation points
2023-08-10T12:27:17.1633333+00:00

Incident

The 'Get file metadata' action in the Microsoft made FTP connector does not retrieve information for a folder when provided the Id of a folder.

Error

The response given when a folder Id is provided is:

The requested action could not be completed as the specified resource (file/folder) does not exist or is busy.

More Details

I recognise that the name of the action is implicitly 'file' based, however there is a need to utilise an immutable Id when you are running programmatical operations on data, particularly when file based.

Additionally, the 'file' only implication is inferred, not specifically related to just files. I am pretty sure that there are other file related connectors will return details on folders in such an instance. But this inference should not form the basis of any response designed to mean that this should not be looked at. I am merely indicating that I am aware of the situation.

Documentation

The issue that I am reporting is actually in Logic Apps:

https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-ftp

However, I don't know that the situation would be any different using the managed connector:

https://learn.microsoft.com/en-us/connectors/ftp/#get-file-metadata

I only state this as the docs for the managed connector do indicate that there are differences.

Microsoft FTP Connector Configuration

As far as I can see there's no endpoint in this API which would provide that data:

API PathPurpose/datasets/default/filesWorks with an Id to provide file metadata/datasets/default/foldersWorks with an Id to provide listings of internal files or without to show root folders#### The 'Create file' action

In addition to which, the create file cannot be run with a folder Id, and must be run using a folder path.

Whilst valid, this is an inherently insecure (not related to security) operation as the name of a folder can change between the time that you have located it and the time that you are trying to create a file within it.

As clear as the requirement is for retrieving metadata by folder Id, you must also be able to perform other actions based upon that.

Possible Situations

File Information Iteration

This action would be expected to be used by users when iterating details for what is contained in a given folder and not utilising select/filter methods (remembering that not all users are potentially as savvy as others - eg with the knowledge to perform isFolder checks) and then being given errors when that folder contains subfolders.

Folder Information Request

Equally, one may just wish to get the metadata for a folder.

Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.


1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 71,016 Reputation points Moderator
    2023-08-22T04:33:20.1266667+00:00

    @Eliot Cole Thanks for reaching out. The Get file metadata operation gets the metadata for a file and not for the folder. You need to check for BlobMetadata IsFolder property and if this is true (condition statement) then your workflow should not execute the Get file metadata action. In case if you have any feature request on any of the action behavior or connector then I will suggest you to post it in the feedback forum so the team can review it.

    Let me know if you have any queries or concerns.

    Was this answer helpful?

    0 comments No comments

Your answer

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