{
  "version": "1.0.0",
  "exported_at": "2026-06-03T13:25:00.000Z",
  "project": {
    "name": "LinkedIn Company Profile Scraper",
    "description": "Best-effort LinkedIn company profile scraper for https://www.linkedin.com/company/nestle-professional/. Extracts company profile fields, about details, visible employees, and visible posts. LinkedIn redirected unauthenticated analysis to authwall/HTTP 999, so the authwall branch writes a diagnostic CSV row instead of producing no file. For full data, run with a logged-in LinkedIn browser session. Navigation strategy: visits overview, about, people, and posts tabs; performs scrolls on People and Posts to load visible rows.",
    "color": "bg-[#0a66c2]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser window dimensions",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 456,
      "position_y": 220,
      "config": {
        "url": "https://www.linkedin.com/company/nestle-professional/",
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 792,
      "position_y": 220,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1128,
      "position_y": 220,
      "config": {
        "duration": 4
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1464,
      "position_y": 220,
      "config": {
        "selector": "form.join-form, #session_key, .authwall-join-form__title, .challenge-dialog__iframe"
      }
    },
    {
      "block_id": "structured-export-0",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1800,
      "position_y": 520,
      "config": {
        "rowSelector": "body",
        "fileName": "linkedin-company-scraper.csv",
        "includeHeaders": true,
        "fileMode": "create",
        "columns": [
          {
            "name": "page_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "scrape_status",
            "selector": "\"blocked_by_linkedin_authwall_or_security_verification\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_name",
            "selector": "\"Nestlé Professional\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "industry",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_intro",
            "selector": "\"LinkedIn company data was not accessible because LinkedIn displayed an authwall or security verification.\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employees_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "about_us",
            "selector": "\"Run UScraper with a logged-in LinkedIn browser profile to extract the profile/about/people/posts fields.\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "website",
            "selector": "\"https://www.nestleprofessional.com\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_size",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "headquarters",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "type",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "founded_on",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "specialties",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "if_primary_location",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address_link",
            "selector": "\"https://www.bing.com/maps?where=Avenue+Nestl%C3%A9+55+Vevey+1800+Vaud+CH&trk=org-locations_url\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_name",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_intro",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "avatar_url",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "poster",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_body",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "follow_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "posted_date",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_image_url",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "like_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "comment_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          }
        ],
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates"
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 2136,
      "position_y": 520,
      "config": {}
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1464,
      "position_y": 520,
      "config": {
        "rowSelector": "body",
        "fileName": "linkedin-company-scraper.csv",
        "includeHeaders": true,
        "fileMode": "create",
        "columns": [
          {
            "name": "page_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "scrape_status",
            "selector": "\"ok_overview_page\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_name",
            "selector": "(document.querySelector('h1, .org-top-card-summary__title, .org-top-card-primary-content__title')?.innerText || 'Nestlé Professional').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "industry",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Industry\\s*\\n([^\\n]+)/i); if(m) return m[1].trim(); const info=document.querySelector('.org-top-card-summary-info-list, .org-top-card-summary__info, .org-top-card-primary-content__subtitle'); return (info?.innerText||'').split('\\n')[0].trim();})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_intro",
            "selector": "(document.querySelector('.org-top-card-summary__tagline, .org-top-card-primary-content__tagline, [data-test-id=\"about-us__description\"]')?.innerText || '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employees_count",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Discover all\\s+[\\d,]+\\s+employees|[\\d,]+\\s+employees on LinkedIn|[\\d,]+\\s+employees/i); return m?m[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "about_us",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/About us\\s*\\n([\\s\\S]{0,1200}?)(?:\\n\\s*(Website|Industry|Company size|Headquarters|Type|Founded|Specialties)\\s*\\n|$)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "website",
            "selector": "(()=>{const a=[...document.querySelectorAll('a[href]')].find(a=>!/linkedin\\.com/i.test(a.href)&&/nestleprofessional|company_website|Website/i.test((a.innerText||'')+' '+a.href)); return a?a.href:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_size",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Company size\\s*\\n([^\\n]+)|[\\d,]+(?:-[\\d,]+|\\+)?\\s+employees/i); return m?(m[1]||m[0]).trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "headquarters",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Headquarters\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "type",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Type\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "founded_on",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Founded\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "specialties",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Specialties\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "if_primary_location",
            "selector": "(()=>/Primary/i.test(document.body.innerText||'')?'Primary':'' )()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Locations?\\s*\\n([\\s\\S]{0,300})/i); return m?m[1].split('\\n').filter(Boolean).slice(0,4).join(' ').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address_link",
            "selector": "(()=>{const a=[...document.querySelectorAll('a[href*=\"bing.com/maps\"], a[href*=\"maps\"]')][0]; return a?a.href:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_name",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_intro",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "avatar_url",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "poster",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_body",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "follow_count",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/[\\d,]+\\s+followers/i); return m?m[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "posted_date",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_image_url",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "like_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "comment_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          }
        ],
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates"
      }
    },
    {
      "block_id": "navigate-2",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 1968,
      "position_y": 800,
      "config": {
        "url": "https://www.linkedin.com/company/nestle-professional/about/"
      }
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 2304,
      "position_y": 800,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2640,
      "position_y": 800,
      "config": {
        "duration": 4
      }
    },
    {
      "block_id": "structured-export-2",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2976,
      "position_y": 800,
      "config": {
        "rowSelector": "body",
        "fileName": "linkedin-company-scraper.csv",
        "includeHeaders": false,
        "fileMode": "append",
        "columns": [
          {
            "name": "page_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "scrape_status",
            "selector": "\"ok_about_page\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_name",
            "selector": "(document.querySelector('h1, .org-top-card-summary__title, .org-top-card-primary-content__title')?.innerText || 'Nestlé Professional').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "industry",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Industry\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_intro",
            "selector": "(document.querySelector('.org-top-card-summary__tagline, .org-top-card-primary-content__tagline, [data-test-id=\"about-us__description\"]')?.innerText || '').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employees_count",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Discover all\\s+[\\d,]+\\s+employees|[\\d,]+\\s+employees on LinkedIn|[\\d,]+\\s+employees/i); return m?m[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "about_us",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/About us\\s*\\n([\\s\\S]{0,1500}?)(?:\\n\\s*(Website|Industry|Company size|Headquarters|Type|Founded|Specialties)\\s*\\n|$)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "website",
            "selector": "(()=>{const a=[...document.querySelectorAll('a[href]')].find(a=>!/linkedin\\.com/i.test(a.href)&&/nestleprofessional|company_website|Website/i.test((a.innerText||'')+' '+a.href)); return a?a.href:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_size",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Company size\\s*\\n([^\\n]+)|[\\d,]+(?:-[\\d,]+|\\+)?\\s+employees/i); return m?(m[1]||m[0]).trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "headquarters",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Headquarters\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "type",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Type\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "founded_on",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Founded\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "specialties",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Specialties\\s*\\n([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "if_primary_location",
            "selector": "(()=>/Primary/i.test(document.body.innerText||'')?'Primary':'' )()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Locations?\\s*\\n([\\s\\S]{0,300})/i); return m?m[1].split('\\n').filter(Boolean).slice(0,4).join(' ').trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address_link",
            "selector": "(()=>{const a=[...document.querySelectorAll('a[href*=\"bing.com/maps\"], a[href*=\"maps\"]')][0]; return a?a.href:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_name",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_intro",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "avatar_url",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "poster",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_body",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "follow_count",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/[\\d,]+\\s+followers/i); return m?m[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "posted_date",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_image_url",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "like_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "comment_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          }
        ],
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates"
      }
    },
    {
      "block_id": "navigate-3",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 3312,
      "position_y": 800,
      "config": {
        "url": "https://www.linkedin.com/company/nestle-professional/people/"
      }
    },
    {
      "block_id": "wait-for-page-load-3",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 3648,
      "position_y": 800,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3984,
      "position_y": 800,
      "config": {
        "duration": 4
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 4320,
      "position_y": 800,
      "config": {
        "jsCode": "window.scrollTo(0, document.body.scrollHeight);",
        "waitForCompletion": true,
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-4",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 4656,
      "position_y": 800,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "inject-javascript-2",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 4992,
      "position_y": 800,
      "config": {
        "jsCode": "window.scrollTo(0, document.body.scrollHeight);",
        "waitForCompletion": true,
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-5",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 5328,
      "position_y": 800,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "structured-export-3",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 5664,
      "position_y": 800,
      "config": {
        "rowSelector": "body",
        "fileName": "linkedin-company-scraper.csv",
        "includeHeaders": false,
        "fileMode": "append",
        "columns": [
          {
            "name": "page_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "scrape_status",
            "selector": "\"ok_people_page_visible_loaded_records\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_name",
            "selector": "(document.querySelector('h1, .org-top-card-summary__title, .org-top-card-primary-content__title')?.innerText || 'Nestlé Professional').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "industry",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_intro",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employees_count",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/Discover all\\s+[\\d,]+\\s+employees|[\\d,]+\\s+employees on LinkedIn|[\\d,]+\\s+employees/i); return m?m[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "about_us",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "website",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_size",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "headquarters",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "type",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "founded_on",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "specialties",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "if_primary_location",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_name",
            "selector": "Array.from(document.querySelectorAll('a[href*=\"/in/\"]')).map(a=>a.innerText.trim().split('\\n')[0]).filter(Boolean).slice(0,30).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_intro",
            "selector": "Array.from(document.querySelectorAll('.org-people-profile-card, .artdeco-entity-lockup, li')).map(card=>(card.querySelector('.artdeco-entity-lockup__subtitle, .org-people-profile-card__profile-info .lt-line-clamp')?.innerText||'').trim()).filter(Boolean).slice(0,30).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_link",
            "selector": "Array.from(document.querySelectorAll('a[href*=\"/in/\"]')).map(a=>a.href).filter(Boolean).slice(0,30).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "avatar_url",
            "selector": "Array.from(document.querySelectorAll('img')).map(img=>img.currentSrc||img.src).filter(src=>/profile|media|licdn/i.test(src)).slice(0,30).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "poster",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_body",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "follow_count",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/[\\d,]+\\s+followers/i); return m?m[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "posted_date",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_image_url",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "like_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "comment_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          }
        ],
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates"
      }
    },
    {
      "block_id": "navigate-4",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 6000,
      "position_y": 800,
      "config": {
        "url": "https://www.linkedin.com/company/nestle-professional/posts/"
      }
    },
    {
      "block_id": "wait-for-page-load-4",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 6336,
      "position_y": 800,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-6",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 6672,
      "position_y": 800,
      "config": {
        "duration": 4
      }
    },
    {
      "block_id": "inject-javascript-3",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 7008,
      "position_y": 800,
      "config": {
        "jsCode": "window.scrollTo(0, document.body.scrollHeight);",
        "waitForCompletion": true,
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-7",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 7344,
      "position_y": 800,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "inject-javascript-4",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 7680,
      "position_y": 800,
      "config": {
        "jsCode": "window.scrollTo(0, document.body.scrollHeight);",
        "waitForCompletion": true,
        "timeout": 10
      }
    },
    {
      "block_id": "sleep-8",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 8016,
      "position_y": 800,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "structured-export-4",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 8352,
      "position_y": 800,
      "config": {
        "rowSelector": "body",
        "fileName": "linkedin-company-scraper.csv",
        "includeHeaders": false,
        "fileMode": "append",
        "columns": [
          {
            "name": "page_url",
            "selector": "location.href",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "scrape_status",
            "selector": "\"ok_posts_page_visible_loaded_records\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_name",
            "selector": "(document.querySelector('h1, .org-top-card-summary__title, .org-top-card-primary-content__title')?.innerText || 'Nestlé Professional').trim()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "industry",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_intro",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employees_count",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "about_us",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "website",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "company_size",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "headquarters",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "type",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "founded_on",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "specialties",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "if_primary_location",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "address_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_name",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_intro",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "employee_link",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "avatar_url",
            "selector": "\"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "poster",
            "selector": "Array.from(document.querySelectorAll('.feed-shared-update-v2, div[data-urn*=\"activity\"]')).map(card=>(card.querySelector('.update-components-actor__name, .feed-shared-actor__name')?.innerText||'').trim()).filter(Boolean).slice(0,20).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_body",
            "selector": "Array.from(document.querySelectorAll('.feed-shared-update-v2, div[data-urn*=\"activity\"]')).map(card=>(card.querySelector('.update-components-text, .feed-shared-update-v2__description, .feed-shared-text')?.innerText||'').trim()).filter(Boolean).slice(0,20).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_link",
            "selector": "Array.from(document.querySelectorAll('a[href*=\"/posts/\"], a[href*=\"activity-\"]')).map(a=>a.href).filter(Boolean).slice(0,20).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "follow_count",
            "selector": "(()=>{const txt=document.body.innerText; const m=txt.match(/[\\d,]+\\s+followers/i); return m?m[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "posted_date",
            "selector": "Array.from(document.querySelectorAll('.feed-shared-update-v2, div[data-urn*=\"activity\"]')).map(card=>(card.querySelector('time, .update-components-actor__sub-description, .feed-shared-actor__sub-description')?.innerText||'').trim()).filter(Boolean).slice(0,20).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "post_image_url",
            "selector": "Array.from(document.querySelectorAll('.update-components-image img, .feed-shared-image img, .feed-shared-update-v2 img')).map(img=>img.currentSrc||img.src).filter(Boolean).slice(0,20).join(' | ')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "like_count",
            "selector": "(()=>{const txt=document.body.innerText||''; const m=txt.match(/([\\d,]+)\\s*(?:reactions?|likes?)/i); return m?m[1]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "comment_count",
            "selector": "(()=>{const txt=document.body.innerText||''; const m=txt.match(/([\\d,]+)\\s+comments?/i); return m?m[1]:'';})()",
            "attribute": "text",
            "isJs": true
          }
        ],
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates"
      }
    },
    {
      "block_id": "end-2",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 8688,
      "position_y": 800,
      "config": {}
    }
  ],
  "connections": [
    {
      "from_block_id": "set-window-size-1",
      "from_connector_id": "right",
      "to_block_id": "navigate-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "navigate-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1",
      "from_connector_id": "right",
      "to_block_id": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "structured-export-0",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-0",
      "from_connector_id": "right",
      "to_block_id": "end-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "navigate-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "navigate-2",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-2",
      "from_connector_id": "right",
      "to_block_id": "sleep-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "from_connector_id": "right",
      "to_block_id": "structured-export-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-2",
      "from_connector_id": "right",
      "to_block_id": "navigate-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "navigate-3",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-3",
      "from_connector_id": "right",
      "to_block_id": "sleep-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-3",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-4",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-2",
      "from_connector_id": "right",
      "to_block_id": "sleep-5",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-5",
      "from_connector_id": "right",
      "to_block_id": "structured-export-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-3",
      "from_connector_id": "right",
      "to_block_id": "navigate-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "navigate-4",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-4",
      "from_connector_id": "right",
      "to_block_id": "sleep-6",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-6",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-3",
      "from_connector_id": "right",
      "to_block_id": "sleep-7",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-7",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-4",
      "from_connector_id": "right",
      "to_block_id": "sleep-8",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-8",
      "from_connector_id": "right",
      "to_block_id": "structured-export-4",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-4",
      "from_connector_id": "right",
      "to_block_id": "end-2",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "set-window-size-1"
        ]
      }
    },
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 384,
      "position_y": 116,
      "width": 7880,
      "height": 876,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "navigate-2",
          "wait-for-page-load-2",
          "sleep-2",
          "navigate-3",
          "wait-for-page-load-3",
          "sleep-3",
          "sleep-4",
          "sleep-5",
          "navigate-4",
          "wait-for-page-load-4",
          "sleep-6",
          "sleep-7",
          "sleep-8"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1392,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1392,
      "position_y": 416,
      "width": 7208,
      "height": 576,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-0",
          "structured-export-1",
          "structured-export-2",
          "structured-export-3",
          "structured-export-4"
        ]
      }
    },
    {
      "id": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 2064,
      "position_y": 416,
      "width": 6872,
      "height": 576,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1",
          "end-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 4248,
      "position_y": 696,
      "width": 3680,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1",
          "inject-javascript-2",
          "inject-javascript-3",
          "inject-javascript-4"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort LinkedIn company profile scraper for https://www.linkedin.com/company/nestle-professional/. Extracts company profile fields, about details, visible employees, and visible posts. LinkedIn redirected unauthenticated analysis to authwall/HTTP 999, so the authwall branch writes a diagnostic CSV row instead of producing no file. For full data, run with a logged-in LinkedIn browser session. Navigation strategy: visits overview, about, people, and posts tabs; performs scrolls on People and Posts to load visible rows.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `form.join-form, #session_key, .authwall-join-form__title, .challenge-dialog__iframe`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 1664,
      "position_y": 200,
      "width": 340,
      "height": 158,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-structured-export-0",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (page_url, scrape_status, company_name, industry, company_intro). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2000,
      "position_y": 500,
      "width": 340,
      "height": 134,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-0"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (page_url, scrape_status, company_name, industry, company_intro). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1664,
      "position_y": 500,
      "width": 340,
      "height": 134,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `window.scrollTo(0, document.body.scrollHeight);...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 4520,
      "position_y": 780,
      "width": 340,
      "height": 122,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-inject-javascript-3",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `window.scrollTo(0, document.body.scrollHeight);...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 7208,
      "position_y": 780,
      "width": 340,
      "height": 122,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-3"
      }
    }
  ]
}