Quick overview
This workflow receives GoHighLevel Purchase Order update webhooks, calculates a delivery status and amount variance from the record’s dates, billing status, and amounts, writes the results back to the Purchase Order custom object, and sends a finance email alert when the variance is positive.
How it works
- Receives a POST webhook from GoHighLevel when a Purchase Order custom object record is updated.
- Extracts the Purchase Order record ID plus delivery confirmation date, put-away date, financial billing status, PO amount, and bill invoice amount from the webhook payload.
- Calculates the delivery status based on which dates are present and whether the financial billing status is set to
authorised, and calculates the amount variance from the PO and bill amounts.
- Updates the GoHighLevel Purchase Order custom object record with the calculated
delivery_status and amount_variance values via the LeadConnector API.
- If the amount variance is greater than 0, sends an email message to the finance address via the GoHighLevel Conversations API including the PO ID, PO amount, bill amount, and variance.
Setup
- In GoHighLevel, configure your automation/workflow to POST Purchase Order updates to this n8n webhook URL.
- Replace
YOUR_GHL_API_TOKEN with a GoHighLevel Private Integration Token in both HTTP request steps.
- Replace
YOUR_GHL_LOCATION_ID in the Purchase Order update request body with your GoHighLevel location ID.
- Update the finance recipient details in the notification request (for example, replace
[email protected] with your real finance email address).