Last active
November 4, 2020 11:25
-
-
Save leoaiassistant/0910f3db4d11817dca6be97da2b8dd39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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