Reputation: 141
I'm testing the Assistant feature of using Webhooks and by some reason I don't receive any output. My Cloud-Function code looks so:
async function main(params) {
switch (params.action){
case 'bills':
var resp_final = [
{
value: 'Rechnung RN1074801326',
datum: '28.02.2021',
total_preis: '710€'
},
{
value: 'Rechnung RN8243559014',
datum: '01.03.2021',
total_preis: '130€'
}
];
return { elements: resp_final };
break;
//DEFAULT RETURN
default:
return {no: 'default'};
}
}
And I invoke it from the assistant like so:
As you can see, only [0].value gets printed to the console. Even if I don't specify any attribute there is still no result on the console. However, I tested the Cloud function with parameters and it's working (it shows the array without problems). Any reason why this might occurs?
Upvotes: 0
Views: 317