Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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,

  • TimHNZ Profile Picture
    10 on at
    Re: Optional E-mail in Instant 'For a selected file' in OneDrive for Business

    Thanks Alice, worked perfectly! 

  • Verified answer
    v-alzhan-msft Profile Picture
    on at
    Re: Optional E-mail in Instant 'For a selected file' in OneDrive for Business

    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
    Re: Optional E-mail in Instant 'For a selected file' in OneDrive for Business

    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

  • TimHNZ Profile Picture
    10 on at
    Re: Optional E-mail in Instant 'For a selected file' in OneDrive for Business

    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.

  • v-alzhan-msft Profile Picture
    on at
    Re: Optional E-mail in Instant 'For a selected file' in OneDrive for Business

    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.

  • Mira Ghaly Profile Picture
    11,409 Super User 2025 Season 1 on at
    Re: Optional E-mail in Instant 'For a selected file' in OneDrive for Business

    @TimHNZ 

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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1