π€ Log missed EDI sales from Gmail CSVs into GoHighLevel with Slack error alerts
β‘ 2 views Β· π€ CRM & Sales Operations
Description
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.
π Nodes Used
HTTP Request, Slack, Gmail, Gmail Trigger, Extract from File
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File