export default defineComponent({
props: {
available: {type: "boolean"}
},
async run({ steps, $ }) {
await $.respond({
status: 200,
headers: {},
body: available ? 'Good!' : 'Too bad'
})
},
})
This is the final block in pipedream for returning http response. Here, I checked the availability of my calendar and has a boolean value prop for it. I want to make my vapi agent say different things based on the response body and hence the available boolean value.
Right now, when I call the checkAvailability function, the workflow succeeds and creates a valid available boolean value, but the vapi agent freezes. It just keeps on saying 'hold on a sec' even though the workflow ended.