When a file is modified Trigger in OneDrive For Business Connector.(Power Automate Cloud flows)

11/08/2023

Japanese version.

This trigger is fired when a file in a specified folder on OneDrive is modified.

This trigger retrieves the file contents of the modified file.

Fewer properties are retrieved than the "When a file is modified(properties only)" trigger, but in many cases "When file is modified" is sufficient.

If the following items are required, they must be completed in "Get file metadata".

  • File size
  • Last Modified
  • Last updated by

How to use

Click on "Create" then "Automated cloud flow".

Specify any name for "Flow name" and select "When a file is modified".

When both are specified, "Create" will change color and click on it.

Set parameters.

Parameters.

Folder

Specify the folder to be detected.

When selected, it looks like a folder path, but it is only a display and the substance is an ID.

If you delete the specified folder and then create a folder with the same name, it will be treated as a different folder.
In such a case, an error will occur that the folder does not exist, so it must be re-specified in the flow.

Include subfolders

  • No…Only the specified folders will be detected.
  • Yes…Folders below the specified folder will also be detected.

If not necessary, "No" is recommended.

Infer Content Type

The "File Content Types" section of the Dynamic Content section explains.

Dynamic contents

File content

File Content. Used for file creation and email attachments.

File identifier

Equivalent to the "ID" of the "When a file is modified(properties only)" trigger.

It can be used for an ID that specifies a file in the following actions.

It is also available in the "Get file content" action, but it makes no sense since the file contents have already been retrieved.

File name

Equivalent to the base64-encoded "Name" of the "When a file is modified(properties only)" trigger.

When processed with an expression, it becomes "Name without extension".

Use substringbase64ToString, and indexOf.

substring(base64ToString(triggerOutputs()?['headers/x-ms-file-name-encoded']), 0 ,indexOf( base64ToString(triggerOutputs()?['headers/x-ms-file-name-encoded']),'.' ) )

File path

Equivalent to the base64-encoded "Path" of the "When a file is modified(properties only)" trigger.

When processed with an expression, it becomes Folder Path.

Use substringbase64ToString, and lastIndexOf.

substring( base64ToString( triggerOutputs()?['headers/x-ms-file-path-encoded']), 0, lastIndexOf( base64ToString( triggerOutputs()?['headers/x-ms-file-path-encoded']) , '/' ) )

File entity tag

Equivalent to the "ETag" of the "When a file is modified(properties only)" trigger.

It will be used infrequently.

File content type

MIME type. It will be used infrequently.

Equivalent to the "Media type" of the "When a file is modified(properties only)" trigger.

If "Infer Content Type" is set to "No", it is fixed at "application/octet-stream".

If "Infer Content Type" is set to "Yes", it is guessed from the file.

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

OneDrive For Business Connector(Power Automate Cloud flows)