Why does HTTP Request return "ZERO_RESULTS" in n8n but not in the browser?

Information on your n8n setup

  • n8n version: 1.81.4
  • **Database (default: SQLite):**i collect Data from a Google sheets document
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):**i have no Idea.
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker locally on my pc
  • Operating system: Win11
  1. Hey Guys, I’m working with Grok and n8n to create basic workflows and I’m having issues with my current workflow. tried to find a solution for over 15 hours now. was hoping someone could help me. My n8n workflow (Google Sheets → Code → HTTP Request → Code → If) uses the Google Maps Geocoding API to get coordinates for addresses (e.g., “München, Deutschland”). The HTTP Request keeps returning “ZERO_RESULTS”. Code3 should encode the address (“München, Deutschland” → “M%C3%BCnchen%2C%20Deutschland”), but outputs “undefined%2C%20undefined”. The Code node shows lat/lon, but doesn’t match HTTP Request output (seems cached).

Attempts to Fix: Used static coordinates in Code3 (worked, but not dynamic). Switched to Google Maps API (https://maps.googleapis.com/maps/api/geocode/json?address={{ $json[“address”] }}&key=…). Added encodeURIComponent($input.first().json[“Ort”] + ", " + $input.first().json[“Land”]) in Code3. Reordered workflow to ensure HTTP Request runs before Code. Updated Code node to parse API response ($input.first().json.results[0].geometry.location.lat). Browser test (https://maps.googleapis.com/maps/api/geocode/json?address=München,%20Deutschland&key=…) returns “OK”, but not in n8n. Current Output: Code3: {“address”: “undefined%2C%20undefined”, …} HTTP Request: {“results”: , “status”: “ZERO_RESULTS”} Code: {“lat”: 48.1351253, “lon”: 11.5819806, “debug”: “Response status: OK”, …} (seems cached)

Why does HTTP Request return “ZERO_RESULTS” in n8n but not in the browser?

Is this a known bug? Or am I just doing something unintended?

Hey @Ws1

If the output of your code is “undefined%2C%20undefined”.
This indicates that during the execution your city and country are not properly resolved. Naturally you can’t find location results for ‘undefined, undefined’

You should check how you pass these to your code node and if they have values.

1 Like

thank you for your reply. That was not the issue. My output is still
2 items

:frowning:

[
  {
    "results": [],
    "status": "ZERO_RESULTS"
  },
  {
    "results": [],
    "status": "ZERO_RESULTS"
  }
]

Manually opening

[type or paste code here](https://maps.googleapis.com/maps/api/geocode/json?address=)

with filler values like “München,Deutschland” gets me results.

https://maps.googleapis.com/maps/api/geocode/json?address=München,deutschland&key=AIzaSyBOYgIYItdY6lAfg5_QAJn7b6ElZHZXIPk

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.