I am looking for a freelancer to help me optimize my current workflow. I have a basic setup running, but it fails randomly.
The Project:
I need to connect a Webhook from my landing page to HubSpot CRM. After the data is received, I want to use the OpenAI node to analyze the lead’s intent and draft a personalized email.
Requirements:
Strong experience with n8n self-hosted.
Familiarity with PostgreSQL for logging events.
Understanding of JSON data structures and Javascript in the Code Node.
Experience with error handling (try/catch blocks).
Current Issue:
My workflow works for simple text, but when the API response contains nested JSON arrays, the Split In Batches node breaks.
If you are interested, please send me a DM with your portfolio and hourly rate.
I am open for any remote opportunity such as part-time, full-time, project basis, being a co-founder for your automation agency, hourly basis and any opportunity…
hey @uNavy
I’ve been working with n8n (self-hosted) for a while now and have hands-on experience with HubSpot integrations, PostgreSQL event logging, and JavaScript in Code nodes.
This is a very familiar issue — I’ve handled it multiple times in self-hosted n8n setups.
I’m a Certified n8n Developer (Level 1 & 2) and have built production AI sales and CRM workflows with HubSpot, OpenAI, PostgreSQL logging, and custom Code Node (JavaScript) handling.
Regarding your current problem:
The Split In Batches node breaking on nested JSON arrays is a known pitfall. This should be handled by normalizing the payload first (Code Node / Item Lists), explicitly mapping arrays into flat iterable items, or restructuring the OpenAI response before batching. I also usually add guards to prevent malformed API responses from killing the run.
I can help you:
Stabilize the workflow
Add proper try/catch + fallback paths
Implement Postgres logging
Make the OpenAI output deterministic and safe for downstream nodes
Happy to share relevant examples and my hourly rate via DM.
You’re close — the random failures usually come from inconsistent payload shapes, not the OpenAI node itself. The safe fix is to normalize the nested arrays into a predictable list before Split In Batches, and to guard every “maybe-array” field with a fallback in a Code node.
Add a Code node right before Split In Batches to coerce the field into an array (or an empty array) and flatten nested arrays into a single list.
Wrap downstream nodes with explicit checks (length, undefined/null) and route “empty/invalid payload” to a logging + alert branch instead of letting the run crash.
Log every run to Postgres with a correlation id (webhook request id) + the normalized payload shape so you can replay failures deterministically.
Hi! I’m an n8n specialist with 3 years building production workflows - this is exactly what I do.
I’ve solved the exact issue you’re describing (Split In Batches with nested JSON) multiple times. It usually requires proper JSON parsing before the split node and handling array depth correctly.
Strong experience with:
n8n self-hosted (30+ production workflows)
PostgreSQL event logging
OpenAI node integration and error handling
JavaScript Code Node for complex data transformations
HubSpot CRM integrations
Production-grade error handling with try/catch and retry logic
I can debug your current workflow and implement a stable solution with proper error handling and logging.
Hi @Muhammad_Bin_Zohaib , I’d be happy to help optimize and fix your workflow. I have extensive experience with n8n and have worked on projects involving Webhooks, HubSpot CRM, and OpenAI integrations. I understand the issue with the Split In Batches node and can certainly help resolve the error with nested JSON arrays.
Please feel free to share more details, and I’ll be able to provide a solution tailored to your workflow.
Experienced n8n & AI Architect based in Toronto (EST)
Hi @uNavy, I specialize in building Production-Ready AI Ecosystems using n8n, ranging from secure RAG pipelines to Multi-Agent strategic systems.
I’ve built several “Headless AI” frameworks that decouple business logic from the UI. You can view my live project gallery and technical portfolio here: