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.

是的,這在 GHL API 中是正常的。422 通常表示缺少必需的字段或有效載荷格式錯誤。最好的解決方法是在發送到 GHL 之前在 n8n(Function/Set 節點)中清理/過濾數據,這樣只有現有的字段才會被傳遞。GHL 不會可靠地忽略空字段,所以預處理是正確的方法。