Trying to create random generator call for Airtable base in Voiceflow


I’m using Airtable with Voiceflow to create a word definition generator voice app that will randomly select a word and it’s related definition and sentence usage from my Airtable base. (There are only 3 columns for each entry: verb, definition, and sentence.)

Voiceflow has a ‘Code’ block that is an empty vessel for whatever code should go in there to make the call to Airtable.

And so far have this in the Voiceflow “Code” block.

I’m only slightly familiar with Javascript, but know that’s not enough to make the call. So curious if anyone can point me to any information for calling a random line from the Airtable base. I haven’t found anything in the support content.

Grateful for any input on this.



Perhaps you forgot to include the code? There’s nothing there for an example.



Thanks, Justin.

Strange, but I can’t get the code to show. I’m selecting it, and then selecting the </> code option, but nothing shows when I post. It shows in the editing box.

Trying it again below in case it works in the comments.

<script type="text/javascript"> 
	var min=4; 
	var max=5; 
	var random = Math.random() * (+max - +min) + +min; 
	document.write("Random Number Generated : " + random );