Hi everyone,
I’m having trouble figuring out how to properly create or update an Opportunity in HighLevel using N8n.
In Zapier, there’s a single action that allows you to “Create or Update Opportunity” in one step. However, in N8n, there’s no such combined node. So I’m not sure how to structure the workflow to manage this logic.
Here’s my current situation:
- When a WooCommerce order is placed, I already have a workflow that creates the contact in HighLevel. That part is working fine.
- But then, I need to either create a new opportunity or update an existing one, depending on whether there’s already an opportunity for that contact (or with specific criteria like pipeline or stage).
My questions:
- What’s the best way to check if an opportunity already exists for a contact to select the proper action?
- Based on that, how should I structure the workflow to either create or update accordingly?
Any help or examples would be highly appreciated. Thank you!
Maybe use Get man
and check if there is data inside first
You might need to check always output data
So you can continue the workflow even if nothing inside so you can create a new one.
1 Like
Hi,
n8n’s built-in HighLevel node doesn’t (yet) have the single “Create or Update Opportunity” action you see in Zapier, so the cleanest approach is to call the HighLevel API directly.
1 One-step option — Upsert endpoint
HighLevel exposes an “Upsert Opportunity” endpoint that does exactly what Zapier does: it looks for an existing opportunity that matches “contactId + pipelineId + stageId”, updates it if found, or creates a new one if not.
HTTP Request
POST
URL: https://services.leadconnectorhq.com/opportunities/upsert
Auth: your HighLevel OAuth 2 credential (scopes “contacts.write opportunities.write”)
Authorization: Bearer token
Body like this:
{ "contactId": "{{ $json['Contact'].id }}", "locationId": "YOUR_LOCATION_ID", "pipelineId": "YOUR_PIPELINE_ID", "stageId": "YOUR_STAGE_ID", "title": "Woo Order #{{ $json['Order'].number }}", "status": "open", "value": {{ $json['Order'].total }}, "source": "WooCommerce" }
That single call handles both “create” and “update”. See docs → Upsert Opportunity marketplace.gohighlevel.com
–
2 Two-step option — search → branch
If you prefer explicit logic:
-
HTTP Request (GET) → “/opportunities/search?contact_id={{contactId}}&locationId=…&pipelineId=…” to see if one exists.
-
IF node:
- True → HighLevel node Update Opportunity (or “PATCH /opportunities/{id}”)
- False → HighLevel node Create Opportunity (“POST /opportunities/”)
Minimal n8n flow:
WooCommerce Trigger → HighLevel → Create/Update Contact →
HTTP Request → Upsert Opportunity (option #1)
That’s all you need—shout if anything’s unclear or if you hit auth issues!
I’d be happy to help debug specific API response issues
1 Like
Hi @Bogdan1 that sounds like a solution! Would you be so kind to share the steps in n8n workflow? Thanks in advance brother!