I have a document set in SharePoint, with a bunch of files and I have the workflow below that converts a selected file in the document set to PDF.

For a selected file
Get file properties
Get file content
Create file in OneDrive
Convert file
Create PDF file

This works for individual files in the document set folder. But I would also like it to be possible to select the document set and process all files in the document set the same way I did with a single file.

I wonder if it is possible to cover both scenarios in the same Power Automate flow.

If so, how can I determine if the flow was started from a file or from a document set?

Because if it was started from a document set I guess I may want to list the files to be processed and loop this list, and if it was started from a single file then this "list" would be a list with just one item.

  • 1
    Check if you can access the content type value from triggerOutputs. If not, you have may need to use REST API to get the content type based on the item ID you get from trigger outputs. Commented Oct 13, 2022 at 14:51
  • Yes, I can get 'Content type id' from my 'Get file properties'! I can use a switch clause to process the different content types in different ways. Great, thank you very much!
    – Gunilla
    Commented Oct 14, 2022 at 15:23

1 Answer 1


You can get the "Content Type" value from triggerOutputs of "For a selected file" trigger in Power automate.

Then you can use Switch or condition action in power automate to run separate branches in flow based on value of content type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.