Google Contacts telling my postcode is a string when it is not

Describe the problem/error/question

I have a workflow that checks if a contact exists in google, if not it creates it… if it does then it updates it.
The Create step works fine but the update step, using exact same javascript errors saying the postcode is a string.
This is the expression in the postcode field: {{ parseInt($json.property_postcode, 10) }}

What is the error message (if any)?

Bad request - please check your parameters
Invalid value at ‘person.addresses.postal_code’ (TYPE_STRING), 3182

Please share your workflow

Share the output returned by the last node

no output, it just errors on the google update contact node

Information on your n8n setup

  • n8n version:1.63.4
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloudron
  • Operating system: ubuntu

Well I changed nothing and it just started working as expected today. I guess google just didn’t like me yesterday.

2 Likes

Not sure what went wrong here. But keep in mind that postcodes can be strings. (Depends on the country)
So google probably needs a string to cover all postcodes.

the error from the google node was explicitly stating it was not accepting it because it thought it was a string but it wanted a number. Unless I am misreading the error message.

Anyway it’s working now so unless it plays up again my capacity to keep looking into it has ran out lol

Thanks for your response.

1 Like

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