Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Getting a 'null' in my log when I try to create an array with user emails from a people column in a SharePoint List

(0) ShareShare
ReportReport
Posted on by 56

I have created a workflow that will use an email variable to send out notifications, but to get there - I have to be able to create my array and then filter out the emails from the user data. However I'm only getting "null" in my logs whenever I test out the process. 

I start by getting the items for my flow:

iramos85_0-1689187792910.png

 

then I initialize an array variable to hold my names:

iramos85_1-1689187884597.png

 

then I use an "Apply to Each" for the two columns that I'm getting data from (Directors and Responsible Persons) and union my varEmailNames and create an array of the aforementioned columns.

iramos85_2-1689188012858.png

 

and Finally I set my variable:

iramos85_3-1689188382700.png

 

and to check what I am outputting, i put it all into a new variable:

iramos85_4-1689188468074.png

 

Now after all of this, I run my test and I come up with:

 

Output Null (1 of 2)Output Null (1 of 2)

Output Null (2 of 2)Output Null (2 of 2)


I was actually following this article to pull in the addresses if anyone has had any experience with this sort of thing:
I was following along by this article by John Liu

Seemed pretty logical and easy, but then i kept getting "null", so i was stumped. Hopefully someone else sees what I'm missing!

 

 

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Getting a 'null' in my log when I try to create an array with user emails from a people column in a SharePoint List

    Sorry. I can't use this as sample data to provide a solution. If you have a sample JSON with some dummy data in it and a sample JSON of a desired output, I will try to help.

  • iramos85 Profile Picture
    56 on at
    Re: Getting a 'null' in my log when I try to create an array with user emails from a people column in a SharePoint List

    Sorry, so the sample input would be:

    iramos85_1-1689254615776.png

    these are user accounts that are added to a SharePoint list using a "Person or Group" column. 

    So the output, when i print to an email is the user accounts, which comes in as:

    iramos85_2-1689255035459.png

     

    that email field is what i'm trying to filter out, instead of getting the entire user data

     

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Getting a 'null' in my log when I try to create an array with user emails from a people column in a SharePoint List

    Again. Can you provide sample input and desired output?

  • iramos85 Profile Picture
    56 on at
    Re: Getting a 'null' in my log when I try to create an array with user emails from a people column in a SharePoint List

    I'm sorry, that would probably make this less confusing. This whole rigmarole is to accommodate the following:

    The workflow is designed to send notifications out at 15, 45 and 90 days based on dates entered in a column in a SharePoint list. The notification is an email that is sent out to users that are based out of two separate columns per entry. 

    iramos85_0-1689208604923.png

     

    So because of the first ask, I had to nest the flow into a "Apply to Each" condition:

    iramos85_2-1689210524571.png

    and both of the columns take multiple users, so PA automatically puts my email into another Apply for Each so I always get an error.

    So my goal was to extract the user emails from the people columns, place them into an array and then convert them into a string variable so I could use that as my email distributor. Hopefully all of that makes sense

     

     

     

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Getting a 'null' in my log when I try to create an array with user emails from a people column in a SharePoint List

    I don’t get what you want to do with all that variable and apply to each stuff. Wouldn’t a select action do what you need?

     

    Can you provide sample input and desired output?

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