I have manged to work out how to dynamically add data to the start and end points in Google Maps “Get directions” but I have yet to work out how to add waypoints. Each day at 7.00am I will send up to 19 Webhooks (or they can be a column in Google Sheets) which I then wish to be added as waypoints in Google maps and the best route chosen.
Is this even possible? or do I need a developer to work with Google maps directly
Hello @Jamie_Ferguson and welcome to the Make Community!
If you query the waypoints from your data source, you can use an iterator on them, then add an Array Aggregator, followed by Google Maps Get Directions. In the array aggregator, you will be able to select a Data Structure from the Google Maps module which should then allow you to input coordinates or addresses from your waypoint list.
Hope that makes sense and hope it helps!
Thanks for your response.
I’ll have a go at making that scenario, not sure i fully understand but will see what happens
So the Google Sheets module already outputs bundles so you don’t need an Iterator. The very basic structure would be Google Sheets —> Array Aggregator—> Google Maps Get Directions.
Unfortunately, I just tried this and it’s not working as expected. The Array Aggregator should have a Google Maps Waypoints option for the Data Structure once it’s connected to Google Maps, but it’s not working for me…
Hi @Jamie_Ferguson,
Finally got around to digging into this and for Waypoints you simply need to provide a list of waypoint separated by pipes. It’s not an array which is why it wasn’t showing up under the data structure options in the Array Aggregator.
Just enable Map and input text or a variable representing text that looks like this.
If you enter coordinates, they must be separated by a comma, no spaces.
Each set of coordinates should be separated by a pipe |.
If you enter addresses, separate them by a pipe as well, but keep in mind Google will need to geocode all of them which will cost slightly more.
Also, if you specify more than 10 waypoints, you will also be billed higher usage charge.
Reference: Getting directions through the Directions API | Google for Developers