Log missed EDI sales from Gmail CSVs into GoHighLevel
Sales CSVs from Gmail logged in GoHighLevel.
Tools featured in this playbook
Quick overview
This workflow monitors Gmail for incoming EDI sales report emails, extracts a CSV attachment, and logs new “missed sales” line items into GoHighLevel (LeadConnector) custom objects while linking them to matching opportunities when possible, with Slack alerts on workflow errors.
How it works
Triggers on new Gmail messages matching your configured filters and downloads the email attachments.
Extracts rows from the attached CSV file and processes them in batches.
For each row, normalizes key fields (like PO number and SAP material code) and builds a unique key for deduplication.
Searches GoHighLevel (LeadConnector) for an existing missed sales custom object record matching the unique key and skips rows that already exist.
Creates a new GoHighLevel missed sales custom object record for any new row, including quantity, pricing, value, and rejection reason details.
Searches GoHighLevel opportunities by PO number and, if found, creates an association linking the new missed sales record to the opportunity.
When any workflow error occurs, posts an alert message to a specified Slack channel.
Setup
Connect your Gmail OAuth2 credentials and configure the Gmail Trigger filters so only the EDI report emails with CSV attachments are picked up.
Add a GoHighLevel (LeadConnector) Private Integration Token and replace
YOUR_GHL_API_TOKENplusYOUR_GHL_LOCATION_IDin all HTTP requests.Ensure a GoHighLevel custom object exists at
custom_objects.missed_saleswith fields matching the properties sent (for examplepo_number,sap_code,quantity, anditem_net_value).Set
YOUR_GHL_ASSOCIATION_IDto the association that links missed sales custom object records to opportunities in your GoHighLevel account.Connect Slack OAuth2 credentials and replace
YOUR_SLACK_CHANNEL_IDwith the channel that should receive workflow error alerts.
This article was originally posted on n8n
Comments
Login to leave a comment