Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

458
Visualizações
How do I redirect to a studio flow from inside a Twilio Function?

I have a serverless function that is executed when an user sends a message through whatsapp, if the user sends a fixed location, the function get it's latitude and longitude and returns an object on the callback with the location info. I want to make the function run and redirect to a studio flow that is integrated with flex through proxy so I can handle the user's location there and eventually send to a flex agent.

This is the function I have:

exports.handler = function(context, event, callback) {
  console.log("lat: ", event.Latitude);
  console.log("lon: ", event.Longitude);

  if (!event.Latitude || !event.Longitude) {
    callback(null, {
      lat: null,
      lon: null
    });
  } else {
    const location = {
      lat: event.Latitude,
      lon: event.Longitude
    };
    
    callback(null, location);
  }
};

I'm using WhatsApp Sandbox with the above function being called on "when a message comes in". After the function executes I want it to redirect to a Studio Flow (inside the function), is that possible? How can I do it? I'm a beginner dev and new to Twilio.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda