List files in root folder in Google Drive Connector(Power Automate Cloud flows)
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.
Parameter | Set value |
---|---|
Left | IsFolder |
Center | is equal to |
Right | true |
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.
Name | Type | Description |
---|---|---|
Id | Text | Identifier of the file/folder. |
Name | Text | File and folder names. |
Path | Text | Full path. It is difficult to use as is, so string manipulation is often required. |
MediaType | Text | MINE type of file. |
LastModifiedBy | Text | User name of the last updater. |
LastModified | Text(Datetime) | Last updated. |
Size | Number | The 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.
For those who want to learn Power Automate Cloud flow effectively
The information on this site is now available in an easy-to-read e-book format.
Or Kindle Unlimited (unlimited reading).
You willl discover how to about basic operations.
By the end of this book, you will be equipped with the knowledge you need to use Power Automate Cloud flow to streamline your workflow.
Discussion
New Comments
No comments yet. Be the first one!