web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Optional E-mail in Ins...
Power Automate
Answered

Optional E-mail in Instant 'For a selected file' in OneDrive for Business

(0) ShareShare
ReportReport
Posted on by 10

Hello,

 

Trying to create an approval flow for an Excel budget in OneDrive for Business. To run the approval a user inserts a PI (which is compulsory) and one or more HOD e-mails (which is optional).

 

For a Selected File.png

 

If a user has inserted an HOD e-mail(s) the approval process goes to them first and runs an 'everyone must approve' approval and then if they all approve goes to the PI. If they don't insert any HOD e-mails, it goes straight to the PI for approval.

 

So basically I want a condition which checks if there are any HOD e-mails. Have tried:

triggerbody()?['HODs'] is equal to null

triggerbody()?['HODs'] is equal to 0

length(triggerbody()?['HODs']) is greater than 0

 

plus several others, and I can't get any of them to work. 

 

I'm sure it's an easy thing to do!

 

Thanks,

Categories:
  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @TimHNZ 

    Is this a Manual flow? And the fields are Inputs to it?

  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @TimHNZ ,

     

    What is the type of the HOD column and the PI column? Are they person type column allow multiple selections?

     

    Best Regards,

    Alice

     

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

  • TimHNZ Profile Picture
    10 on at

    By Manual flow do you mean Instant? i.e. it's run by right clicking on a file in OneDrive and selecting the flow from the Automate menu.

     

    The fields come from the 'For a selected file' connector:

     

    Screen Shot 2020-08-10 at 8.19.38 PM.png

     

    PI is set to required, HODs set to optional. Both can accept multiple e-mails.

  • TimHNZ Profile Picture
    10 on at

    Not sure what you mean by columns? This isn't from a Sharepoint table.

     

    It's from the 'For a selected file' connector/trigger in OneDrive for business.

     

    Screen Shot 2020-08-10 at 8.19.38 PM.png

  • Verified answer
    v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @TimHNZ ,

     

    Please refer to screenshot below to create the flow:

    1.png

    empty(outputs('Compose'))

     

    Best Regards,

    Alice

     

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

  • TimHNZ Profile Picture
    10 on at

    Thanks Alice, worked perfectly! 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard