{"updatedAt": "2026-04-11T20:15:02.226Z", "createdAt": "2026-04-10T00:09:40.388Z", "id": "21cXlP5tZ1WF3PIq", "name": "EN \u2014 Client Onboarding \u2192 GHL", "description": null, "active": true, "isArchived": false, "nodes": [{"parameters": {"httpMethod": "POST", "path": "en-onboard", "responseMode": "responseNode", "options": {"allowedOrigins": "*"}}, "id": "a1b2c3d4-0001-0001-0001-000000000001", "name": "Onboarding Webhook", "type": "n8n-nodes-base.webhook", "typeVersion": 2, "position": [240, 300], "webhookId": "en-onboard"}, {"parameters": {"method": "POST", "url": "https://services.leadconnectorhq.com/contacts/upsert", "sendHeaders": true, "headerParameters": {"parameters": [{"name": "Authorization", "value": "Bearer pit-0947beb9-c594-4e74-865e-6b3ad8b562ef"}, {"name": "Version", "value": "2021-07-28"}, {"name": "Content-Type", "value": "application/json"}]}, "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify({\n  locationId: '0e0axgfXYSsM0J690HlY',\n  firstName: $json.body.first_name || '',\n  lastName:  $json.body.last_name  || '',\n  email:     $json.body.email      || undefined,\n  phone:     $json.body.phone      || undefined,\n  companyName: $json.body.biz_name || '',\n  website:   $json.body.website    || '',\n  source:    'Onboarding Form',\n  tags: [\n    'onboarded', 'new-client',\n    ...($json.body.audience_type\n      ? ['client-type:' + ($json.body.audience_type === 'consumer' ? 'creator' : $json.body.audience_type)]\n      : []),\n    ...($json.body.platforms\n      ? $json.body.platforms.split(', ').filter(Boolean).map(p => 'platform:' + p.toLowerCase().replace(/[^a-z0-9]+/g, '-'))\n      : []),\n    ...($json.body.tone\n      ? $json.body.tone.split(', ').filter(Boolean).map(t => 'tone:' + t.toLowerCase().replace(/[^a-z0-9]+/g, '-'))\n      : [])\n  ],\n  customFields: [\n    { key: 'contact.client_type',         field_value: $json.body.audience_type === 'consumer' ? 'creator' : ($json.body.audience_type || '') },\n    { key: 'contact.niche',               field_value: $json.body.niche || '' },\n    { key: 'contact.tagline',             field_value: $json.body.tagline || '' },\n    { key: 'contact.tone',                field_value: $json.body.tone || '' },\n    { key: 'contact.mood_anchor',         field_value: $json.body.mood_anchor || '' },\n    { key: 'contact.website_platform',    field_value: $json.body.website_platform || '' },\n    { key: 'contact.current_crm',         field_value: $json.body.current_crm || '' },\n    { key: 'contact.brand_color_primary', field_value: (() => { try { return JSON.parse($json.body.brand_colors || '{}').primary || ''; } catch(e) { return ''; } })() },\n    { key: 'contact.brand_color_secondary', field_value: (() => { try { return JSON.parse($json.body.brand_colors || '{}').secondary || ''; } catch(e) { return ''; } })() },\n    { key: 'contact.instagram_handle',    field_value: $json.body.ig || '' },\n    { key: 'contact.tiktok_handle',       field_value: $json.body.tt || '' },\n    { key: 'contact.facebook_handle',     field_value: $json.body.fb || '' },\n    { key: 'contact.youtube_handle',      field_value: $json.body.yt || '' },\n    { key: 'contact.linkedin_handle',     field_value: $json.body.li || '' },\n    { key: 'contact.threads_handle',      field_value: $json.body.th || '' },\n    { key: 'contact.pinterest_handle',    field_value: $json.body.pi || '' },\n    { key: 'contact.google_business_profile', field_value: $json.body.gb || '' },\n    { key: 'contact.service_area',        field_value: $json.body.service_area || '' },\n    { key: 'contact.domain_registrar',    field_value: $json.body.domain_registrar || '' },\n    { key: 'contact.product_1_name',      field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[0]?.name||''; } catch(e){return '';} })() },\n    { key: 'contact.product_1_description', field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[0]?.description||''; } catch(e){return '';} })() },\n    { key: 'contact.product_1_price',     field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[0]?.price||''; } catch(e){return '';} })() },\n    { key: 'contact.product_2_name',      field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[1]?.name||''; } catch(e){return '';} })() },\n    { key: 'contact.product_2_description', field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[1]?.description||''; } catch(e){return '';} })() },\n    { key: 'contact.product_2_price',     field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[1]?.price||''; } catch(e){return '';} })() },\n    { key: 'contact.product_3_name',      field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[2]?.name||''; } catch(e){return '';} })() },\n    { key: 'contact.product_3_description', field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[2]?.description||''; } catch(e){return '';} })() },\n    { key: 'contact.product_3_price',     field_value: (() => { try { const s=JSON.parse($json.body.services||'[]'); return s[2]?.price||''; } catch(e){return '';} })() },\n    { key: 'contact.analytics_setup',     field_value: $json.body.analytics || '' },\n    { key: 'contact.ga_measurement_id',   field_value: $json.body.ga4_measurement_id || '' },\n    { key: 'contact.meta_pixel_id',       field_value: $json.body.meta_pixel_id || '' },\n    { key: 'contact.gtm_container_id',    field_value: $json.body.gtm_container_id || '' },\n    { key: 'contact.facebook_page_id',    field_value: $json.body.fb_page_id || '' },\n    { key: 'contact.ad_accounts',         field_value: $json.body.ad_accounts || '' },\n    { key: 'contact.revenue_tracking',    field_value: $json.body.revenue_tracking || '' },\n    { key: 'contact.competitor_1_name',   field_value: (() => { try { const c=JSON.parse($json.body.competitors||'[]'); return c[0]||''; } catch(e){return '';} })() },\n    { key: 'contact.competitor_2_name',   field_value: (() => { try { const c=JSON.parse($json.body.competitors||'[]'); return c[1]||''; } catch(e){return '';} })() },\n    { key: 'contact.competitor_3_name',   field_value: (() => { try { const c=JSON.parse($json.body.competitors||'[]'); return c[2]||''; } catch(e){return '';} })() },\n  ].filter(f => f.field_value)\n}) }}", "options": {}}, "id": "a1b2c3d4-0002-0002-0002-000000000002", "name": "GHL \u2014 Upsert Contact", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [500, 160]}, {"parameters": {"method": "POST", "url": "=https://services.leadconnectorhq.com/contacts/{{ $json.contact.id }}/notes", "sendHeaders": true, "headerParameters": {"parameters": [{"name": "Authorization", "value": "Bearer pit-0947beb9-c594-4e74-865e-6b3ad8b562ef"}, {"name": "Version", "value": "2021-07-28"}, {"name": "Content-Type", "value": "application/json"}]}, "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify({\n  body: [\n    '\ud83d\udccb ONBOARDING FORM \u2014 ' + new Date($('Onboarding Webhook').item.json.body.submitted_at).toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' }),\n    '',\n    'BUSINESS',\n    'Company: '     + ($('Onboarding Webhook').item.json.body.biz_name    || '\u2014'),\n    'Niche: '       + ($('Onboarding Webhook').item.json.body.niche        || '\u2014'),\n    'Tagline: '     + ($('Onboarding Webhook').item.json.body.tagline      || '\u2014'),\n    'Website: '     + ($('Onboarding Webhook').item.json.body.website      || '\u2014'),\n    'Client Type: ' + ($('Onboarding Webhook').item.json.body.audience_type === 'consumer' ? 'creator' : ($('Onboarding Webhook').item.json.body.audience_type || '\u2014')),\n    '',\n    'SOCIAL HANDLES',\n    ...[\n      $('Onboarding Webhook').item.json.body.ig ? 'Instagram: '        + $('Onboarding Webhook').item.json.body.ig : null,\n      $('Onboarding Webhook').item.json.body.fb ? 'Facebook: '         + $('Onboarding Webhook').item.json.body.fb : null,\n      $('Onboarding Webhook').item.json.body.tt ? 'TikTok: '           + $('Onboarding Webhook').item.json.body.tt : null,\n      $('Onboarding Webhook').item.json.body.yt ? 'YouTube: '          + $('Onboarding Webhook').item.json.body.yt : null,\n      $('Onboarding Webhook').item.json.body.li ? 'LinkedIn: '         + $('Onboarding Webhook').item.json.body.li : null,\n      $('Onboarding Webhook').item.json.body.th ? 'Threads: '          + $('Onboarding Webhook').item.json.body.th : null,\n      $('Onboarding Webhook').item.json.body.pi ? 'Pinterest: '        + $('Onboarding Webhook').item.json.body.pi : null,\n      $('Onboarding Webhook').item.json.body.gb ? 'Google Business: '  + $('Onboarding Webhook').item.json.body.gb : null,\n    ].filter(Boolean),\n    '',\n    'BRAND',\n    'Tone: '         + ($('Onboarding Webhook').item.json.body.tone         || '\u2014'),\n    'Mood Anchor: '  + ($('Onboarding Webhook').item.json.body.mood_anchor  || '\u2014'),\n    'Avoid: '        + ($('Onboarding Webhook').item.json.body.avoid        || '\u2014'),\n    'Inspiration: '  + ($('Onboarding Webhook').item.json.body.inspo        || '\u2014'),\n    'Content Format: ' + ($('Onboarding Webhook').item.json.body.content_format || '\u2014'),\n    'Visual Feel \u2014 Light/Dark: '   + ($('Onboarding Webhook').item.json.body.visual_feel_light   || '\u2014'),\n    'Visual Feel \u2014 Minimal/Dense: ' + ($('Onboarding Webhook').item.json.body.visual_feel_minimal || '\u2014'),\n    'Visual Feel \u2014 Warm/Formal: '  + ($('Onboarding Webhook').item.json.body.visual_feel_warm    || '\u2014'),\n    (() => { try { const c = JSON.parse($('Onboarding Webhook').item.json.body.brand_colors || '{}'); return 'Brand Colors: Primary ' + (c.primary||'\u2014') + ' / Secondary ' + (c.secondary||'\u2014'); } catch(e) { return 'Brand Colors: \u2014'; } })(),\n    '',\n    'BRAND ASSETS',\n    (() => { try { const files = JSON.parse($('Onboarding Webhook').item.json.body.brand_files || '[]'); return files.length > 0 ? 'Files uploaded: ' + files.map(f=>f.name).join(', ') + ' [base64 in brand_files field]' : 'No files uploaded'; } catch(e) { return 'brand_files parse error'; } })(),\n    '',\n    'TECH STACK',\n    'Website Platform: ' + ($('Onboarding Webhook').item.json.body.website_platform  || '\u2014'),\n    'Domain Registrar: ' + ($('Onboarding Webhook').item.json.body.domain_registrar  || '\u2014'),\n    'Current CRM: '      + ($('Onboarding Webhook').item.json.body.current_crm       || '\u2014'),\n    'Analytics: '        + ($('Onboarding Webhook').item.json.body.analytics         || '\u2014'),\n    'Ad Accounts: '      + ($('Onboarding Webhook').item.json.body.ad_accounts       || '\u2014'),\n    'Tech Notes: '       + ($('Onboarding Webhook').item.json.body.tech_notes        || '\u2014'),\n    '',\n    'GOALS',\n    'Primary Goal: '      + ($('Onboarding Webhook').item.json.body.primary_goal     || '\u2014'),\n    'Revenue Tracking: '  + ($('Onboarding Webhook').item.json.body.revenue_tracking || '\u2014'),\n    '',\n    'CONTENT PREFERENCES',\n    'Platforms: '    + ($('Onboarding Webhook').item.json.body.platforms       || '\u2014'),\n    'Kickoff Notes: ' + ($('Onboarding Webhook').item.json.body.notes          || '\u2014'),\n    '',\n    'SERVICES & PRODUCTS',\n    (() => { try { const s=JSON.parse($('Onboarding Webhook').item.json.body.services||'[]'); return s.length>0 ? s.map((p,i)=>(i+1)+'. '+p.name+(p.price?' ('+p.price+')':'')+(p.description?' \u2014 '+p.description:'')).join('\\n') : 'None provided'; } catch(e){return 'None provided';} })(),\n    '',\n    'POSITIONING INPUTS',\n    'Service Area: '       + ($('Onboarding Webhook').item.json.body.service_area    || '\u2014'),\n    'Unfair Advantage: '   + ($('Onboarding Webhook').item.json.body.unfair_advantage || '\u2014'),\n    'Testimonials: '       + ($('Onboarding Webhook').item.json.body.testimonials     || '\u2014'),\n    'Format Preference: '  + ($('Onboarding Webhook').item.json.body.format_preference || '\u2014'),\n    '',\n    'COMPETITORS',\n    (() => { try { const c=JSON.parse($('Onboarding Webhook').item.json.body.competitors||'[]'); return c.filter(Boolean).length>0 ? c.filter(Boolean).map((n,i)=>(i+1)+'. '+n).join('\\n') : 'None provided'; } catch(e){return 'None provided';} })(),\n    '',\n    'PLATFORM STATUS',\n    ...(() => {\n      const wb = $('Onboarding Webhook').item.json.body;\n      const connected = (wb.platforms_connected||'').split(', ').filter(Boolean);\n      const skipped   = wb.oauth_skipped === 'yes';\n      const handles   = {instagram:wb.ig,facebook:wb.fb,tiktok:wb.tt,youtube:wb.yt,linkedin:wb.li,threads:wb.th,pinterest:wb.pi,google:wb.gb};\n      const names     = {instagram:'Instagram',facebook:'Facebook',tiktok:'TikTok',youtube:'YouTube',linkedin:'LinkedIn',threads:'Threads',pinterest:'Pinterest',google:'Google Business'};\n      const lines = [];\n      connected.forEach(k => { const h=handles[k]; lines.push('\u2713 '+(names[k]||k)+(h?' \u00b7 @'+h.replace('@',''):'')+'  \u2014  OAuth connected'); });\n      Object.keys(handles).filter(k=>handles[k]&&!connected.includes(k)).forEach(k => {\n        lines.push('\u25cb '+(names[k]||k)+' \u00b7 @'+handles[k].replace('@','')+'  \u2014  '+(skipped?'connect on call':'not yet connected'));\n      });\n      return lines.length ? lines : ['No platforms connected'];\n    })()\n    ].join('\\n')\n}) }}", "options": {}}, "id": "a1b2c3d4-0003-0003-0003-000000000003", "name": "GHL \u2014 Create Note", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [760, 160]}, {"parameters": {"operation": "append", "documentId": {"__rl": true, "value": "1FX0eDt9d322XYcOQRp8b9tXkRrrrHcSWJ9maXEwYk7k", "mode": "id"}, "sheetName": {"__rl": true, "value": "gid=0", "mode": "id"}, "columns": {"mappingMode": "defineBelow", "value": {"Business Name": "={{ $('Onboarding Webhook').item.json.body.biz_name }}", "Status": "pending", "Submitted At": "={{ $('Onboarding Webhook').item.json.body.submitted_at }}", "GHL Contact ID": "={{ $('GHL \u2014 Upsert Contact').item.json.contact.id }}", "Brand Color Primary": "={{ (() => { try { return JSON.parse($('Onboarding Webhook').item.json.body.brand_colors || '{}').primary || ''; } catch(e) { return ''; } })() }}", "Brand Color Secondary": "={{ (() => { try { return JSON.parse($('Onboarding Webhook').item.json.body.brand_colors || '{}').secondary || ''; } catch(e) { return ''; } })() }}", "Brand Files": "={{ $('Onboarding Webhook').item.json.body.brand_files || '[]' }}"}}, "options": {}}, "id": "a1b2c3d4-0008-0008-0008-000000000008", "name": "Sheets \u2014 Add to Onboarding Queue", "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.5, "position": [1020, 300], "credentials": {"googleSheetsOAuth2Api": {"id": "OhjizsinSISmx4Gl", "name": "Google Sheets OAuth2 API"}}}, {"parameters": {"sendTo": "bfolsom@emersonnorth.com", "subject": "=New Onboarding Submission \u2014 {{ $('Onboarding Webhook').item.json.body.biz_name || $('Onboarding Webhook').item.json.body.first_name + ' ' + $('Onboarding Webhook').item.json.body.last_name }}", "message": "={{ `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n<title>New Onboarding Submission</title>\n</head>\n<body style=\"margin:0;padding:0;background:#0a0a0a;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;\">\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#0a0a0a;padding:40px 20px;\">\n    <tr><td align=\"center\">\n      <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:600px;width:100%;\">\n        <tr>\n          <td style=\"padding-bottom:32px;border-bottom:1px solid #1e1e1e;\">\n            <p style=\"margin:0;font-size:13px;letter-spacing:0.15em;text-transform:uppercase;color:#666;\">Emerson North</p>\n            <h1 style=\"margin:12px 0 0;font-size:26px;font-weight:600;color:#f5f5f5;letter-spacing:-0.02em;\">New Onboarding Submission</h1>\n          </td>\n        </tr>\n        <tr>\n          <td style=\"padding:28px 0 0;\">\n            <p style=\"margin:0 0 4px;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#555;\">Client</p>\n            <p style=\"margin:0;font-size:20px;font-weight:600;color:#f5f5f5;\">${$('Onboarding Webhook').item.json.body.first_name} ${$('Onboarding Webhook').item.json.body.last_name}</p>\n            <p style=\"margin:4px 0 0;font-size:14px;color:#888;\">${$('Onboarding Webhook').item.json.body.biz_name || '\u2014'} ${ $('Onboarding Webhook').item.json.body.niche ? '\u00b7 ' + $('Onboarding Webhook').item.json.body.niche : '' }</p>\n            <p style=\"margin:4px 0 0;font-size:12px;color:#666;\">Client Type: ${$('Onboarding Webhook').item.json.body.audience_type === 'consumer' ? 'creator' : ($('Onboarding Webhook').item.json.body.audience_type || '\u2014')}</p>\n          </td>\n        </tr>\n        <tr>\n          <td style=\"padding:20px 0 0;\">\n            <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n              <tr>\n                <td style=\"padding-right:16px;\">\n                  <p style=\"margin:0 0 2px;font-size:11px;letter-spacing:0.1em;text-transform:uppercase;color:#555;\">Email</p>\n                  <p style=\"margin:0;font-size:14px;color:#c8c8c8;\">${$('Onboarding Webhook').item.json.body.email || '\u2014'}</p>\n                </td>\n                <td>\n                  <p style=\"margin:0 0 2px;font-size:11px;letter-spacing:0.1em;text-transform:uppercase;color:#555;\">Phone</p>\n                  <p style=\"margin:0;font-size:14px;color:#c8c8c8;\">${$('Onboarding Webhook').item.json.body.phone || '\u2014'}</p>\n                </td>\n              </tr>\n            </table>\n          </td>\n        </tr>\n        <tr><td style=\"padding:24px 0;\"><div style=\"border-top:1px solid #1e1e1e;\"></div></td></tr>\n        <tr>\n          <td style=\"padding-bottom:20px;\">\n            <p style=\"margin:0 0 10px;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#555;\">Platforms</p>\n            <p style=\"margin:0;font-size:14px;color:#c8c8c8;line-height:1.6;\">${$('Onboarding Webhook').item.json.body.platforms || '\u2014'}</p>\n          </td>\n        </tr>\n        <tr>\n          <td style=\"padding-bottom:20px;\">\n            <p style=\"margin:0 0 10px;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#555;\">Primary Goal</p>\n            <p style=\"margin:0;font-size:14px;color:#c8c8c8;\">${$('Onboarding Webhook').item.json.body.primary_goal || '\u2014'}</p>\n          </td>\n        </tr>\n        <tr>\n          <td style=\"padding-bottom:20px;\">\n            <p style=\"margin:0 0 10px;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#555;\">Running automatically</p>\n            <p style=\"margin:0;font-size:14px;color:#4ade80;\">\u2713 Added to Onboarding Queue \u2014 Mac Mini will process within 2 minutes</p>\n          </td>\n        </tr>\n        <tr><td style=\"padding:24px 0 0;\"><div style=\"border-top:1px solid #1e1e1e;\"></div></td></tr>\n        <tr>\n          <td style=\"padding-top:24px;\">\n            <p style=\"margin:0;font-size:12px;color:#444;\">Emerson North \u00b7 Automated Notification</p>\n          </td>\n        </tr>\n      </table>\n    </td></tr>\n  </table>\n</body>\n</html>` }}", "options": {"allowUnauthorizedCerts": false, "appendAttribution": false}}, "id": "a1b2c3d4-0007-0007-0007-000000000007", "name": "Gmail \u2014 Notify Bryce", "type": "n8n-nodes-base.gmail", "typeVersion": 2.1, "position": [1280, 160], "credentials": {"gmailOAuth2": {"id": "g9I6fVtERQ0B0Eed", "name": "Gmail account"}}}, {"parameters": {"respondWith": "json", "responseBody": "={{ JSON.stringify({ ok: true, contactId: $('GHL \u2014 Upsert Contact').item.json.contact.id }) }}", "options": {}}, "id": "a1b2c3d4-0004-0004-0004-000000000004", "name": "Respond 200", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1.1, "position": [1540, 160]}, {"parameters": {"conditions": {"options": {"caseSensitive": true, "leftValue": "", "typeValidation": "strict"}, "conditions": [{"id": "oauth-check", "leftValue": "={{ $json.body.platforms_connected }}", "rightValue": "", "operator": {"type": "string", "operation": "notEquals"}}], "combinator": "and"}, "options": {}}, "id": "a1b2c3d4-0005-0005-0005-000000000005", "name": "Has OAuth Connections?", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [500, 460]}, {"parameters": {"operation": "append", "documentId": {"__rl": true, "value": "1RNQssJwYfCZyc6ZdQsftqy4UqsdhLb2v5svqVikEXoI", "mode": "id"}, "sheetName": {"__rl": true, "value": "gid=0", "mode": "id"}, "columns": {"mappingMode": "defineBelow", "value": {"Date Submitted": "={{ $('Onboarding Webhook').item.json.body.submitted_at }}", "Business Name": "={{ $('Onboarding Webhook').item.json.body.biz_name }}", "First Name": "={{ $('Onboarding Webhook').item.json.body.first_name }}", "Last Name": "={{ $('Onboarding Webhook').item.json.body.last_name }}", "Email": "={{ $('Onboarding Webhook').item.json.body.email }}", "Platforms Selected": "={{ $('Onboarding Webhook').item.json.body.platforms }}", "Platforms Connected (OAuth)": "={{ $('Onboarding Webhook').item.json.body.platforms_connected }}", "OAuth Skipped": "={{ $('Onboarding Webhook').item.json.body.oauth_skipped }}"}}, "options": {}}, "id": "a1b2c3d4-0006-0006-0006-000000000006", "name": "Sheets \u2014 Log OAuth Connections", "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.5, "position": [760, 460], "credentials": {"googleSheetsOAuth2Api": {"id": "OhjizsinSISmx4Gl", "name": "Google Sheets OAuth2 API"}}}], "connections": {"Onboarding Webhook": {"main": [[{"node": "GHL \u2014 Upsert Contact", "type": "main", "index": 0}, {"node": "Has OAuth Connections?", "type": "main", "index": 0}]]}, "GHL \u2014 Upsert Contact": {"main": [[{"node": "GHL \u2014 Create Note", "type": "main", "index": 0}]]}, "GHL \u2014 Create Note": {"main": [[{"node": "Sheets \u2014 Add to Onboarding Queue", "type": "main", "index": 0}, {"node": "Gmail \u2014 Notify Bryce", "type": "main", "index": 0}]]}, "Sheets \u2014 Add to Onboarding Queue": {"main": [[{"node": "Respond 200", "type": "main", "index": 0}]]}, "Gmail \u2014 Notify Bryce": {"main": [[{"node": "Respond 200", "type": "main", "index": 0}]]}, "Has OAuth Connections?": {"main": [[{"node": "Sheets \u2014 Log OAuth Connections", "type": "main", "index": 0}], []]}}, "settings": {"executionOrder": "v1", "callerPolicy": "workflowsFromSameOwner", "availableInMCP": false}, "staticData": null, "meta": null, "pinData": null, "versionId": "9b177ea9-f6bb-4071-a8e9-cdd86f373969", "activeVersionId": "9b177ea9-f6bb-4071-a8e9-cdd86f373969", "versionCounter": 27, "triggerCount": 1, "shared": [{"updatedAt": "2026-04-10T00:09:40.391Z", "createdAt": "2026-04-10T00:09:40.391Z", "role": "workflow:owner", "workflowId": "21cXlP5tZ1WF3PIq", "projectId": "91dLj8Hg37i136qG", "project": {"updatedAt": "2026-03-22T06:53:28.112Z", "createdAt": "2026-02-12T18:32:53.056Z", "id": "91dLj8Hg37i136qG", "name": "Bryce Folsom <bfolsom@emersonnorth.com>", "type": "personal", "icon": null, "description": null, "creatorId": "17d3676f-3e74-4586-8363-5c1f4d237ed7"}}], "tags": [], "activeVersion": {"updatedAt": "2026-04-11T20:15:02.227Z", "createdAt": "2026-04-11T20:15:02.227Z", "versionId": "9b177ea9-f6bb-4071-a8e9-cdd86f373969", "workflowId": "21cXlP5tZ1WF3PIq", "nodes": [{"parameters": {"httpMethod": "POST", "path": "en-onboard", "responseMode": "responseNode", "options": {"allowedOrigins": "*"}}, "id": "a1b2c3d4-0001-0001-0001-000000000001", "name": "Onboarding Webhook", "type": "n8n-nodes-base.webhook", "typeVersion": 2, "position": [240, 300], "webhookId": "en-onboard"}, {"parameters": {"method": "POST", "url": "https://services.leadconnectorhq.com/contacts/upsert", "sendHeaders": true, "headerParameters": {"parameters": [{"name": "Authorization", "value": "Bearer pit-0947beb9-c594-4e74-865e-6b3ad8b562ef"}, {"name": "Version", "value": "2021-07-28"}, {"name": "Content-Type", "value": "application/json"}]}, "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify({\n  locationId: '0e0axgfXYSsM0J690HlY',\n  firstName: $json.body.first_name || '',\n  lastName:  $json.body.last_name  || '',\n  email:     $json.body.email      || undefined,\n  phone:     $json.body.phone      || undefined,\n  companyName: $json.body.biz_name || '',\n  website:   $json.body.website    || '',\n  source:    'Onboarding Form',\n  tags: [\n    'onboarded', 'new-client',\n    ...($json.body.audience_type\n      ? ['client-type:' + ($json.body.audience_type === 'consumer' ? 'creator' : $json.body.audience_type)]\n      : []),\n    ...($json.body.platforms\n      ? $json.body.platforms.split(', ').filter(Boolean).map(p => 'platform:' + p.toLowerCase().replace(/[^a-z0-9]+/g, '-'))\n      : []),\n    ...($json.body.tone\n      ? $json.body.tone.split(', ').filter(Boolean).map(t => 'tone:' + t.toLowerCase().replace(/[^a-z0-9]+/g, '-'))\n      : [])\n  ],\n  customFields: [\n    { key: 'contact.client_type',         field_value: $json.body.audience_type === 'consumer' ? 'creator' : ($json.body.audience_type || '') },\n    { key: 'contact.niche',               field_value: $json.body.niche || '' },\n    { key: 'contact.tagline',             field_value: $json.body.tagline || '' },\n    { key: 'contact.tone',                field_value: $json.body.tone || '' },\n    { key: 'contact.mood_anchor',         field_value: $json.body.mood_anchor || '' },\n    { key: 'contact.website_platform',    field_value: $json.body.website_platform || '' },\n    { key: 'contact.current_crm',         field_value: $json.body.current_crm || '' },\n    { key: 'contact.brand_color_primary', field_value: (() => { try { return JSON.parse($json.body.brand_colors || '{}').primary || ''; } catch(e) { return ''; } })() },\n    { key: 'contact.brand_color_secondary', field_value: (() => { try { return JSON.parse($json.body.brand_colors || '{}').secondary || ''; } catch(e) { return ''; } })() },\n    { key: 'contact.instagram_handle',    field_value: $json.body.ig || '' },\n    { key: 'contact.tiktok_handle',       field_value: $json.body.tt || '' },\n    { key: 'contact.facebook_handle',     field_value: $json.body.fb || '' },\n    { key: 'contact.youtube_handle',      field_value: $json.body.yt || '' },\n    { key: 'contact.linkedin_handle',     field_value: $json.body.li || '' },\n    { key: 'contact.threads_handle',      field_value: $json.body.th || '' },\n    { key: 'contact.pinterest_handle',    field_value: $json.body.pi || '' },\n    { key: 'contact.google_business_profile', field_value: $json.body.gb || '' }\n  ].filter(f => f.field_value)\n}) }}", "options": {}}, "id": "a1b2c3d4-0002-0002-0002-000000000002", "name": "GHL \u2014 Upsert Contact", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [500, 160]}, {"parameters": {"method": "POST", "url": "=https://services.leadconnectorhq.com/contacts/{{ $json.contact.id }}/notes", "sendHeaders": true, "headerParameters": {"parameters": [{"name": "Authorization", "value": "Bearer pit-0947beb9-c594-4e74-865e-6b3ad8b562ef"}, {"name": "Version", "value": "2021-07-28"}, {"name": "Content-Type", "value": "application/json"}]}, "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify({\n  body: [\n    '\ud83d\udccb ONBOARDING FORM \u2014 ' + new Date($('Onboarding Webhook').item.json.body.submitted_at).toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' }),\n    '',\n    'BUSINESS',\n    'Company: '     + ($('Onboarding Webhook').item.json.body.biz_name    || '\u2014'),\n    'Niche: '       + ($('Onboarding Webhook').item.json.body.niche        || '\u2014'),\n    'Tagline: '     + ($('Onboarding Webhook').item.json.body.tagline      || '\u2014'),\n    'Website: '     + ($('Onboarding Webhook').item.json.body.website      || '\u2014'),\n    'Client Type: ' + ($('Onboarding Webhook').item.json.body.audience_type === 'consumer' ? 'creator' : ($('Onboarding Webhook').item.json.body.audience_type || '\u2014')),\n    '',\n    'SOCIAL HANDLES',\n    ...[\n      $('Onboarding Webhook').item.json.body.ig ? 'Instagram: '        + $('Onboarding Webhook').item.json.body.ig : null,\n      $('Onboarding Webhook').item.json.body.fb ? 'Facebook: '         + $('Onboarding Webhook').item.json.body.fb : null,\n      $('Onboarding Webhook').item.json.body.tt ? 'TikTok: '           + $('Onboarding Webhook').item.json.body.tt : null,\n      $('Onboarding Webhook').item.json.body.yt ? 'YouTube: '          + $('Onboarding Webhook').item.json.body.yt : null,\n      $('Onboarding Webhook').item.json.body.li ? 'LinkedIn: '         + $('Onboarding Webhook').item.json.body.li : null,\n      $('Onboarding Webhook').item.json.body.th ? 'Threads: '          + $('Onboarding Webhook').item.json.body.th : null,\n      $('Onboarding Webhook').item.json.body.pi ? 'Pinterest: '        + $('Onboarding Webhook').item.json.body.pi : null,\n      $('Onboarding Webhook').item.json.body.gb ? 'Google Business: '  + $('Onboarding Webhook').item.json.body.gb : null,\n    ].filter(Boolean),\n    '',\n    'BRAND',\n    'Tone: '         + ($('Onboarding Webhook').item.json.body.tone         || '\u2014'),\n    'Mood Anchor: '  + ($('Onboarding Webhook').item.json.body.mood_anchor  || '\u2014'),\n    'Avoid: '        + ($('Onboarding Webhook').item.json.body.avoid        || '\u2014'),\n    'Inspiration: '  + ($('Onboarding Webhook').item.json.body.inspo        || '\u2014'),\n    'Content Format: ' + ($('Onboarding Webhook').item.json.body.content_format || '\u2014'),\n    'Visual Feel \u2014 Light/Dark: '   + ($('Onboarding Webhook').item.json.body.visual_feel_light   || '\u2014'),\n    'Visual Feel \u2014 Minimal/Dense: ' + ($('Onboarding Webhook').item.json.body.visual_feel_minimal || '\u2014'),\n    'Visual Feel \u2014 Warm/Formal: '  + ($('Onboarding Webhook').item.json.body.visual_feel_warm    || '\u2014'),\n    (() => { try { const c = JSON.parse($('Onboarding Webhook').item.json.body.brand_colors || '{}'); return 'Brand Colors: Primary ' + (c.primary||'\u2014') + ' / Secondary ' + (c.secondary||'\u2014'); } catch(e) { return 'Brand Colors: \u2014'; } })(),\n    '',\n    'BRAND ASSETS',\n    (() => { try { const files = JSON.parse($('Onboarding Webhook').item.json.body.brand_files || '[]'); return files.length > 0 ? 'Files uploaded: ' + files.map(f=>f.name).join(', ') + ' [base64 in brand_files field]' : 'No files uploaded'; } catch(e) { return 'brand_files parse error'; } })(),\n    '',\n    'TECH STACK',\n    'Website Platform: ' + ($('Onboarding Webhook').item.json.body.website_platform  || '\u2014'),\n    'Domain Registrar: ' + ($('Onboarding Webhook').item.json.body.domain_registrar  || '\u2014'),\n    'Current CRM: '      + ($('Onboarding Webhook').item.json.body.current_crm       || '\u2014'),\n    'Analytics: '        + ($('Onboarding Webhook').item.json.body.analytics         || '\u2014'),\n    'Ad Accounts: '      + ($('Onboarding Webhook').item.json.body.ad_accounts       || '\u2014'),\n    'Tech Notes: '       + ($('Onboarding Webhook').item.json.body.tech_notes        || '\u2014'),\n    '',\n    'GOALS',\n    'Primary Goal: '      + ($('Onboarding Webhook').item.json.body.primary_goal     || '\u2014'),\n    'Revenue Tracking: '  + ($('Onboarding Webhook').item.json.body.revenue_tracking || '\u2014'),\n    '',\n    'CONTENT PREFERENCES',\n    'Platforms: '    + ($('Onboarding Webhook').item.json.body.platforms       || '\u2014'),\n    'Kickoff Notes: ' + ($('Onboarding Webhook').item.json.body.notes          || '\u2014'),\n    '',\n    'PLATFORM STATUS',\n    ...(() => {\n      const wb = $('Onboarding Webhook').item.json.body;\n      const connected = (wb.platforms_connected||'').split(', ').filter(Boolean);\n      const skipped   = wb.oauth_skipped === 'yes';\n      const handles   = {instagram:wb.ig,facebook:wb.fb,tiktok:wb.tt,youtube:wb.yt,linkedin:wb.li,threads:wb.th,pinterest:wb.pi,google:wb.gb};\n      const names     = {instagram:'Instagram',facebook:'Facebook',tiktok:'TikTok',youtube:'YouTube',linkedin:'LinkedIn',threads:'Threads',pinterest:'Pinterest',google:'Google Business'};\n      const lines = [];\n      connected.forEach(k => { const h=handles[k]; lines.push('\u2713 '+(names[k]||k)+(h?' \u00b7 @'+h.replace('@',''):'')+'  \u2014  OAuth connected'); });\n      Object.keys(handles).filter(k=>handles[k]&&!connected.includes(k)).forEach(k => {\n        lines.push('\u25cb '+(names[k]||k)+' \u00b7 @'+handles[k].replace('@','')+'  \u2014  '+(skipped?'connect on call':'not yet connected'));\n      });\n      return lines.length ? lines : ['No platforms connected'];\n    })()\n    ].join('\\n')\n}) }}", "options": {}}, "id": "a1b2c3d4-0003-0003-0003-000000000003", "name": "GHL \u2014 Create Note", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [760, 160]}, {"parameters": {"operation": "append", "documentId": {"__rl": true, "value": "1FX0eDt9d322XYcOQRp8b9tXkRrrrHcSWJ9maXEwYk7k", "mode": "id"}, "sheetName": {"__rl": true, "value": "gid=0", "mode": "id"}, "columns": {"mappingMode": "defineBelow", "value": {"Business Name": "={{ $('Onboarding Webhook').item.json.body.biz_name }}", "Status": "pending", "Submitted At": "={{ $('Onboarding Webhook').item.json.body.submitted_at }}", "GHL Contact ID": "={{ $('GHL \u2014 Upsert Contact').item.json.contact.id }}", "Brand Color Primary": "={{ (() => { try { return JSON.parse($('Onboarding Webhook').item.json.body.brand_colors || '{}').primary || ''; } catch(e) { return ''; } })() }}", "Brand Color Secondary": "={{ (() => { try { return JSON.parse($('Onboarding Webhook').item.json.body.brand_colors || '{}').secondary || ''; } catch(e) { return ''; } })() }}", "Brand Files": "={{ $('Onboarding Webhook').item.json.body.brand_files || '[]' }}"}}, "options": {}}, "id": "a1b2c3d4-0008-0008-0008-000000000008", "name": "Sheets \u2014 Add to Onboarding Queue", "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.5, "position": [1020, 300], "credentials": {"googleSheetsOAuth2Api": {"id": "OhjizsinSISmx4Gl", "name": "Google Sheets OAuth2 API"}}}, {"parameters": {"sendTo": "bfolsom@emersonnorth.com", "subject": "=New Onboarding Submission \u2014 {{ $('Onboarding Webhook').item.json.body.biz_name || $('Onboarding Webhook').item.json.body.first_name + ' ' + $('Onboarding Webhook').item.json.body.last_name }}", "message": "={{ `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n<title>New Onboarding Submission</title>\n</head>\n<body style=\"margin:0;padding:0;background:#0a0a0a;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;\">\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#0a0a0a;padding:40px 20px;\">\n    <tr><td align=\"center\">\n      <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:600px;width:100%;\">\n        <tr>\n          <td style=\"padding-bottom:32px;border-bottom:1px solid #1e1e1e;\">\n            <p style=\"margin:0;font-size:13px;letter-spacing:0.15em;text-transform:uppercase;color:#666;\">Emerson North</p>\n            <h1 style=\"margin:12px 0 0;font-size:26px;font-weight:600;color:#f5f5f5;letter-spacing:-0.02em;\">New Onboarding Submission</h1>\n          </td>\n        </tr>\n        <tr>\n          <td style=\"padding:28px 0 0;\">\n            <p style=\"margin:0 0 4px;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#555;\">Client</p>\n            <p style=\"margin:0;font-size:20px;font-weight:600;color:#f5f5f5;\">${$('Onboarding Webhook').item.json.body.first_name} ${$('Onboarding Webhook').item.json.body.last_name}</p>\n            <p style=\"margin:4px 0 0;font-size:14px;color:#888;\">${$('Onboarding Webhook').item.json.body.biz_name || '\u2014'} ${ $('Onboarding Webhook').item.json.body.niche ? '\u00b7 ' + $('Onboarding Webhook').item.json.body.niche : '' }</p>\n            <p style=\"margin:4px 0 0;font-size:12px;color:#666;\">Client Type: ${$('Onboarding Webhook').item.json.body.audience_type === 'consumer' ? 'creator' : ($('Onboarding Webhook').item.json.body.audience_type || '\u2014')}</p>\n          </td>\n        </tr>\n        <tr>\n          <td style=\"padding:20px 0 0;\">\n            <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n              <tr>\n                <td style=\"padding-right:16px;\">\n                  <p style=\"margin:0 0 2px;font-size:11px;letter-spacing:0.1em;text-transform:uppercase;color:#555;\">Email</p>\n                  <p style=\"margin:0;font-size:14px;color:#c8c8c8;\">${$('Onboarding Webhook').item.json.body.email || '\u2014'}</p>\n                </td>\n                <td>\n                  <p style=\"margin:0 0 2px;font-size:11px;letter-spacing:0.1em;text-transform:uppercase;color:#555;\">Phone</p>\n                  <p style=\"margin:0;font-size:14px;color:#c8c8c8;\">${$('Onboarding Webhook').item.json.body.phone || '\u2014'}</p>\n                </td>\n              </tr>\n            </table>\n          </td>\n        </tr>\n        <tr><td style=\"padding:24px 0;\"><div style=\"border-top:1px solid #1e1e1e;\"></div></td></tr>\n        <tr>\n          <td style=\"padding-bottom:20px;\">\n            <p style=\"margin:0 0 10px;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#555;\">Platforms</p>\n            <p style=\"margin:0;font-size:14px;color:#c8c8c8;line-height:1.6;\">${$('Onboarding Webhook').item.json.body.platforms || '\u2014'}</p>\n          </td>\n        </tr>\n        <tr>\n          <td style=\"padding-bottom:20px;\">\n            <p style=\"margin:0 0 10px;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#555;\">Primary Goal</p>\n            <p style=\"margin:0;font-size:14px;color:#c8c8c8;\">${$('Onboarding Webhook').item.json.body.primary_goal || '\u2014'}</p>\n          </td>\n        </tr>\n        <tr>\n          <td style=\"padding-bottom:20px;\">\n            <p style=\"margin:0 0 10px;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#555;\">Running automatically</p>\n            <p style=\"margin:0;font-size:14px;color:#4ade80;\">\u2713 Added to Onboarding Queue \u2014 Mac Mini will process within 2 minutes</p>\n          </td>\n        </tr>\n        <tr><td style=\"padding:24px 0 0;\"><div style=\"border-top:1px solid #1e1e1e;\"></div></td></tr>\n        <tr>\n          <td style=\"padding-top:24px;\">\n            <p style=\"margin:0;font-size:12px;color:#444;\">Emerson North \u00b7 Automated Notification</p>\n          </td>\n        </tr>\n      </table>\n    </td></tr>\n  </table>\n</body>\n</html>` }}", "options": {"allowUnauthorizedCerts": false, "appendAttribution": false}}, "id": "a1b2c3d4-0007-0007-0007-000000000007", "name": "Gmail \u2014 Notify Bryce", "type": "n8n-nodes-base.gmail", "typeVersion": 2.1, "position": [1280, 160], "credentials": {"gmailOAuth2": {"id": "g9I6fVtERQ0B0Eed", "name": "Gmail account"}}}, {"parameters": {"respondWith": "json", "responseBody": "={{ JSON.stringify({ ok: true, contactId: $('GHL \u2014 Upsert Contact').item.json.contact.id }) }}", "options": {}}, "id": "a1b2c3d4-0004-0004-0004-000000000004", "name": "Respond 200", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1.1, "position": [1540, 160]}, {"parameters": {"conditions": {"options": {"caseSensitive": true, "leftValue": "", "typeValidation": "strict"}, "conditions": [{"id": "oauth-check", "leftValue": "={{ $json.body.platforms_connected }}", "rightValue": "", "operator": {"type": "string", "operation": "notEquals"}}], "combinator": "and"}, "options": {}}, "id": "a1b2c3d4-0005-0005-0005-000000000005", "name": "Has OAuth Connections?", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [500, 460]}, {"parameters": {"operation": "append", "documentId": {"__rl": true, "value": "1RNQssJwYfCZyc6ZdQsftqy4UqsdhLb2v5svqVikEXoI", "mode": "id"}, "sheetName": {"__rl": true, "value": "gid=0", "mode": "id"}, "columns": {"mappingMode": "defineBelow", "value": {"Date Submitted": "={{ $('Onboarding Webhook').item.json.body.submitted_at }}", "Business Name": "={{ $('Onboarding Webhook').item.json.body.biz_name }}", "First Name": "={{ $('Onboarding Webhook').item.json.body.first_name }}", "Last Name": "={{ $('Onboarding Webhook').item.json.body.last_name }}", "Email": "={{ $('Onboarding Webhook').item.json.body.email }}", "Platforms Selected": "={{ $('Onboarding Webhook').item.json.body.platforms }}", "Platforms Connected (OAuth)": "={{ $('Onboarding Webhook').item.json.body.platforms_connected }}", "OAuth Skipped": "={{ $('Onboarding Webhook').item.json.body.oauth_skipped }}"}}, "options": {}}, "id": "a1b2c3d4-0006-0006-0006-000000000006", "name": "Sheets \u2014 Log OAuth Connections", "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.5, "position": [760, 460], "credentials": {"googleSheetsOAuth2Api": {"id": "OhjizsinSISmx4Gl", "name": "Google Sheets OAuth2 API"}}}], "connections": {"Onboarding Webhook": {"main": [[{"node": "GHL \u2014 Upsert Contact", "type": "main", "index": 0}, {"node": "Has OAuth Connections?", "type": "main", "index": 0}]]}, "GHL \u2014 Upsert Contact": {"main": [[{"node": "GHL \u2014 Create Note", "type": "main", "index": 0}]]}, "GHL \u2014 Create Note": {"main": [[{"node": "Sheets \u2014 Add to Onboarding Queue", "type": "main", "index": 0}, {"node": "Gmail \u2014 Notify Bryce", "type": "main", "index": 0}]]}, "Sheets \u2014 Add to Onboarding Queue": {"main": [[{"node": "Respond 200", "type": "main", "index": 0}]]}, "Gmail \u2014 Notify Bryce": {"main": [[{"node": "Respond 200", "type": "main", "index": 0}]]}, "Has OAuth Connections?": {"main": [[{"node": "Sheets \u2014 Log OAuth Connections", "type": "main", "index": 0}], []]}}, "authors": "Bryce Folsom", "name": null, "description": null, "autosaved": false, "workflowPublishHistory": [{"createdAt": "2026-04-11T20:15:02.478Z", "id": 690, "workflowId": "21cXlP5tZ1WF3PIq", "versionId": "9b177ea9-f6bb-4071-a8e9-cdd86f373969", "event": "activated", "userId": "17d3676f-3e74-4586-8363-5c1f4d237ed7"}, {"createdAt": "2026-04-11T20:15:02.358Z", "id": 689, "workflowId": "21cXlP5tZ1WF3PIq", "versionId": "9b177ea9-f6bb-4071-a8e9-cdd86f373969", "event": "deactivated", "userId": "17d3676f-3e74-4586-8363-5c1f4d237ed7"}]}}