<aside>

Goal:

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.

Problem:

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.

Solution:

An automated n8n workflow that:


๐Ÿ”น Step 1:

Webhook

Entry point that triggers the automation upon receiving a new outreach request via HTTP.

๐Ÿ”น Step 2:

Check Website URL Exists

Verifies if the input includes a valid website URL to proceed.

๐Ÿ”น Step 3:

Fetch Website HTML

Retrieves the raw HTML content of the website for further parsing.

๐Ÿ”น Step 4:

HTML to JSON (HTML Extractor)

Converts the HTML code into structured data format.

๐Ÿ”น Step 5:

Normalize Lead Data

Cleans and formats the lead's data (e.g., removing unwanted characters, standardizing casing).

๐Ÿ”น Step 6:

Extract Root Domain

Parses and extracts the root domain.

๐Ÿ”น Step 7:

Split Webpage Links

Extracts all hyperlinks.

๐Ÿ”น Step 8:

Filter Internal Links

Filters out only the internal links that belong to the same root domain.

๐Ÿ”น Step 9:

Remove Duplicated URLs

Removes duplicate URLs from the internal link list.

๐Ÿ”น Step 10:

Check Valid URL

Checks if each internal URL is reachable.

๐Ÿ”น Step 11:

Exclude Media File Extensions

Filters out non-HTML resources.

๐Ÿ”น Step 12:

Request Valid Webpages

Sends HTTP GET requests to the valid internal URLs to retrieve their content.

๐Ÿ”น Step 13:

Combine Page Contents

Merges all retrieved webpage contents into a single text blob for AI input.

๐Ÿ”น Step 14:

Convert HTML to Markdown

Converts the merged HTML content into readable Markdown for GPT prompt clarity.

๐Ÿ”น Step 15:

Generate Outreach Sequence (GPT)

Uses OpenAI to generate a custom outreach sequence based on website content and business profile.

๐Ÿ”น Step 16:

Clean & Format Outreach

Parses and structures the GPT output to prepare it for team notification or CRM sync.

๐Ÿ”น Step 17:

Switch: Add vs. Update in GHL

Conditional logic to determine whether the contact should be added as new or updated in GoHighLevel.

๐Ÿ”น Step 18:

GHL โ€“ Add Contact

Sends a POST request to add the contact to the GoHighLevel CRM.

๐Ÿ”น Step 19:

Upload File (Drive)

Uploads GPT-generated outreach file or lead asset to Google Drive.

๐Ÿ”น Step 20:

Send Slack Message (New Contact)

Notifies internal team via Slack about new contact creation and file upload.

๐Ÿ”น Step 21:

Edit GHL Contact

Sends a request to update the contact in GHL if already present.

๐Ÿ”น Step 22:

Send Slack Message (Existing Contact)

Notifies internal team that an existing contact was updated, not newly created.


Tools Used:

Impact:

๐Ÿง Learnings:

Screenshot 2025-07-14 181334.png

๐Ÿ“‚ Download & Explore the Workflow

View GitHub Repository :

GHL-Auto-Contact-Sync-Team-Notification/GHL Auto Contact Sync + Team Notification.json at main ยท AlvLeoAI/GHL-Auto-Contact-Sync-Team-Notification