Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unexpected Distance Result from Google Distance Matrix API in N8N Workflow

Hello Google Cloud Support Team,

We are using the Google Distance Matrix API as part of an automated N8N workflow to calculate driving distances from a single source location to a list of destination postal codes across France and Belgium. The goal is to identify the nearest destination based on driving distance.

Issue Description:
We observed unexpected results from the Matrix API. For the following request:

Source (origin): Zip Code 26000, France

Destination postal codes:

Shipping Postal Code Country
31100 France
39100 France
03700 France
06000 France
31330 France
94000 France
95800 France
68000 France
92200 France
13008 France
1780 Belgium
13400 France
65700 France
56000 France
75017 France
33600 France
92200 France
06400 France
83220 France
67000 France
64230 France
34170 France
06400 France
06100 France
95290 France
64150 France
34470 France
31100 France
67120 France
13006 France
20110 France
73170 France
35000 France
68000 France
92120 France
94240 France
31170 France
59780 France
83000 France
59520 France
44500 France
59710 France
44000 France
95350 France
7220 Belgium
60520 France
93600 France
13009 France
30100 France
78450 France
1050 Belgium
95870 France
92200 France
59780 France
64200 France
78000 France
21000 France
39000 France
06300 France
06200 France
38300 France
34560 France
31300 France
92400 France
38300 France
38300 France
59330 France
59520 France
06700 France
75003 France
69006 France
13100 France
33000 France
34000 France
77170 France
The API returned 7220, Belgium as the nearest destination, even though 69006, France (Lyon area) is geographically and practically much closer to the origin (26000, France).

Expected Behavior:
We expected the API to return 69006, France or other nearby French postal codes as the closest based on driving distance.

Actual Behavior:
The API returned 7220, Belgium as the nearest destination, which is significantly farther from the origin.

Environment Details:
API: Google Distance Matrix API

Platform: N8N workflow (uses HTTP request to Distance Matrix)

Mode: Driving

Units: Metric

Language: English

Region: Europe

Request for Support:
Could you please investigate why the Distance Matrix API may be returning a farther destination as the shortest route? Are there any known issues with routing across borders or specific postal code handling in France/Belgium?

If needed, we can provide the exact API request and response payloads for further analysis.

Thank you in advance for your assistance.

 

0 1 255
1 REPLY 1

Hi there! Thanks for posting in the Google Cloud community! 👋

This forum is mainly for discussions about Google Cloud Application Integration.

It looks like your question is about the Google Maps Platform's Distance Matrix API. You'll probably find the most helpful answers in the Google Maps Platform community spaces.

If you're interested in learning how Application Integration can help with your projects, we'd be happy to connect!