AppsScriptPulse

From Point A to Point B: How to Use Google Apps Script to calculate distance and time in Google Sheets

 

Imagine you’re responsible for transporting materials from one location to another for a logistics company. Accurately calculating the distance and time between two points is crucial for efficient logistics management, and having this information readily available can save time, money, and effort. However, doing it manually can seem like a daunting task. But don’t worry, there’s a solution!

Discover how to automate distance and time calculations between two points in Google Sheets using Google Apps Script. This blog provides a step-by-step guide on setting up the integration and shows you how to use it to save time and increase productivity.

Source: From Point A to Point B: How to Use Google Apps Script to Calculate Distance and Time in Google Sheets

Validate postal address with the new Google Maps Address Validation API and Google Apps Script

 

Validate addresses using Google Maps Address Validation and Apps Script. Discover onleeaddress the add-on for Google Workspace.

I missed the announcement in November 2022 that there is a new Google Maps Address Validation API. I also missed this post from Stéphane Giron showing how you can use the Address Validation API in Google Apps Script.

The concept is simple, you provide the Address Validation API with what you think is a correct address and the API returns information on each component of the address and additional metadata. Visit the source post for more details on setup and some example code.

Source: Validate postal address with the new Google Maps Address Validation API and Apps Script

See your Google Calendar events in Google Maps using Google Apps Script

Image credit: KEVIN VAGHASIYA

In this article, I will show you how can you visualize google calendar events in the google maps using Google Calendar, Maps Javascript API, HTML, CSS and Google Apps Script.

This is an interesting project shared by Kevin Vaghasiya which uses Google Apps Script to create a web app to display a range of Google Calendar events on a map. On the backend the script is using the Maps Service and geocode(address) to get the co-ordinates of the event location. This could be an interesting project to modify to send yourself a daily email with a static map image of your appointments.

Source: See your calendar events in Google Maps using Google Apps Script

Generating custom travel advice links for Nederlandse Spoorwegen using Google Apps Script

I would like to send clients a travel advice (url) but I don’t know how to do that with the Maps Service. Luckely the website of the ‘Nederlandse Spoorwegen’ offers a possibility to do what I want to do (with some Google Apps Script).

For our fans in the Netherlands a nice little snippet from Mariette Timmer that builds a custom url to use with the Nederlandse Spoorwegen travel advice site. To solve this Mariette uses the Google Maps geocoder to convert an address into lat/long for needed for Nederlandse Spoorwegen.

Source: Travel advice #GoogleAppsScript

Google Maps Formulas for Google Sheets – Digital Inspiration

You can bring the power of Google Maps to your Google Sheets using simple formulas with no coding. You don’t need to sign-up for the Google Maps API and all results from Google Maps are cached in the sheet so you are unlikely to hit any quota limits.

Great post from Amit Agarwal using the Maps Service for Google Sheets custom functions.

Use Google Maps formulas inside Google Sheets to calculate distances, travel time, get driving directions, look up postal codes with reverse geocoding and more!

The post includes all the source code and has some great examples using the V8 syntax.

Source: Google Maps Formulas for Google Sheets – Digital Inspiration

Build Local Links with Google Apps Scripting

Building up a solid link profile is a cornerstone of local SEO, but it can be a time consuming and tedious process. In this post I’ll show you how to automate this quickly and efficiently with Google Sheets.

This Google Sheets tool uses Apps Scripting to combine the Google Maps and Mozscape APIs into an all-in-one link finder. Type in a search term and a lat/long, and the tool will find the top Google maps results. Once we have those results, we can discover who is linking to them, and produce a “link intersect” report.

Source: Build Local Links with Google Apps Scripting

A Walk A Day Keeps The Doctor Away #GoogleAppsScript – plotting lat/long data on Google Maps

Nice little script snippet from Mariette Timmer which takes a .csv file with latitude/longitude points and plots them on a Google Map and sends the resulting image embedded in an email.

Source: A Walk A Day Keeps The Doctor Away #GoogleAppsScript

The classic Halloween dilemma: how to visit as many homes as possible solved by Eric Koleda with a little Apps Script