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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

** Help Creating a Flow ** Excel to randomly select row of information on a recurring task

(0) ShareShare
ReportReport
Posted on by 157

Hi,

 

I'm trying to create a flow that will automatically send me a random row from excel (im learning Spanish and i want it to send me emails with a new quote or word to learn).

 

However, i've done several tests and it sends me the following:

 

[{"@odata.etag":"","ItemInternalId":"dc027368-f830-41da-8785-0a8b8f6d55a5","Idiom":"De punta en blanco","Literal Translation":"On white tip","Meaning":"Well dressed for a special occasion","English Counterpart":"Dressed to the nines, dressed to kill"}]

 

I don't know how to remove the quotations and also it has sent me the same email each time I tested it so it does not seem to send at random.

 

Flow:

sbruk89_1-1676739001001.png

 

compose expression - body('List_rows_present_in_a_table')?['value']

 

Any help would be greatly appreciated.

 

I have the same question (0)
  • Verified answer
    RobElliott Profile Picture
    10,280 Super User 2025 Season 2 on at
    Re: ** Help Creating a Flow ** Excel to randomly select row of information on a recurring task

    @sbruk89 you are not giving any instruction in the flow to bring back a random row from the spreadsheet. This is a flow we use at my company that displays details of a random member of staff every day on our intranet from a spreadsheet.

     

    0-Flow-Overall.png

     

    So after the List rows present in a table action (which in my case has almost 1000 staff so the Pagination and Threshold settings have been set) there is a compose action with the following expression to get a random item from the spreadsheet:

    body('List_rows_present_in_a_table')?['value'][rand(0,length(body('List_rows_present_in_a_table')?['value']))]

     

    1-Flow.png

     

    At this point save the flow and run it and in the flow result click the Compose action and copy everything from the outputs of the compose.

     

    2-Flow.png

     

    Next, edit the flow again and add a Parse JSON action. For the Content field select the outputs of the previous compose action from the dynamic content box.  Then click the Generate from sample button and paste in everything you copied.

     

    3-Flow.png

    This bit you won't need.  In my company the job title is preceded with a job number which I want to strip out so this is done as follows:

    4-Flow.png

     

    Finally you can select the data you need in the email from the Parse JSON section of the dynamic content box:

     

    5-Flow.png

     

    Run the flow several times as in the image below where I ran it 3 times, and each email will show a random row from the spreadsheet.

    6-Emails.png

     

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • sbruk89 Profile Picture
    157 on at
    Re: ** Help Creating a Flow ** Excel to randomly select row of information on a recurring task

    @RobElliott 

     

    You sir! are a true gent! thank you so much, that worked a treat. I hope one day once, I start getting my head down and learning Power Automate fully. To be as good as you!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 650 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 341 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard