Looking for a generic way to import contacts into Gohighlevel

I use a lead-mailing service which I use to trigger my flow using a webhook. However my leads are not always the same in terms of available data of the leads. Which results in the flow breaking wen there are fields missing that I want to import into Gohighlevel.

What I would like to do is build something more dynamically, so basically I want to have the highlevel node ignore fields that are missing so that it can still succesfully import and create the contact. I’m also curious if there is a “best practice” way of doing a thing like this. I myself was thinking about putting an node in between that adds these features, without any data in it. But I have no idea how to make this.

I get a 422 error code message wen I try to run the node. (Would be nice if someone can confirm that I classified my bug correctly.)

  • **Running n8n via cloud

Thanks

Hey @Liepiecie,

If HighLevel is expecting the fields to be set I would use a Set node before it to make sure I set an empty value if that is something it supports.

Oui, c’est normal avec l’API GHL. Le code 422 signifie généralement des champs obligatoires manquants ou un format de payload incorrect. La meilleure solution est de nettoyer/filtrer les données dans n8n (nœud Function/Set) avant de les envoyer à GHL pour que seuls les champs existants soient transmis. GHL n’ignore pas les champs vides de manière fiable, donc le prétraitement est la bonne approche.