Showing results for 
Search instead for 
Did you mean: 
Advocate III
Advocate III

How to: make certain Outputs non-required on Sharepoint 'For a selected item' trigger

Wanted to share an issue I recently ran into, and a quick fix. 


By default, all of the outputs you add to a SharePoint 'For a selected item' trigger are required, and there's no method to change the outputs to non-required via the UI. However, if you need a non-required output and you're willing to get into the json, you can change an output to non-required with the following steps:


  • Export your Flow
  • Edit the 'Definition.json' in the export zip package to remove the output fields you want to make non-required from the "required" property of the 'For a selected item' trigger 
  • Re-import the Flow package

This makes the fields optional when the end user triggers the Flow.


Just be aware that the 'For a selected item' trigger will not pass any fields that were left blank into the Flow. So, your Flow needs to check for the presence of a field in the trigger output (using a contains()) before attempting to manipulate the field contents.

Community Support
Community Support

Hi @StevenWade,


Thanks for sharing.

It seems that what you shared works perfectly.


Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks! Was just sharing here in case others had the same issue.

Thank you for this - was searching for this very thing and ran across your article.

Advocate I
Advocate I



I am able to alter the JSON file ok and that works great and I have 3 optional emails now in my flow. I understand what he means when he says "Just be aware that the 'For a selected item' trigger will not pass any fields that were left blank into the Flow." So how do I check that a field doesn't exist in the trigger output? In a condition I have tried:


@contains(triggerBody(), triggerBody()?['email'])


@contains(triggerBody()?['entity']?['value'], triggerBody()?['email'])


So bottom line I just need help with figuring out how to tell if the field (in this case email) object is missing from the "For a selected item" object


 Anyone have any ideas? Any help will be appreciated


Thank you

Got the correct syntax from @StevenWade


My expression was too complex I guess, the below worked for me.


@contains(triggerBody(), '[email]')


He also referenced another article that says this will work:


@contains(triggerBody(), 'email')


HTH - Cheers 🙂

Just be aware that you are looking for a literal text string within the trigger body -- @contains() is not JSON aware. That means you need to ensure some uniqueness within your variable names. In your 'email' example, @contains() would return TRUE if someone populated "email', 'email1', or 'email2'; or, if they just used the word 'email' in one of the text responses. Basing your conditional tests on generic variable names may generate errors or unexpected results.


This is a workable hack, and I've used it in several different scenarios. Just make sure you're using unique variable names.

Good advice ty 🙂

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,267)