{"updatedAt":"2026-04-11T20:15:02.226Z","createdAt":"2026-04-10T00:09:40.388Z","id":"21cXlP5tZ1WF3PIq","name":"EN — Client Onboarding → 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  ].filter(f => f.field_value)\n}) }}","options":{}},"id":"a1b2c3d4-0002-0002-0002-000000000002","name":"GHL — 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    '📋 ONBOARDING FORM — ' + 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    || '—'),\n    'Niche: '       + ($('Onboarding Webhook').item.json.body.niche        || '—'),\n    'Tagline: '     + ($('Onboarding Webhook').item.json.body.tagline      || '—'),\n    'Website: '     + ($('Onboarding Webhook').item.json.body.website      || '—'),\n    'Client Type: ' + ($('Onboarding Webhook').item.json.body.audience_type === 'consumer' ? 'creator' : ($('Onboarding Webhook').item.json.body.audience_type || '—')),\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         || '—'),\n    'Mood Anchor: '  + ($('Onboarding Webhook').item.json.body.mood_anchor  || '—'),\n    'Avoid: '        + ($('Onboarding Webhook').item.json.body.avoid        || '—'),\n    'Inspiration: '  + ($('Onboarding Webhook').item.json.body.inspo        || '—'),\n    'Content Format: ' + ($('Onboarding Webhook').item.json.body.content_format || '—'),\n    'Visual Feel — Light/Dark: '   + ($('Onboarding Webhook').item.json.body.visual_feel_light   || '—'),\n    'Visual Feel — Minimal/Dense: ' + ($('Onboarding Webhook').item.json.body.visual_feel_minimal || '—'),\n    'Visual Feel — Warm/Formal: '  + ($('Onboarding Webhook').item.json.body.visual_feel_warm    || '—'),\n    (() => { try { const c = JSON.parse($('Onboarding Webhook').item.json.body.brand_colors || '{}'); return 'Brand Colors: Primary ' + (c.primary||'—') + ' / Secondary ' + (c.secondary||'—'); } catch(e) { return 'Brand Colors: —'; } })(),\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  || '—'),\n    'Domain Registrar: ' + ($('Onboarding Webhook').item.json.body.domain_registrar  || '—'),\n    'Current CRM: '      + ($('Onboarding Webhook').item.json.body.current_crm       || '—'),\n    'Analytics: '        + ($('Onboarding Webhook').item.json.body.analytics         || '—'),\n    'Ad Accounts: '      + ($('Onboarding Webhook').item.json.body.ad_accounts       || '—'),\n    'Tech Notes: '       + ($('Onboarding Webhook').item.json.body.tech_notes        || '—'),\n    '',\n    'GOALS',\n    'Primary Goal: '      + ($('Onboarding Webhook').item.json.body.primary_goal     || '—'),\n    'Revenue Tracking: '  + ($('Onboarding Webhook').item.json.body.revenue_tracking || '—'),\n    '',\n    'CONTENT PREFERENCES',\n    'Platforms: '    + ($('Onboarding Webhook').item.json.body.platforms       || '—'),\n    'Kickoff Notes: ' + ($('Onboarding Webhook').item.json.body.notes          || '—'),\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('✓ '+(names[k]||k)+(h?' · @'+h.replace('@',''):'')+'  —  OAuth connected'); });\n      Object.keys(handles).filter(k=>handles[k]&&!connected.includes(k)).forEach(k => {\n        lines.push('○ '+(names[k]||k)+' · @'+handles[k].replace('@','')+'  —  '+(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 — 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 — 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 — 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 — {{ $('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 || '—'} ${ $('Onboarding Webhook').item.json.body.niche ? '· ' + $('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 || '—')}</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 || '—'}</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 || '—'}</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 || '—'}</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 || '—'}</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;\">✓ Added to Onboarding Queue — 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 · 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 — 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 — 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 — 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 — Upsert Contact","type":"main","index":0},{"node":"Has OAuth Connections?","type":"main","index":0}]]},"GHL — Upsert Contact":{"main":[[{"node":"GHL — Create Note","type":"main","index":0}]]},"GHL — Create Note":{"main":[[{"node":"Sheets — Add to Onboarding Queue","type":"main","index":0},{"node":"Gmail — Notify Bryce","type":"main","index":0}]]},"Sheets — Add to Onboarding Queue":{"main":[[{"node":"Respond 200","type":"main","index":0}]]},"Gmail — Notify Bryce":{"main":[[{"node":"Respond 200","type":"main","index":0}]]},"Has OAuth Connections?":{"main":[[{"node":"Sheets — 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 — 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    '📋 ONBOARDING FORM — ' + 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    || '—'),\n    'Niche: '       + ($('Onboarding Webhook').item.json.body.niche        || '—'),\n    'Tagline: '     + ($('Onboarding Webhook').item.json.body.tagline      || '—'),\n    'Website: '     + ($('Onboarding Webhook').item.json.body.website      || '—'),\n    'Client Type: ' + ($('Onboarding Webhook').item.json.body.audience_type === 'consumer' ? 'creator' : ($('Onboarding Webhook').item.json.body.audience_type || '—')),\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         || '—'),\n    'Mood Anchor: '  + ($('Onboarding Webhook').item.json.body.mood_anchor  || '—'),\n    'Avoid: '        + ($('Onboarding Webhook').item.json.body.avoid        || '—'),\n    'Inspiration: '  + ($('Onboarding Webhook').item.json.body.inspo        || '—'),\n    'Content Format: ' + ($('Onboarding Webhook').item.json.body.content_format || '—'),\n    'Visual Feel — Light/Dark: '   + ($('Onboarding Webhook').item.json.body.visual_feel_light   || '—'),\n    'Visual Feel — Minimal/Dense: ' + ($('Onboarding Webhook').item.json.body.visual_feel_minimal || '—'),\n    'Visual Feel — Warm/Formal: '  + ($('Onboarding Webhook').item.json.body.visual_feel_warm    || '—'),\n    (() => { try { const c = JSON.parse($('Onboarding Webhook').item.json.body.brand_colors || '{}'); return 'Brand Colors: Primary ' + (c.primary||'—') + ' / Secondary ' + (c.secondary||'—'); } catch(e) { return 'Brand Colors: —'; } })(),\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  || '—'),\n    'Domain Registrar: ' + ($('Onboarding Webhook').item.json.body.domain_registrar  || '—'),\n    'Current CRM: '      + ($('Onboarding Webhook').item.json.body.current_crm       || '—'),\n    'Analytics: '        + ($('Onboarding Webhook').item.json.body.analytics         || '—'),\n    'Ad Accounts: '      + ($('Onboarding Webhook').item.json.body.ad_accounts       || '—'),\n    'Tech Notes: '       + ($('Onboarding Webhook').item.json.body.tech_notes        || '—'),\n    '',\n    'GOALS',\n    'Primary Goal: '      + ($('Onboarding Webhook').item.json.body.primary_goal     || '—'),\n    'Revenue Tracking: '  + ($('Onboarding Webhook').item.json.body.revenue_tracking || '—'),\n    '',\n    'CONTENT PREFERENCES',\n    'Platforms: '    + ($('Onboarding Webhook').item.json.body.platforms       || '—'),\n    'Kickoff Notes: ' + ($('Onboarding Webhook').item.json.body.notes          || '—'),\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('✓ '+(names[k]||k)+(h?' · @'+h.replace('@',''):'')+'  —  OAuth connected'); });\n      Object.keys(handles).filter(k=>handles[k]&&!connected.includes(k)).forEach(k => {\n        lines.push('○ '+(names[k]||k)+' · @'+handles[k].replace('@','')+'  —  '+(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 — 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 — 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 — 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 — {{ $('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 || '—'} ${ $('Onboarding Webhook').item.json.body.niche ? '· ' + $('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 || '—')}</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 || '—'}</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 || '—'}</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 || '—'}</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 || '—'}</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;\">✓ Added to Onboarding Queue — 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 · 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 — 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 — 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 — 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 — Upsert Contact","type":"main","index":0},{"node":"Has OAuth Connections?","type":"main","index":0}]]},"GHL — Upsert Contact":{"main":[[{"node":"GHL — Create Note","type":"main","index":0}]]},"GHL — Create Note":{"main":[[{"node":"Sheets — Add to Onboarding Queue","type":"main","index":0},{"node":"Gmail — Notify Bryce","type":"main","index":0}]]},"Sheets — Add to Onboarding Queue":{"main":[[{"node":"Respond 200","type":"main","index":0}]]},"Gmail — Notify Bryce":{"main":[[{"node":"Respond 200","type":"main","index":0}]]},"Has OAuth Connections?":{"main":[[{"node":"Sheets — 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"}]}}