Database always returns "something went wrong" :-((

I am trying to get Google Integration to work with a google spreadsheet. It connects to it fine, but no matter what I do it always returns “something went wrong”. Anyone know what I’m doing wrong?

I have a simple home inventory spreadsheet, with a table with these columns:

“ItemID” - a random massive number
“Name” - text field name, always unique
“Descr_Simple” - text field
“Starnum” - a unique 5 digit number that I label items

In voiceflow: (1) I have a CAPTURE BLOCK, for a user to say a number, which I’m storing as a global variable {cur_itemcode}. (Which I’ve defined in the MODEL) (2) Then I have added a Google Sheets integration block. (3) Inside the Google Sheets integration block, I’ve set it to RETRIEVE DATA, then with my user email address and the spreadsheet, then under WITH SETTINGS I have put:

“STARNUM” = {cur_itemcode}

And then (4) under MAPPING OUTPUT I have:

“NAME” = {cur_itemname}
“DESCR_SIMPLE” = {cur_itemdescr}
“ROW NUMBER” = {cur_itemrownum}

Thanks for any help you can give me!!

Cheers

Toby

First of all, check if you can retrieve data from a key via “test integration”.

Then, you should check if cur_itemcode is captured correctly. I don’t know what slot type you define for capture block, but Alexa will ignore if what user says is not match with slot type, then cur_itemcode might not be what you expect.

1 Like

Thanks so much!

First of all, check if you can retrieve data from a key via “test integration”.

Sorry if I wasn’t clear - no, I can’t. That’s the problem. It always says “Something went wrong. Please check your request”

Then, you should check if cur_itemcode is captured correctly.
I don’t know what slot type you define for capture block,
but Alexa will ignore if what user says is not match with slot type,
then cur_itemcode might not be what you expect.

I have a CAPTURE block that captures a number from the user, and it doesn’t give me the options of Slots. Slots is just for CHOICE blocks, no? Anyway, I have CAPTURE block type set to “Number”, with Capture Input to “cur_itemcode”. My google sheet has the content type of the column I’m getting set to Number, so this should be correct, yes? I have also tried with CAPTURE block set to “Custom” and I get same problem.

I’m wondering if this is all a problem relating to data type mismatch? No mention of setting data types in any of the help articles or videos for Google Sheets and Voiceflow, and I can’t find a list of allowed expressions in Voiceflow. Perhaps there is some type of INTEG(X) function or something, to turn strings into numbers?

Anyway I’ll keep trying zz :slight_smile:

In the settings for the Google Sheets integration block, under “with settings”, if I change it so its STARNUM and then leave the equals to nothing, I get random results from the table. So I know the actual connection works. It’s purely a matching issue. When I do this inside WITH SETTINGS it fails every time:

STARNUM = {cur_itemcode}

Unfortunately, there’s no error explanation. But I’m guessing that, for whatever reason, when I have captured a number from the user and stored it inside {cur_itemcode}, it’s not in a format or data type that Alexa / Google Sheets likes. :frowning:

OK I’m getting closer to figuring it out. In testing the GOOGLE SHEETS integration block, it appears that if my Google Sheet data has words in it, and is set to plain text inside Google Sheet, I can then get a match inside the voiceflow integration block. But if my Google Sheet data has numbers in it, EVEN if its set to plain text inside Google Sheet, this creates some sort of data type problem - and voiceflow integration block is unable to have a match.

So, in order to pass a number as plain text to Google Sheets, the solution MUST be to put some kind of expression inside the integration block, to FORCE it to be text and not a number. Yes? So inside inside the “With Settings” section of the integration block, I must have to do something like this:

STARNUM = forcetext(11468)

Forcetext isn’t a real function - I have NO idea what the expression actually should be inside voiceflow. But it seems necessary, to force this to work.

I’m gonna keep trying! :frowning:

I’ve made a detailed video about this issue, trying to show the problem I’m having :-))

" BROKEN Voiceflow with Google Sheets integration - won’t search for numbers, only text works"