Create file in Google Drive Connector(Power Automate Cloud flows)

09/24/2023

Japanese version.

This action creates a file in any folder in Google Drive.

The files targeted by this action are not Google Drive specific files such as Google Docs.

but only downloadable file formats such as general text files, image files, Office files, etc.

How to use

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

Select "Create file" from the "Actions" menu.

Set parameters.

ParameterDefaultDescription
Folder pathRequired fieldSelect the file with the picker on the right directory icon.
It looks like a path, but it is only a display and the substance is an ID.
Therefore, even if you delete the specified folder and then create a new folder with the same name, it will be treated as a different folder. (Re-designation is required).
File nameRequired fieldSpecify the name of the file to be create.
File contentRequired fieldSpecifies the content of the file to be created.Specify the file content, either in fixed text or in other dynamic content.
- Fixed text.
- File content of other dynamic content.

If you specify all items and start the flow, the file will be created in the specified folder.

If a file with the same name already exists, an error will occur.

If there is a possibility of this, you can either check and delete the file in advance, Mix the timestamp of the dynamic content into the file name.

It is also possible to specify a fixed content for the file,
file content for other actions or triggers. (In that case, the action acts like a file copy)

For fixed strings, specify without quotes, such as ".

To specify file contents retrieved by other actions.

Specify the corresponding file content from "Dynamic content".

In the example below, an email attachment is saved.

Even across services such as OneDrive and GoogleDrive, as long as the file format is downloadable, it can be used in common.

Dynamic content

Typical items used in subsequent steps are as follows.

Additional information about the created file can be obtained.

NameTypeDescription
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.

Only additional information can be obtained.

If you need the file content, which is the content of the file, use the "Get file content using Id" action or "Get file content using path" 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.

Links

Google Drive Connector

Examples of Use

How to save the body of an email to a file.

How to save email attachments.