Skip to main content

Notifications

Community site session details

Community site session details

Session Id : FpfleOn8cuJoCngPMPTWzi
Power Automate - General Discussion
Answered

Key Value in Get a row?

Like (0) ShareShare
ReportReport
Posted on 12 Apr 2024 11:14:07 by

Hi,

I am trying to extract email addresses from an Excel sheet in order to send an email to that address. However I can't figure out what to enter in Key Value. The value changes every time a new row is added (from MS Forms). I keep getting the error: No row was found with Id (and then the value I enter).

 

Anyone has an idea to solve this?

 

Skærmbillede 2024-04-12 kl. 12.58.01.png

  • Garethterb1 Profile Picture
    131 on 12 Apr 2024 at 12:03:50
    Re: Key Value in Get a row?

    Ok, the reason that it creates a for each is that the result is an array with many rows. The way to stop this is to specify  which record you want to return by using an index number [0] eg 

    outputs('List_rows_present_in_a_table')?['body/value'][0]['email'] will return the first row and the value stored in column email. If your table is not always the same number of rows there are a few methods that you can use to set the index value but in your case if you are always targeting the last row you can use the last() function like this last(outputs('List_rows_present_in_a_table')?['body/value'])['email']
  • Verified answer
    v-mengmli-msft Profile Picture
    on 12 Apr 2024 at 11:56:29
    Re: Key Value in Get a row?

    Hi @MP-68 ,

     

    Please try this.

    Step1.Recreate the Send email action.

    Step2.Insert below expression in "To" field.

    last(outputs('List_rows_present_in_a_table')?['body/value'])?['EmailColumnName']

     

    ——————————————————————————————————————————————————

    If my answer helps you solve the problem, please accept it as a solution.

     

    Best regards,

    Rimmon

  • CU05080624-2 Profile Picture
    on 12 Apr 2024 at 11:47:21
    Re: Key Value in Get a row?

    Thank you - this works much better. 🙂  However, when I add the action "Send an email", PA automatically creates a "for each" loop - I only want the last row to be read - and only one email sent.

    Any ideas?

  • v-mengmli-msft Profile Picture
    on 12 Apr 2024 at 11:45:32
    Re: Key Value in Get a row?

    Hi @MP-68 ,

     

    "Get a row" is used to get specific row according to key value. If you want to send emails to each email address in Email column, you try "list rows present in a table". Then you can select Email column dynamic content in "To" field of "Send email action".

     

    Best regards,

    Rimmon

  • Garethterb1 Profile Picture
    131 on 12 Apr 2024 at 11:39:26
    Re: Key Value in Get a row?

    list rows present in a table

  • CU05080624-2 Profile Picture
    on 12 Apr 2024 at 11:38:22
    Re: Key Value in Get a row?

    This is what my flow looks like and the options I have.

    Skærmbillede 2024-04-12 kl. 13.32.28.png

  • Garethterb1 Profile Picture
    131 on 12 Apr 2024 at 11:26:19
    Re: Key Value in Get a row?

    Looks like you might want to rather use the Get rows action as this will return all the rows, for the connector that you are using you are targeting a specific row in your table where the key is the unique identifier.

     

  • v-mengmli-msft Profile Picture
    on 12 Apr 2024 at 11:23:34
    Re: Key Value in Get a row?

    Hi @MP-68 ,

     

    The key value should be a specific value in a column. The column has different values, so we take the column as key column.

    So, you should fill in an email address here to locate a row in the email address column based on this value.

     

    Best regards,

    Rimmon

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
ankit_singhal Profile Picture

ankit_singhal 5 Super User 2025 Season 1

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 4 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 2 Super User 2025 Season 1

Overall leaderboard