I’m probably being really dense here, but this thing is bugging me lol
First time posting and i’m a bit lost hah!
I’m trying to pick from a random row from a google sheets, not including header row (which has some text in one column and a related url in the next) , then output that to buffer, with line spacing so things are on seperate lines when they are posted to my social media account.
I know (well suspect) I have to use an array aggregator, shuffle function and tools but don’t know how. I’ve searched here but now even more confused about how to do this - Its realy a mind blank for me.
If it helps, this is what I’m trying to do broken down:
1 - Read a random row from a google sheet - Row has (text + url)
2 - Output the contents of that row, both columns to buffer, with a line break between the the text and the URL
Hey Chris,
I suggest add another column that says “posted” or something like this, to prevent duplicates.
Then have the Search Rows module return all rows that don’t have “posted” in them. Followed by an aggregator module. Then you can use first(shuffle()) on the newly created array of rows to get a random one. Post it and finally tag it as “posted” so it doesn’t get pulled again.
Hiya, duplicates don’t matter as it will only run once a day and its not an issue for repeats, in fact in some cases i want it to repeat
I just need to have it pick from a random row , like i said
So aggregate the search module then use first(shuffle() on the resulting array and you will get a random row.
I think it would be best to start with the Make academy in this case then.
You add the aggregator module after the Search module and set the source to the Search module. Then you add a set variables module after that and inside select the first() function and inside of that select the shuffle() function and inside of that map the array from the aggregator module.
1 Like
That was what i needed , ty, was able to figure out the rest i needed from there!