So, as I said I need to to do the following in a messenger bot using Chatfuel.
I know how to do the first two steps but I struggle from the third.
My question is How to do the last three steps using any of Python, JSON or Chatfuel integrations.
I had searched for any source to learn something that helps me but I only ended up watched 10+ videos about chatfuel, google spreedsheets, APIs & JSON. And nothing led me to an answer, I even tried to ask in a programming facebook group but no answer also.
This script will search for the parameter in row one and return the value in the same column from row 2.
function searchFirstTwoRows(s)
{
var s = (typeof(s) != 'undefined')?s:'';
var rngA = SpreadsheetApp.getActiveSheet().getDataRange().getValues();
var r = '';
if(s)
{
for(var i=0;i<rngA[0].length;i++)
{
if(rngA[0][i]==s)
{
r=(rngA[1][i] != 'undefined')?rngA[1][i]:'';
break;
}
}
}
return r;
}
Dealing with Messenger and Chatfuel is up to you.