Skip to content

Instantly share code, notes, and snippets.

@leoaiassistant
Last active November 4, 2020 11:25
Show Gist options
  • Save leoaiassistant/0910f3db4d11817dca6be97da2b8dd39 to your computer and use it in GitHub Desktop.
Save leoaiassistant/0910f3db4d11817dca6be97da2b8dd39 to your computer and use it in GitHub Desktop.
function getsheetData()
return axios.get (‘https://sheetdb.io/api/v1/xirgfp569xwov‘);
}
function welcome (agent) {
const name = agent.parameters.name;
return getSpreadsheetData().then(res => {
res.data.map(person => {
if (person.Name === name}
agent.add (‘Here are the details for ${name}. Age: $(person.Age), Email: $(person.Email)’);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment