Random Variable in "Pulling random data from a google sheet"

I am a newbie learning this :slight_smile:
I am following this tutorial >> https://learn.voiceflow.com/en/articles/2505211-pulling-random-data-from-a-google-spreadsheet
In the “pulling random entries” random variable is introduced as a default variable! however, it seems not to be true! Can someone tell me how to define the random variable in this case? I want to fetch random data from the google sheet.
Best,
Hadis

You can use the Google Sheet Integration block and leave the Value to Match field empty to get a random entry.

Thank you Nico for your reply. It worked out :slight_smile: , sometimes the same data (same row from google sheet) is fetched repeatedly or even in succession though. Is there any way to pull random non-repeating data from google sheet?

Best,
Hadis

You will need to save the row number in two variables (the row and prevRow for example),
when you use the Google integration block to get a random row, save the row number to the row variable and use an IF block to check if row = prevRow. If you have a match it mean that you’ve got the same row so you may want to loop back to the integration block to get another row.
This will work for the last call but not for every calls during the session (for that you will have to store each grabbed row in an array and deal with the code block).