I've searched the documentation of Twilio Studio and I haven't found any information about sending Interactive Messages or receiving latitude and longitude from Location Messages. In case of the latter I have found unofficial mentions of location information not being supported in Twilio Studio.
Are interactive messages and location information currently supported in Twilio Studio? If not, are there plans of implementing support for them? Is there a current workaround, specially about obtaining the location information?
Many thanks.
What workarounds I've tried
In the case of the location info:
I've tried running calling a Twilio Function in Studio that receives a location and echoes the coordinates in a reply. The Function connected to the Whatsapp Sandbox by itself works, but when it's called inside the Twilio Flow doesn't.
I assume that the Function cannot access the event parameters when it's called from a Studio Flow.
exports.handler = function(context, event, callback) {
let twiml = new Twilio.twiml.MessagingResponse();
if (!event.Latitude || !event.Longitude) {
twiml.message("Send a location.");
callback(null, twiml);
} else {
const location = {
lat: event.Latitude,
lon: event.Longitude
};
twiml.message(
`${location.lat}, ${location.lon}`
);
callback(null, twiml);
}
};
(The code was originally taken from this tutorial.)
EDIT:
This is quite embarrassing, but I figured how to access the Latitude annd Longitude info.
Simply access the following Liquid variable
{{widgets.send_and_reply_1.inbound.Longitude}}
{{widgets.send_and_reply_1.inbound.Latitude}}
(Change the send_and_reply by the name of the correct node.)