Validate file input of manually triggered flow with trigger conditions

Posted by

The requirement is simple: the file input in the manual trigger should only accept PDF files. This is something that can’t be configured in the file input parameter itself, but trigger conditions come to the rescue here.

When a file is imported in the manually triggered flow, the file content and file name are part of the outputs of the trigger.

By adding a trigger condition in the Settings of the manual trigger, we are able to validate the input file based and the extension in the file name. In this case the file name should end with ‘.pdf’ to make sure only PDF files are accepted.

When we test / run the flow, the test / run will not start if the file is not a PDF file.

In this way we are able to validate the input in the manual trigger and this concept can be applied to all input types. The available expression functions make sophisticated validation possible. So no more need for a condition to check the input and cancel the flow run.

Leave a Reply

Your email address will not be published. Required fields are marked *