Today, I was asked about triggering a flow only when a document set is created.

I started by enabling Document sets on my site. (note that this is a site collection feature that you need to enable)

Then I created my flow that triggers on the creation or modification of a file. And I’m initialising a variable with the content type Id of the document set that was added:

Most of the hard work has now been done. I could now add a condition that checks for the Content type Id to start with 0x0120520.

But this means that my flow will kick off and I would end it immediately. This is a waste of my number of flow runs. So I would pay for these flows to run even though I don’t want them to run.

It would be nice if triggers could handle filters like in the Get Files action where a Filter Query can be configured.