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 عادة يعني وجود حقول مطلوبة مفقودة أو تنسيق payload خاطئ. أفضل حل هو تنظيف/تصفية البيانات في n8n (دالة Function أو عقدة Set) قبل إرسالها إلى GHL بحيث يتم تمرير الحقول الموجودة فقط. GHL لن يتجاهل الحقول الفارغة بشكل موثوق، لذلك المعالجة المسبقة هي الطريقة الصحيحة.