I want to calculated Travel Time between two locations based on start time based on current weather/traffic conditions in my google spreadsheet. The format is something like this:
Start Location End Location Start Time Estimated Travel Time
i am using Mapquest Api
=importXML("http://mapquestapi.com/directions/v1/route?key=APIKEY&outFormat=xml&from=" & A2 & "&to=" & B2,"//response/route/formattedTime")
but it is giving me an incorrect travel time and that travel time isn't live (based on my start time). Is there another way to achieve this?
Edit:
Distance Matrix API is something that I have come across, but don't know how to integrate in Google Spreadsheet. Is there a way I can use it there via Google Scripts?