<aside>
Automatically add or update contacts in GoHighLevel (GHL) based on outreach results, upload relevant files to Google Drive, and notify the internal team via Slack.
Manually managing contact updates in GHL after outreach campaigns was time-consuming and error-prone. There was no streamlined system to sync contacts, upload data, and keep the team in the loop.
An automated n8n workflow that:
Webhook
Entry point that triggers the automation upon receiving a new outreach request via HTTP.
Check Website URL Exists
Verifies if the input includes a valid website URL to proceed.
Fetch Website HTML
Retrieves the raw HTML content of the website for further parsing.
HTML to JSON (HTML Extractor)
Converts the HTML code into structured data format.
Normalize Lead Data
Cleans and formats the lead's data (e.g., removing unwanted characters, standardizing casing).
Extract Root Domain
Parses and extracts the root domain.
Split Webpage Links
Extracts all hyperlinks.
Filter Internal Links
Filters out only the internal links that belong to the same root domain.
Remove Duplicated URLs
Removes duplicate URLs from the internal link list.
Check Valid URL
Checks if each internal URL is reachable.
Exclude Media File Extensions
Filters out non-HTML resources.
Request Valid Webpages
Sends HTTP GET requests to the valid internal URLs to retrieve their content.
Combine Page Contents
Merges all retrieved webpage contents into a single text blob for AI input.
Convert HTML to Markdown
Converts the merged HTML content into readable Markdown for GPT prompt clarity.
Generate Outreach Sequence (GPT)
Uses OpenAI to generate a custom outreach sequence based on website content and business profile.
Clean & Format Outreach
Parses and structures the GPT output to prepare it for team notification or CRM sync.
Switch: Add vs. Update in GHL
Conditional logic to determine whether the contact should be added as new or updated in GoHighLevel.
GHL โ Add Contact
Sends a POST request to add the contact to the GoHighLevel CRM.
Upload File (Drive)
Uploads GPT-generated outreach file or lead asset to Google Drive.
Send Slack Message (New Contact)
Notifies internal team via Slack about new contact creation and file upload.
Edit GHL Contact
Sends a request to update the contact in GHL if already present.
Send Slack Message (Existing Contact)
Notifies internal team that an existing contact was updated, not newly created.
contactId to avoid duplication.
๐ Download & Explore the Workflow
View GitHub Repository :