Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

232
Views
Dialogflow: setFollowupEvent not working inside 'then'

I made a chatbot which talks to an external API and calls another intent using the data provided by the API. The API provides the followup event's name. I have to make use of the inline editor only and not the webhook for certain reasons.

function setFollow(agent) {
  agent.add("hello"); 
  axios.post(url, body, {headers})
    .then (({ data }) => {
      agent.add("setting followup event");
      agent.setFollowupEvent({ "name": data.followupEventInput_name, "parameters" : { "name": data.name}});
    }) 
}

I am successfully calling the API and getting an appropriate response from it (the event name and the parameter value). The event and thus the next intent is still not being called. I even tried using hardcoded values to call the event but it did not work. The execution is going inside the then statement (checked with console logs) but the event is not being set (even with hardcoded values). What is the reason behind this and how can I solve it?

I have already checked the contexts: there are 2 active contexts (A and B) and the intent which should be called based on the event has 1 input context (A). Right now, no intent is being triggered.

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!