# Automation via N8N

# n8n Workflow Configuration

#   


## Workflow Name

The ongoing synchronization workflow is:

```
HighLevel ↔ Constant Contact Ongoing Sync
```

## Main Nodes

### HighLevel → Constant Contact Path

```
GHL Contact Created Webhook
        ↓
Config - GHL to CC
        ↓
Normalize New GHL Contact
        ↓
Has Email + Explicit Consent?
        ↓
CC Confirmed Opt-In Signup
        ↓
Get CC Contact After Signup
        ↓
Update GHL with CC Status
```

Contacts that do not qualify go to:

```
Skipped - No Consent/Email
```

### Constant Contact → HighLevel Path

```
Every 15 Minutes
        ↓
Config - CC to GHL
        ↓
Get Poll Window
        ↓
Fetch Recently Updated CC Contacts
        ↓
Flatten Updated CC Contacts
        ↓
Loop CC Updates - 25
        ↓
Sync CC Status to GHL
        ↓
Return to CC Update Loop
```

After processing completes:

```
Mark Poll Successful
```

# Safe Testing Procedure

#   


Changes to the integration should be tested with controlled contacts before affecting the entire database.

## Recommended Test

Create a dedicated test contact in HighLevel.

Example:

```
First Name: Integration
Last Name: Test
Email: controlled test mailbox
```

Then verify:

1. HighLevel creates the contact.
2. The webhook reaches n8n.
3. n8n recognizes the email.
4. Constant Contact receives the contact.
5. The opt-in process behaves as expected.
6. The Constant Contact Contact ID appears in HighLevel.
7. Constant Contact Permission is populated.
8. Opt-in metadata is populated.
9. HighLevel DND behaves correctly.
10. Updating Constant Contact is reflected back in HighLevel.

## Unsubscribe Test

Using a controlled test account:

1. Unsubscribe the test contact in Constant Contact.
2. Wait for the reconciliation workflow.
3. Confirm HighLevel receives:

```
Constant Contact Permission = unsubscribed
```

4. Confirm HighLevel email DND becomes active.

# Security and Credential Management

#   


The integration depends on credentials for:

- HighLevel
- Constant Contact

These credentials must be treated as secrets.

## Never Store Secrets In

- BookStack
- screenshots
- Git repositories
- exported public workflow files
- support tickets
- chat messages
- documentation examples

## Recommended Storage

Constant Contact should use an n8n OAuth2 credential.

HighLevel should preferably also use a dedicated n8n credential or securely stored integration token.

If a credential is suspected of being exposed:

1. Revoke it.
2. Generate a replacement.
3. Update n8n.
4. Test the integration.
5. Review recent executions.

# Operating Rules

#   


The following rules define how this integration should be managed.

## Rule 1

HighLevel is the source of truth for ordinary CRM data.

## Rule 2

Constant Contact controls its email subscription state.

## Rule 3

Unsubscribed contacts must remain non-marketable unless they complete the appropriate resubscription process.

## Rule 4

A bounce should not automatically delete the entire CRM contact.

## Rule 5

Permanent email failures may result in HighLevel email DND and review.

## Rule 6

Temporary delivery failures should not automatically remove a contact.

## Rule 7

Constant Contact synchronization fields should not create update loops.

## Rule 8

Large imports should use batching.

Current batch size:

```
25
```

## Rule 9

Production changes should first be tested with a controlled contact.

## Rule 10

API credentials must never be included in BookStack documentation.