List files in root folder in Google Drive Connector(Power Automate Cloud flows)

Japanese version.

This action retrieves a list of files and folders stored in the top level folder of Google Drive.

How to use

Select the "Google Drive" connector when adding steps to the flow.

Select "List files in root folder" from the "Actions" menu.

step is added.

There are no parameters to specify for this action.

Then add an "Apply to each" action from the "Control" connector to the new step.

Specify the "body" of the dynamic content in "Select output from previous steps."

This will cause the action specified in "Apply to each" to be repeated for all files and directories stored in the folder.

Retrieve hierarchies lower than the top level

The information retrieved with this action is limited to the top level files and folders, and does not display anything lower in the hierarchy.

To proceed to the lower levels, put in place a "Condition" action within the "Apply to each" action.

ParameterSet value
Centeris equal to
Condition's Parameters

Then put "List files in folder" in "If yes".

Specify the "Id" of the dynamic content for the "Folder id".

Add the option "Apply to each" and specify the "body" of the "List files in folder".

This allows you to repeat folders and files one level down.

Dynamic content

Typical items used in subsequent steps are as follows.

Additional information about the target file can be obtained.

IdTextIdentifier of the file/folder.
NameTextFile and folder names.
PathTextFull path.
It is difficult to use as is, so string manipulation is often required.
MediaTypeTextMINE type of file.
LastModifiedByTextUser name of the last updater.
LastModifiedText(Datetime)Last updated.
SizeNumberThe number of bytes in the file.

If you need the file content, which is the content of the file, use the "Get file content using Id" action to get it.



Google Drive Connector