AutomationFlowsAI & RAG › Build Person Osint Profiles Using Humantic Ai, Hunter, Courtlistener and Gpt-5

Build Person Osint Profiles Using Humantic Ai, Hunter, Courtlistener and Gpt-5

ByOpen Paws @openpaws on n8n.io

This workflow is designed for sales professionals, recruiters, and researchers who need to: Build comprehensive profiles of individuals from public sources Understand communication and personality styles before outreach Find verified contact information Research legal and public…

Webhook trigger★★★★★ complexityAI-powered68 nodesHumantic AiHunterHTTP Request ToolTool Http RequestTool ThinkJina Ai ToolChain LlmOutput Parser Structured
AI & RAG Trigger: Webhook Nodes: 68 Complexity: ★★★★★ AI nodes: yes Added:
Build Person Osint Profiles Using Humantic Ai, Hunter, Courtlistener and Gpt-5 — n8n workflow card showing Humantic Ai, Hunter, HTTP Request Tool integration

This workflow corresponds to n8n.io template #12507 — we link there as the canonical source.

This workflow follows the Agent → Chainllm recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "Pqt2x6Z-x9SEUzmW6JYeV",
  "name": "Analyze publicly available information about individuals using AI",
  "tags": [],
  "nodes": [
    {
      "id": "da302200-be32-443b-93d6-81df8e0220b4",
      "name": "Create a profile",
      "type": "n8n-nodes-base.humanticAi",
      "onError": "continueRegularOutput",
      "position": [
        -848,
        880
      ],
      "parameters": {
        "userId": "={{ $json.linkedinURL }}"
      },
      "credentials": {
        "humanticAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1d8a41d5-1992-4e34-903c-2fffb2455b6c",
      "name": "Get a profile",
      "type": "n8n-nodes-base.humanticAi",
      "onError": "continueRegularOutput",
      "position": [
        -432,
        880
      ],
      "parameters": {
        "userId": "={{ $('Prepare research input fields').item.json.linkedinURL }}",
        "options": {},
        "operation": "get"
      },
      "credentials": {
        "humanticAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1136b192-4f41-48f3-9b03-c8ba6f94825e",
      "name": "Hunter",
      "type": "n8n-nodes-base.hunter",
      "onError": "continueRegularOutput",
      "position": [
        -224,
        880
      ],
      "parameters": {
        "domain": "={{ $('Prepare research input fields').item.json.companyDomain }}",
        "lastname": "={{ $('Prepare research input fields').item.json.lastName }}",
        "firstname": "={{ $('Prepare research input fields').item.json.firstName }}",
        "operation": "emailFinder"
      },
      "credentials": {
        "hunterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d0a6834f-8e85-47fb-88f4-1e75b8752e96",
      "name": "Set Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        880
      ],
      "parameters": {
        "options": {
          "ignoreConversionErrors": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "6f4e9177-102a-4dc2-b5a2-7060d1e84e99",
              "name": "Humantic Findings",
              "type": "object",
              "value": "={{ $('Get a profile').item.json}}"
            },
            {
              "id": "f5e72344-ac18-442f-b887-e827158243ae",
              "name": "Hunter Findings",
              "type": "object",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f81ae813-8450-446b-a03a-76b15b12209a",
      "name": "Court Listener Discovery",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        672,
        1088
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1
            }
          }
        },
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "=**Discovery Phase - Find ALL Court Cases**\n**Base URL:** https://www.courtlistener.com/api/rest/v4/\n**ALWAYS include full base URL in requests**\n\n## Search Endpoint (CORRECTED)\nhttps://www.courtlistener.com/api/rest/v4/search/?type=o&q={query}&page_size=20\n\n## Critical Parameters\n- **type=o** (opinions - most common)\n- **type=r** (RECAP docket documents)\n- **q={search terms}** (URL encode special characters)\n- **page_size=20** (API maximum)\n- **order_by=-score** (best matches first)\n- **court__jurisdiction=F** (F=federal, S=state, optional)\n\n## WORKING Discovery Search URLs\nCompany name searches:\nhttps://www.courtlistener.com/api/rest/v4/search/?type=o&q=cargill&page_size=20\nhttps://www.courtlistener.com/api/rest/v4/search/?type=o&q=\"cargill+meat\"&page_size=20\nhttps://www.courtlistener.com/api/rest/v4/search/?type=o&q=cargill+violation&page_size=20\n\nIssue/violation searches:\nhttps://www.courtlistener.com/api/rest/v4/search/?type=o&q=animal+welfare+cargill&page_size=20\nhttps://www.courtlistener.com/api/rest/v4/search/?type=o&q=environmental+violation+cargill&page_size=20\n\nDocket searches (different endpoint):\nhttps://www.courtlistener.com/api/rest/v4/dockets/?case_name__icontains=cargill&page_size=20\nhttps://www.courtlistener.com/api/rest/v4/dockets/?case_name__icontains=cargill&date_filed__gte=2020-01-01\n\n## Response Structure\n```json\n{\n  \"count\": 123,\n  \"next\": \"https://www.courtlistener.com/api/rest/v4/search/?page=2...\",\n  \"results\": [{\n    \"id\": 456789,  // CAPTURE THIS for retrieval phase\n    \"cluster_id\": 123456,  // Alternative ID for cluster retrieval\n    \"case_name\": \"NPPC v. Ross\",\n    \"absolute_url\": \"/opinion/456789/nppc-v-ross/\",  // Note: partial path\n    \"court\": \"Court of Appeals for the Ninth Circuit\",\n    \"date_filed\": \"2022-03-15\",\n    \"snippet\": \"...text preview with <mark>highlighted</mark> terms...\"\n  }]\n}",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "948d53b9-2f91-407e-a914-0df61cfa602e",
      "name": "Google Search Discovery",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        384,
        1088
      ],
      "parameters": {
        "url": "https://google.serper.dev/{endpoint}",
        "sendQuery": true,
        "sendHeaders": true,
        "specifyQuery": "model",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "=**Discovery Phase - Find ALL Legal Analysis & News**\n\nSearches Google for comprehensive coverage of the query. Cast wide net.\n\n## Endpoint Selection\nYou must specify one of these endpoints:\n- search (general web search) - for legal analysis, expert commentary\n- news (news articles) - for recent coverage, breaking developments\n- scholar (academic papers) - for law review articles\n\n## Query Parameters\n{\n  \"q\": \"search query\",           // REQUIRED\n  \"location\": \"United States\",   // optional\n  \"tbs\": \"qdr:y\"                 // optional time filter\n}\n\n## Time Parameters (tbs)\n- \"qdr:d\" (past day)\n- \"qdr:w\" (past week) \n- \"qdr:m\" (past month)\n- \"qdr:y\" (past year)\n\n## Discovery Examples\nsearch endpoint: {\"q\": \"prop 12 legal analysis\", \"tbs\": \"qdr:y\"}\nnews endpoint: {\"q\": \"prop 12 constitutional challenge\", \"tbs\": \"qdr:m\"}\nsearch endpoint: {\"q\": \"proposition 12 california farm\"}\nscholar endpoint: {\"q\": \"prop 12 dormant commerce clause\"}\n\n**In Discovery Phase:**\n- Use multiple search variations\n- Try different endpoints\n- Don't filter results yet\n- Find everything relevant for later prioritization",
        "parametersHeaders": {
          "values": [
            {
              "name": "Content-Type",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        },
        "placeholderDefinitions": {
          "values": [
            {
              "name": "{endpoint}",
              "description": "search - General web search \n\nnews - News articles \n\nscholar - Academic papers \n\npatents - Patent searches \n\nmaps - Location-based searches \n\nreviews - Business/product reviews"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.1
    },
    {
      "id": "a2f39ac7-0594-4dc1-8156-e0f625288e9a",
      "name": "LegiScan Discovery",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        528,
        1088
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1
            }
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "toolDescription": "=**Discovery Phase - Find ALL Related Legislation**\n\n**CRITICAL: ALWAYS use full base URL**\n**Base URL:** https://api.legiscan.com/\n**Every request MUST start with:** https://api.legiscan.com/?op=\n\n## Search Operation\nhttps://api.legiscan.com/?op=getSearch&state={state}&query={query}&year={year}\n\n## Parameters\n- state: ALL (searches all states) or specific state code (CA, TX, etc.)\n- query: search terms (URL encoded)\n- year: 1 (all years), 2 (current session), or specific year\n\n## CORRECT Discovery URLs\n\u2705 https://api.legiscan.com/?op=getSearch&state=ALL&query=prop%2012&year=2\n\u2705 https://api.legiscan.com/?op=getSearch&state=ALL&query=proposition%2012\n\u2705 https://api.legiscan.com/?op=getSearch&state=CA&query=farm%20animal%20confinement\n\n## WRONG (Missing base URL)\n\u274c ?op=getSearch&state=ALL&query=prop%2012\n\u274c getSearch&state=ALL&query=prop%2012\n\n## Response Structure\n{\n  \"status\": \"OK\",\n  \"searchresult\": {\n    \"summary\": {\"count\": 15},\n    \"0\": {\n      \"bill_id\": 1234567,\n      \"bill_number\": \"AB 123\",\n      \"title\": \"Farm Animal Confinement Standards\"\n    }\n  }\n}\n\n**In Discovery Phase:**\n- ALWAYS use state=ALL for comprehensive search\n- Try multiple search terms\n- Note bill_id for later retrieval\n- Don't get full text yet"
      },
      "credentials": {
        "httpQueryAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "4d87896a-5e74-46bf-9447-8c61cf893ffd",
      "name": "Court Listener Retrieveal",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2608,
        1168
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1
            }
          }
        },
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "toolDescription": "=**Retrieval Phase - Get Full Opinion Text**\nBase URL: https://www.courtlistener.com/api/rest/v4/\nYour job: Retrieve ONLY opinions Agent 2 selected. NO NEW SEARCHES.\n\nCORRECT URL CONSTRUCTION:\nFor opinions:\nhttps://www.courtlistener.com/api/rest/v4/opinions/{opinion_id}/?fields=plain_text,html_with_citations,case_name,absolute_url\n\nFor clusters (opinion clusters):\nhttps://www.courtlistener.com/api/rest/v4/clusters/{cluster_id}/?fields=case_name,docket,date_filed,absolute_url\n\nFor dockets:\nhttps://www.courtlistener.com/api/rest/v4/dockets/{docket_id}/?fields=case_name,absolute_url,date_filed,court\n\nCRITICAL FIXES:\n1. **Add trailing slash before query params**: `/opinions/{id}/` not `/opinions/{id}`\n2. **Include absolute_url field**: This gives the human-readable URL for citations\n3. **Use proper field names**: \n   - `plain_text` for full opinion text\n   - `html_with_citations` for formatted version\n   - `absolute_url` for the web URL to cite\n\nExample WORKING URL:\nhttps://www.courtlistener.com/api/rest/v4/opinions/4296807/?fields=plain_text,html_with_citations,case_name,absolute_url\n\nResponse will contain:\n- plain_text: Full opinion text\n- html_with_citations: HTML formatted text\n- case_name: Case title\n- absolute_url: The actual web URL for citations (e.g., https://www.courtlistener.com/opinion/4296807/case-name/)\n- date_filed: Filing date\n\nIMPORTANT: Always include `absolute_url` in fields to get the citable web URL!",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "16788ffe-2d35-43a4-a703-c0b9f329228c",
      "name": "Think Tool Prioritization",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        1872,
        1152
      ],
      "parameters": {
        "description": "=FOR EACH DISCOVERED ITEM, CONDUCT THESE VERIFICATION CHECKS:\n\n1. Company Match?\n   - Does the company mentioned match current or past employers?\n   - If different company, is this the wrong person?\n\n2. Timeline Match?\n   - Does the date align with their work history?\n   - Were they at that company during this time?\n\n3. Location Match?\n   - Does the location match known locations?\n   - If court case, is it in a plausible jurisdiction?\n\n4. Context Match?\n   - Does the role/title match their career?\n   - Does the subject matter match their expertise?\n   - Do co-authors/colleagues match their network?\n\n5. Red Flags?\n   - Different middle initial?\n   - Incompatible timeline?\n   - Wrong industry?\n   - Different state/country?\n\nVERDICT: \n- CONFIRMED SAME PERSON (high confidence)\n- LIKELY SAME PERSON (medium confidence)\n- UNCERTAIN (cannot determine)\n- DIFFERENT PERSON (exclude)\n\nIf CONFIRMED, then evaluate value:\n- Does this reveal character/behavior?\n- Does this show professional capabilities?\n- Does this help achieve report goal?"
      },
      "typeVersion": 1
    },
    {
      "id": "b5f6b447-05ed-40cf-8ab3-c5cfa4fe0c9e",
      "name": "LegiScan Retrieval",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2480,
        1168
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1
            }
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "toolDescription": "=**Retrieval Phase - Get Full Bill Text**\n\nBase URL: https://api.legiscan.com/\nCRITICAL: ALWAYS use full URL!\n\nYour job: Retrieve ONLY bills Agent 2 selected. NO NEW SEARCHES.\n\nBill Retrieval URL:\n\u2705 https://api.legiscan.com/?op=getBill&id={bill_id}\n\u274c ?op=getBill&id={bill_id} (WRONG - missing base URL!)\n\nExample:\nhttps://api.legiscan.com/?op=getBill&id=1234567\n\nResponse contains:\n{\n  \"bill\": {\n    \"bill_id\": 1234567,\n    \"title\": \"Full title\",\n    \"description\": \"Summary\",\n    \"sponsors\": [...],\n    \"texts\": [{\"doc_id\": 890, \"type\": \"Introduced\", \"url\": \"...\"}],\n    \"history\": [...],\n    \"votes\": [...]\n  }\n}\n\nTo get actual text:\nhttps://api.legiscan.com/?op=getBillText&id={doc_id}\n\nInclude full bill text and metadata for Agent 4."
      },
      "credentials": {
        "httpQueryAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "52ac015f-c211-4a4f-944c-b66febb33c74",
      "name": "DocumentCloud Retrieval",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2736,
        1168
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1
            }
          }
        },
        "toolDescription": "=**Retrieval Phase - Get Document Full Text**\n\nBase URL: https://s3.documentcloud.org/\n\nYour job: Retrieve text for ONLY documents Agent 2 selected.\n\nCRITICAL URL PATTERN:\nhttps://s3.documentcloud.org/documents/{id}/{slug}.txt.json\n\nALWAYS INCLUDE THE SLASHES!\n\n\u2705 CORRECT: https://s3.documentcloud.org/documents/789123/report.txt.json\n\u274c WRONG: https://s3.documentcloud.org/documents/789123-report.txt.json\n\nConstruction:\n1. Take ID from Agent 2: \"789123\"\n2. Take slug from Agent 2: \"usda-report\"\n3. Build full URL: https://s3.documentcloud.org/documents/789123/usda-report.txt.json\n\nResponse:\n{\n  \"pages\": [\n    {\"page\": 0, \"contents\": \"Full text of page 1...\"},\n    {\"page\": 1, \"contents\": \"Full text of page 2...\"}\n  ]\n}"
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "a5ac4598-371e-4bfa-a593-ac510f7d84f7",
      "name": "Jina URL Text Extraction",
      "type": "n8n-nodes-base.jinaAiTool",
      "position": [
        2352,
        1168
      ],
      "parameters": {
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
        "options": {},
        "requestOptions": {},
        "descriptionType": "manual",
        "toolDescription": "=**Retrieval Phase - Extract Article Content**\n\nYour job: Get full text from ONLY URLs Agent 2 selected.\n\nSimply pass each prioritized URL:\nhttps://example.com/legal-analysis-article\n\nJina will:\n- Extract main content\n- Remove ads, navigation\n- Return clean text\n- Include title, author, date\n\nOutput: Complete article text for Agent 4's analysis.\n\nNo searching - only extract from Agent 2's selected URLs."
      },
      "credentials": {
        "jinaAiApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "e86ebc41-dbed-44c6-abbb-98b85e6400e8",
      "name": "Think Tool Analysis",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        3984,
        1200
      ],
      "parameters": {
        "description": "=**Analysis Phase - Synthesize All Retrieved Texts**\n\nYour job: Analyze retrieved content to create strategic insights.\n\nRequired Analysis:\n1. Map findings to user query:\n   \"User asked about Prop 12 challenges\"\n   \n2. Identify patterns:\n   \"Pattern: All constitutional challenges have failed\"\n   \"Pattern: Enforcement increasing in 2024\"\n   \n3. Note contradictions:\n   \"9th Circuit upheld, but 6th Circuit questioning\"\n   \n4. Identify gaps:\n   \"No enforcement data after July 2024\"\n   \n5. Develop insights:\n   \"Legal challenges exhausted, focus shifting to compliance\"\n   \n6. Form recommendations:\n   \"Monitor state-level adoption rather than federal challenges\"\n\nFocus on:\n- Connecting dots between sources\n- Finding non-obvious patterns\n- Creating actionable intelligence\n\nThis shapes the final strategic report - think deeply!"
      },
      "typeVersion": 1
    },
    {
      "id": "453e481c-69dc-4730-a9b5-a5461509cfd1",
      "name": "Step 5: Verification",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4464,
        928
      ],
      "parameters": {
        "text": "=# \ud83d\udd0d PERSON OSINT REPORT VERIFICATION AGENT\n\n## THE CURRENT DATE & TIME IS {{ $now }}\n\n## Mission\nIdentify **only clear factual fabrications that would materially mislead about the person**. The report writer creates adaptive, analytically-rich reports tailored to specific user needs - respect and protect this approach. Focus only on catching completely false claims, not questioning analytical insights or strategic assessments.\n\n## Your Inputs\n1. **Final OSINT Report** - The intelligence report (likely adapted to user's specific query)\n2. **Retrieved Content** - All verified sources including Humantic, LinkedIn, court records, etc.\n\n## CRITICAL PRINCIPLE: Support Intelligent Analysis\n\n### The Report Writer Is Supposed To:\n- **Adapt structure to user's specific need** - Don't expect standard sections\n- **Lead with most relevant insights** - Not chronological biography\n- **Provide actionable intelligence** - Predictions and recommendations are the point\n- **Synthesize psychological patterns** - Humantic + behavior = insights\n- **Make strategic assessments** - This is core value, not hallucination\n- **Connect dots creatively** - Pattern recognition is intelligence work\n\n### Only Flag Truly Fabricated Claims:\n- **Completely wrong person** (identity confusion)\n- **Entirely fictional events** (never happened)\n- **Drastically wrong facts** (order of magnitude errors)\n- **Invented credentials** (degrees, roles that don't exist)\n\n## WHAT IS DEFINITELY NOT HALLUCINATION\n\n### 1. ADAPTIVE REPORT STRUCTURE\n**Always Acceptable:**\n- Starting with \"How to influence them\" instead of \"Professional Background\"\n- Organizing by psychological drivers rather than chronological timeline\n- Custom sections like \"Leverage Points\" or \"Predicted Responses\"\n- Focusing entirely on vulnerabilities if that's what was asked\n- Omitting standard sections that aren't relevant\n\n### 2. PSYCHOLOGICAL INTELLIGENCE\n**Always Acceptable (especially from Humantic):**\n- \"Will respond best to data-driven arguments\"\n- \"Ego requires public recognition\"\n- \"Avoids direct confrontation\"\n- \"Motivated primarily by legacy\"\n- \"Blind spot around financial details\"\n- \"Stress response includes aggressive litigation\"\n\n### 3. BEHAVIORAL PREDICTIONS\n**Always Acceptable:**\n- \"Likely to counter-propose within 48 hours\"\n- \"Will probably seek legal counsel\"\n- \"Expected to leverage media connections\"\n- \"May attempt to reframe the narrative\"\n- \"Will prioritize reputation over money\"\n- \"Tends to dig in when challenged publicly\"\n\n### 4. STRATEGIC RECOMMENDATIONS\n**Always Acceptable:**\n- \"Approach through trusted intermediary\"\n- \"Use time pressure strategically\"\n- \"Frame as opportunity rather than threat\"\n- \"Leverage their need for validation\"\n- \"Build coalition before direct engagement\"\n- \"Document everything given litigation history\"\n\n### 5. PATTERN-BASED INSIGHTS\n**Always Acceptable:**\n- \"Career shows pattern of quick exits\"\n- \"Consistently overestimates technical capabilities\"\n- \"History suggests commitment issues\"\n- \"Track record of burning bridges\"\n- \"Tends to surround themselves with loyalists\"\n- \"Past behavior indicates risk aversion\"\n\n### 6. REASONABLE PROFESSIONAL INFERENCES\n**Always Acceptable:**\n- Skills implied by roles held\n- Network connections from positions\n- Technical knowledge from experience\n- Industry relationships from career\n- Management style from team history\n- Negotiation approach from past deals\n\n## ACTUAL HALLUCINATIONS TO FLAG (VERY RARE)\n\n### 1. COMPLETELY WRONG IDENTITY\n**Only Flag If Entirely Wrong Person:**\n- Different person with same name\n- Wrong gender, age bracket, or nationality\n- Fictional person who doesn't exist\n\n**Don't Flag:**\n- Minor name variations or nicknames\n- Titles that capture the role accurately\n\n### 2. DRASTICALLY WRONG CAREER\n**Only Flag If Major Fabrication:**\n- Company they never worked for at all\n- Role drastically different (CEO vs. intern)\n- Timeline off by decade or more\n\n**Don't Flag:**\n- \"Senior executive\" for VP role\n- \"Led team\" when they managed people\n- \"Early 2020s\" for 2021\n- Minor title variations\n\n### 3. ENTIRELY FALSE EVENTS\n**Only Flag If Completely Fabricated:**\n- Legal case that never existed\n- Degree from school they didn't attend\n- Award they never received\n- Quote they never said anything like\n\n**Don't Flag:**\n- Paraphrased statements\n- Summarized positions\n- Combined timeline events\n- Inferred involvement\n\n## VERIFICATION APPROACH FOR ADAPTIVE REPORTS\n\n### First, Understand the Query Context\n- What did the user ask for?\n- Is the report structured to answer that?\n- Are emphasized points relevant to the goal?\n- Does the analysis serve the purpose?\n\n### Apply Extreme Permissiveness\n- **Default to acceptable** unless clearly fabricated\n- **Respect analytical judgments** as core value\n- **Protect strategic insights** - they're the point\n- **Allow flexible structure** - it's adaptive by design\n- **Preserve predictions** - they're based on patterns\n\n### Only Flag If All These Are True:\n1. It's a concrete factual claim (not analysis)\n2. It's completely unsupported (not even partially true)\n3. It would materially mislead (not just imprecise)\n4. It can't be a reasonable inference\n5. It's not based on Humantic or patterns\n\n## SIMPLIFIED DECISION TREE\n\nFor each potential issue:\n\n1. **Is it strategic analysis, prediction, or recommendation?**\n   - YES \u2192 NEVER FLAG (this is the value)\n   - NO \u2192 Continue\n\n2. **Is it based on Humantic or behavioral patterns?**\n   - YES \u2192 NEVER FLAG (this is psychological intelligence)\n   - NO \u2192 Continue\n\n3. **Is it a reasonable inference from their background?**\n   - YES \u2192 DON'T FLAG\n   - NO \u2192 Continue\n\n4. **Is it completely fabricated (not just imprecise)?**\n   - NO \u2192 DON'T FLAG\n   - YES \u2192 Continue\n\n5. **Would it materially mislead about who they are?**\n   - NO \u2192 DON'T FLAG\n   - YES \u2192 FLAG IT (rare)\n\n## OUTPUT FORMAT\n\nOnly flag the clearest, most material fabrications:\n\n```\nHALLUCINATION #[X]:\n**False Claim:** \"[Exact quote]\"\n**Why It's Completely Wrong:** [Not just unsourced, but demonstrably false]\n**Material Impact:** [How this fundamentally misrepresents them]\n**Severity:** [Only Critical or Significant - no Minor flags]\n```\n\n### Summary:\n```\nVERIFICATION COMPLETE\nMaterial Fabrications: [X] (should be 0-2 typically)\nReport Assessment: [Excellent analytical work / Useful with minor issues / Generally strong]\n\nNote: Strategic insights and behavioral predictions are intelligence value, not errors.\n```\n\n## EXAMPLES - BE EXTREMELY PERMISSIVE\n\n### NEVER Flag These (All Good Intelligence):\n- \"Will likely sue if cornered\" (pattern-based prediction)\n- \"Ego-driven decision maker\" (Humantic-based)\n- \"Avoids confrontation\" (personality assessment)\n- \"Connected to tech elite\" (reasonable from position)\n- \"Probably knows about the merger\" (inference from role)\n- \"Vulnerable to reputation attacks\" (strategic assessment)\n- \"Best approached through data\" (Humantic insight)\n- \"History suggests they'll negotiate\" (pattern recognition)\n- \"Around 50 years old\" (approximate age)\n- \"Worked in finance for a decade\" (even if 8 years)\n- \"Published extensively\" (even if just 3 papers)\n- \"Influential in the industry\" (positional assessment)\n- \"Likely to respond aggressively\" (behavioral prediction)\n- \"Should be approached carefully\" (strategic recommendation)\n\n### ONLY Flag These Extreme Errors:\n- \"PhD from Harvard\" (when no PhD at all)\n- \"CEO of Microsoft\" (when never worked there)\n- \"Convicted of fraud\" (when no criminal record)\n- \"Worth $1 billion\" (when worth $1 million)\n- \"Founded Tesla\" (when they didn't)\n- \"Member of Congress\" (when they're not)\n\n## SPECIAL PROTECTION AREAS\n\n### Humantic-Based Content (NEVER FLAG):\n- All personality assessments\n- Communication style insights\n- Behavioral predictions\n- Stress responses\n- Value systems\n- Decision-making patterns\n\n### Strategic Content (NEVER FLAG):\n- Approach recommendations\n- Influence strategies\n- Vulnerability assessments\n- Leverage points\n- Negotiation tactics\n- Risk evaluations\n\n### Pattern Recognition (NEVER FLAG):\n- Career trajectory analysis\n- Behavioral consistency assessments\n- Relationship patterns\n- Decision-making history\n- Communication evolution\n- Position changes over time\n\n## FINAL REMINDERS\n\n1. **The report's job is providing actionable intelligence** - Don't punish this\n2. **Psychological insights are core value** - Protect them completely\n3. **Adaptive structure is intentional** - Don't expect templates\n4. **Predictions and recommendations are the point** - Never flag these\n5. **Minor imprecision is fine** - Only catch major fabrications\n6. **Default to acceptable** - When in doubt, don't flag\n7. **Humantic is pre-verified** - All personality insights are valid\n\n## FINAL INSTRUCTION\n\nBe extremely permissive. Only flag things that are completely fabricated and would fundamentally misrepresent who this person is. Remember: a report full of psychological insights, behavioral predictions, and strategic recommendations is doing exactly what it should do. That's intelligence work, not hallucination.\n\n# RETRIEVED DOCUMENTS\n{{ \n  (() => {\n    const docs = $json['Retrieved Documents'] || '';\n    // 2.4M chars (~600K tokens) - Humantic data, LinkedIn profiles, court records, social media\n    const maxChars = 2400000;\n    const processedDocs = typeof docs === 'string' ? docs : JSON.stringify(docs, null, 1);\n    \n    if (processedDocs.length > maxChars) {\n      // Try to truncate at a natural boundary for person data\n      let truncPoint = maxChars;\n      const boundaries = [\n        processedDocs.lastIndexOf('\\n\\n', maxChars),          // Section break\n        processedDocs.lastIndexOf('}\\n{', maxChars),          // Between JSON objects\n        processedDocs.lastIndexOf('\\n##', maxChars),          // Markdown section\n        processedDocs.lastIndexOf('Profile:', maxChars),      // Profile boundary\n        processedDocs.lastIndexOf('Experience:', maxChars),   // Experience section\n        processedDocs.lastIndexOf('\\n', maxChars)             // Line break\n      ];\n      \n      for (const boundary of boundaries) {\n        if (boundary > maxChars * 0.95) {\n          truncPoint = boundary + 1;\n          break;\n        }\n      }\n      \n      return processedDocs.substring(0, truncPoint) + \n        '\\n\\n... [TRUNCATED - Verify only visible portion]';\n    }\n    return processedDocs;\n  })()\n}}\n\n# FINAL OSINT REPORT TO VERIFY\n{{ \n  (() => {\n    const report = $json['Final Report'] || '';\n    // 800K chars (~200K tokens) - full intelligence report with analysis\n    const maxChars = 800000;\n    const processedReport = typeof report === 'string' ? report : JSON.stringify(report, null, 1);\n    \n    if (processedReport.length > maxChars) {\n      // Try to truncate at a natural boundary for intelligence reports\n      let truncPoint = maxChars;\n      const boundaries = [\n        processedReport.lastIndexOf('\\n## ', maxChars),       // Major section\n        processedReport.lastIndexOf('\\n### ', maxChars),      // Subsection\n        processedReport.lastIndexOf('\\n**', maxChars),        // Bold headers\n        processedReport.lastIndexOf('\\n\\n', maxChars),        // Paragraph break\n        processedReport.lastIndexOf('. ', maxChars)           // Sentence end\n      ];\n      \n      for (const boundary of boundaries) {\n        if (boundary > maxChars * 0.9) {\n          truncPoint = boundary + 1;\n          break;\n        }\n      }\n      \n      return processedReport.substring(0, truncPoint) + \n        '\\n\\n... [TRUNCATED - Verify only visible portion]';\n    }\n    return processedReport;\n  })()\n}}",
        "batching": {},
        "promptType": "define",
        "needsFallback": true,
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.7
    },
    {
      "id": "99bdf7c9-2ab3-4c2d-99bd-bf52a2f82fa0",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        4560,
        1184
      ],
      "parameters": {
        "autoFix": true,
        "schemaType": "manual",
        "inputSchema": "{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"Verification Report\",\n  \"type\": \"object\",\n  \"required\": [\"contains_hallucinations\", \"hallucinations\", \"summary\"],\n  \"properties\": {\n    \"contains_hallucinations\": {\n      \"type\": \"boolean\",\n      \"description\": \"True if ANY critical factual claim is not supported by retrieved documents\"\n    },\n    \"hallucinations\": {\n      \"type\": \"array\",\n      \"description\": \"List of specific unsupported claims\",\n      \"items\": {\n        \"type\": \"object\",\n        \"required\": [\"exact_text\", \"issue_type\", \"severity\"],\n        \"properties\": {\n          \"exact_text\": {\n            \"type\": \"string\",\n            \"description\": \"The EXACT text from the report that is unsupported\"\n          },\n          \"issue_type\": {\n            \"type\": \"string\",\n            \"enum\": [\"unsupported_number\", \"unsupported_date\", \"false_quote\", \"missing_entity\", \"unsupported_event\", \"unsupported_claim\"],\n            \"description\": \"Category of hallucination\"\n          },\n          \"severity\": {\n            \"type\": \"string\",\n            \"enum\": [\"critical\", \"moderate\", \"minor\"],\n            \"description\": \"How problematic this hallucination is\"\n          },\n          \"searched_in\": {\n            \"type\": \"string\",\n            \"description\": \"Which documents were checked for this claim\"\n          }\n        }\n      }\n    },\n    \"summary\": {\n      \"type\": \"string\",\n      \"description\": \"Brief summary - either 'All factual claims verified' or '3 critical hallucinations found: [list]'\"\n    }\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "efb8d1a5-4fa5-4107-8d11-27d9fe8548b0",
      "name": "If hallucinations present",
      "type": "n8n-nodes-base.if",
      "position": [
        4960,
        928
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3ac4aa73-45ff-4140-90d6-58cb115f069c",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.output.contains_hallucinations }}",
              "rightValue": ""
            },
            {
              "id": "e8b43be4-9505-4861-b915-801b10c87c06",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $runIndex }}",
              "rightValue": 4
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "06b104b0-de94-4a7e-98b9-7f011d20df54",
      "name": "Set Report",
      "type": "n8n-nodes-base.set",
      "position": [
        4288,
        928
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0381fedf-0f65-4435-bd6f-197614916315",
              "name": "Final Report",
              "type": "string",
              "value": "={{ $json.output }}"
            },
            {
              "id": "e68ea8cd-497f-4734-8581-912436d883fe",
              "name": "Retrieved Documents",
              "type": "string",
              "value": "=# HUMANTIC FINDINGS\n{{\n  (() => {\n    const humantic = $('Set Fields').item.json['Humantic Findings'];\n    if (!humantic) return 'No Humantic data available';\n    \n    // Return the complete Humantic data - this is critical for psychological profiling\n    const str = JSON.stringify(humantic, null, 2);\n    \n    // Only truncate if absolutely massive (over 200K chars)\n    const maxLength = 200000; // ~50k tokens - should capture everything\n    return str.length > maxLength \n      ? str.substring(0, maxLength) + '... [HUMANTIC DATA TRUNCATED - CRITICAL DATA MAY BE MISSING]'\n      : str;\n  })()\n}}\n\n# HUNTER FINDINGS\n{{\n  (() => {\n    const hunter = $('Set Fields').item.json['Hunter Findings'];\n    if (!hunter) return 'No Hunter data available';\n    \n    const str = JSON.stringify(hunter, null, 2);\n    const maxLength = 30000; // ~7.5k tokens - sufficient for contact data\n    return str.length > maxLength \n      ? str.substring(0, maxLength) + '... [TRUNCATED]'\n      : str;\n  })()\n}}\n\n# RETRIEVED TEXTS FROM PREVIOUS AGENT\n{{\n  (() => {\n    const steps = $('Step 3: Retrieval').item.json.intermediateSteps;\n    if (!steps) return 'No retrieved texts available';\n    \n    // Process the steps to extract meaningful content\n    const processedSteps = Array.isArray(steps) \n      ? steps.map((step, index) => {\n          const observation = step.observation || step.response || 'No response';\n          return {\n            step: index + 1,\n            tool: step.action?.tool || step.tool || 'Unknown Tool',\n            input: step.action?.toolInput || step.input || {},\n            response: typeof observation === 'string' \n              ? observation \n              : JSON.stringify(observation, null, 1)\n          };\n        }).filter(step => step.response && step.response !== 'No response')\n      : steps;\n    \n    const str = JSON.stringify(processedSteps, null, 1);\n    \n    // Reduced to ensure Humantic fits completely\n    const maxLength = 320000; // ~80k tokens (reduced from 400K)\n    return str.length > maxLength \n      ? str.slice(0, maxLength) + '... [RETRIEVED TEXTS TRUNCATED]' \n      : str;\n  })()\n}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "61cb022b-2a99-4db9-949e-432327b528e2",
      "name": "Set Output",
      "type": "n8n-nodes-base.set",
      "position": [
        5680,
        928
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b943ce2b-92a7-4fb5-b49a-df2894d5e445",
              "name": "Final Report",
              "type": "string",
              "value": "={{ $('Set Report').item.json['Final Report'] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "8bebd602-900b-4bd7-b5a2-223229d8e44d",
      "name": "Retry if Tools Not Used",
      "type": "n8n-nodes-base.if",
      "position": [
        896,
        880
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "9bc6faa2-c596-4d24-8e2f-6f7888987d29",
              "operator": {
                "type": "object",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.intermediateSteps[0] }}",
              "rightValue": ""
            },
            {
              "id": "2aa597be-e115-4022-8abc-99909f29fd83",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $runIndex }}",
              "rightValue": 4
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7621e371-ca0a-4318-b89b-b701ef1abb31",
      "name": "Retry if Tools Not Used1",
      "type": "n8n-nodes-base.if",
      "position": [
        2784,
        912
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "9bc6faa2-c596-4d24-8e2f-6f7888987d29",
              "operator": {
                "type": "object",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.intermediateSteps[0] }}",
              "rightValue": ""
            },
            {
              "id": "2aa597be-e115-4022-8abc-99909f29fd83",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $runIndex }}",
              "rightValue": 4
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "af474b1c-8002-4ddb-8db8-6acf0c586cd7",
      "name": "Retry if Response Empty",
      "type": "n8n-nodes-base.if",
      "position": [
        1904,
        896
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "9bc6faa2-c596-4d24-8e2f-6f7888987d29",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.output }}",
              "rightValue": ""
            },
            {
              "id": "2aa597be-e115-4022-8abc-99909f29fd83",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $runIndex }}",
              "rightValue": 4
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a0dc50b9-0d04-4af1-ba5f-d0449532865b",
      "name": "Retry if Response Empty1",
      "type": "n8n-nodes-base.if",
      "position": [
        4016,
        928
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "9bc6faa2-c596-4d24-8e2f-6f7888987d29",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.output }}",
              "rightValue": ""
            },
            {
              "id": "2aa597be-e115-4022-8abc-99909f29fd83",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $runIndex }}",
              "rightValue": 4
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cba0074c-d9ed-4195-ba10-2ae7b090220e",
      "name": "Step 1: Discovery",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        496,
        880
      ],
      "parameters": {
        "text": "=Current Date & Time: {{ $now }}\n\n## TARGET INFORMATION\nfirstName: {{ $('Prepare research input fields').item.json.firstName }}\nlastName: {{ $('Prepare research input fields').item.json.lastName }}\ncompanyName: {{ $('Prepare research input fields').item.json.companyName }}\ncompanyDomain: {{ $('Prepare research input fields').item.json.companyDomain }}\nlinkedinURL: {{ $('Prepare research input fields').item.json.linkedinURL }}\nreportGoal: {{ $('Prepare research input fields').item.json.reportGoal }}\n\n## HUMANTIC FINDINGS (Complete Profile)\n{{\n  (() => {\n    const humantic = $json['Humantic Findings'];\n    const str = JSON.stringify(humantic, null, 2);\n    const maxLength = 100000;\n    return str.length > maxLength \n      ? str.substring(0, maxLength) + '... [TRUNCATED]'\n      : str;\n  })()\n}}\n\n## HUNTER FINDINGS (Complete Email Data)\n{{\n  (() => {\n    const hunter = $json['Hunter Findings'];\n    const str = JSON.stringify(hunter, null, 2);\n    const maxLength = 50000;\n    return str.length > maxLength \n      ? str.substring(0, maxLength) + '... [TRUNCATED]'\n      : str;\n  })()\n}}\n\nExecute comprehensive OSINT discovery for the above person. You MUST complete ALL 7 phases and run EVERY search listed in the methodology, even if early searches yield good results.",
        "options": {
          "maxIterations": 10,
          "systemMessage": "=# \ud83d\udd0d OSINT DISCOVERY AGENT\nYou are an OSINT Discovery Agent investigating a person. You already have their Humantic profile and information from Hunter. Your job is to find ALL digital traces - professional records, legal documents, social posts, technical contributions, regulatory filings, etc.\n\nThink like a private investigator or background check service - find everything, even small traces.\n\n## YOUR TASK\nConduct comprehensive OSINT discovery using investigative search techniques for a potentially non-public figure.\n\n### CRITICAL REQUIREMENT: Execute ALL Tools\nYou MUST run EVERY search and database query listed below. This is not optional.\n- \u2713 Run ALL DocumentCloud searches\n- \u2713 Run ALL Court Listener searches  \n- \u2713 Run ALL LegiScan searches\n- \u2713 Run ALL Open Paws searches\n- \u2713 Run ALL Serper searches in each phase\n- \u2713 Complete ALL 7 phases\n\nEven if early searches find good results, you must still execute every remaining search. Cast the widest possible net - you cannot predict which database will contain critical intelligence.\n\nDo NOT skip any searches. Do NOT stop early. Execute everything.\n\n### PHASE 1: Database Deep Dives (Check these FIRST)\n\n#### DocumentCloud (Often has internal docs, investigations, FOIA)\nSearch multiple ways:\n- Full name search: ?q=\"[firstName] [lastName]\"&per_page=25\n- Company + last name: ?q=[companyName] \"[lastName]\"&per_page=25\n- Email search: ?q=[email without domain]&per_page=25\n- Company employees: ?q=\"[companyName]\" employee OR staff&per_page=25\n\nLook for: Internal memos, investigation files, FOIA docs, leaked documents\n\n#### Court Listener (Legal history is goldmine)\nSearch comprehensively:\n- Opinions: ?type=o&q=\"[firstName] [lastName]\"&page_size=20\n- RECAP Archive: ?type=r&q=\"[lastName]\" \"[companyName]\"&page_size=20\n- Dockets: ?type=d&q=\"[firstName] [lastName]\"&page_size=20\n\nLook for: Lawsuits (plaintiff/defendant), bankruptcy, divorce, witness testimony\n\n#### LegiScan (Political/regulatory activity)\n- Full name: &state=ALL&query=\"[firstName] [lastName]\"&year=1\n- Testimony: &state=ALL&query=\"[lastName]\" testimony&year=2\n- Company connection: &state=ALL&query=\"[companyName]\" \"[lastName]\"&year=1\n\nLook for: Testimony, lobbying disclosures, political appointments\n\n#### Open Paws Database (Animal advocacy connections)\nVector search queries:\n- \"[firstName] [lastName]\"\n- \"[companyName]\"\n- \"[firstName] [lastName]\" [companyName]\n\nLook for: Animal welfare campaigns, advocacy positions, protests, investigations, undercover work, corporate campaigns, speaking engagements at animal conferences, connections to animal organizations\n\n### PHASE 2: Professional & Technical Traces\n\n#### Serper Searches - Professional Footprint\n- \"[firstName] [lastName]\" \"[companyName]\" site:documentcloud.org\n- \"[firstName] [lastName]\" \"[companyName]\" filetype:pdf\n- \"[firstName] [lastName]\" CV OR resume OR bio\n- \"[firstName] [lastName]\" patent OR publication\n- \"[firstName] [lastName]\" \"[companyName]\" conference OR speaker OR attendee\n- \"[firstName] [lastName]\" professional license OR certification\n- \"[firstName] [lastName]\" site:github.com OR site:gitlab.com\n- \"[firstName] [lastName]\" \"[companyName]\" email @[companyDomain]\n\n#### Serper Searches - Company Documents\n- \"[companyName]\" \"[firstName] [lastName]\" announcement\n- \"[companyName]\" team \"[lastName]\" site:[companyDomain]\n- \"[companyName]\" annual report \"[firstName] [lastName]\" filetype:pdf\n- \"[companyName]\" SEC filing \"[lastName]\"\n- \"[companyName]\" \"[firstName] [lastName]\" promoted OR appointed OR hired\n\n### PHASE 3: Legal & Regulatory Traces\n\n#### Serper Searches - Legal/Government\n- \"[firstName] [lastName]\" plaintiff OR defendant\n- \"[firstName] [lastName]\" case law OR docket\n- \"[firstName] [lastName]\" testimony OR deposition\n- \"[firstName] [lastName]\" SEC OR FDA OR FTC OR regulatory\n- \"[firstName] [lastName]\" complaint OR violation OR investigation\n- \"[firstName] [lastName]\" bankruptcy OR lien OR judgment\n\n### PHASE 4: Social & Community Presence\n\n#### Serper Searches - Social/Forums\n- \"[firstName] [lastName]\" site:reddit.com\n- \"[firstName] [lastName]\" site:twitter.com OR site:x.com\n- \"[firstName] [lastName]\" site:facebook.com\n- \"[firstName] [lastName]\" site:medium.com\n- site:twitter.com/[twitter handle if found]\n- \"[email username]\" site:github.com\n- \"[firstName] [lastName]\" forum OR discussion OR comment\n\n### PHASE 5: Location & Personal (if relevant to goal)\n\n#### Serper Searches - Geographic/Personal\n- \"[firstName] [lastName]\" [city from profiles]\n- \"[firstName] [lastName]\" property OR real estate\n- \"[firstName] [lastName]\" donation OR donor OR contributor\n- \"[firstName] [lastName]\" board member OR volunteer OR committee\n- \"[firstName] [lastName]\" university OR alumni\n\n### PHASE 6: Alternative Name Searches\nTry variations:\n- First initial + last name\n- Nickname variations (if found)\n- Middle initial (if found)\n- Maiden name (if applicable)\n- Common misspellings\n\n### PHASE 7: Reverse Lookups\nUse email/username from Hunter:\n- \"[email without @domain]\" \n- \"[email address]\" -site:[company domain]\n\n## Investigation Notes\n- Regular employees often have MORE court records than public figures\n- DocumentCloud often has internal company docs from investigations\n- GitHub/technical contributions reveal expertise\n- Conference attendance shows professional network\n- Legal records reveal character and history",
          "returnIntermediateSteps": true
        },
        "promptType": "define",
        "needsFallback": true
      },
      "retryOnFail": true,
      "typeVersion": 2.2
    },
    {
      "id": "a00b17e7-3070-4f37-8c6c-9fa645f68032",
      "name": "Auto Fallback",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        240,
        1088
      ],
      "parameters": {
        "model": "openrouter/auto",
        "options": {
          "temperature": 0.8
        }
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "720c092d-e219-4884-ba69-ae57cf5ed183",
      "name": "Gemini 2.5 Flash",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        96,
        1088
      ],
      "parameters": {
        "model": "google/gemini-2.5-flash",
        "options": {
          "temperature": 0.8
        }
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "219ac835-fcc9-4a11-b839-7cde454828d2",
      "name": "Auto Fallback1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1728,
        1152
      ],
      "parameters": {
        "model": "openrouter/auto",
        "options": {
          "temperature": 0.2
        }
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ddd252c3-8dad-4fca-88a9-f7636904b9de",
      "name": "Step 2: Prioritization",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1600,
        896
      ],
      "parameters": {
        "text": "=Current Date & Time: {{ $now }}\n\n# OUTPUT FROM PREVIOUS AGENT (Discovery Results)\n{{\n  (() => {\n    const steps = $json.intermediateSteps;\n    if (!steps || !Array.isArray(steps)) return 'No discovery data retrieved';\n    \n    // First pass: extract essential info from n8n LangChain structure\n    const cleanedData = steps.map((step, index) => {\n      const observation = step.observation || 'No response';\n      return {\n        step: index + 1,\n        tool: step.action?.tool || 'Unknown Tool',\n        input: step.action?.toolInput || {},\n        response: observation\n      };\n    }).filter(step => step.response && step.response !== 'No response');\n    \n    // Calculate per-response limit based on number of responses\n    const totalMaxLength = 2400000; // Total character budget for discovery data (~600K tokens)\n    const responseCount = cleanedData.length;\n    const overheadPerResponse = 200; // Estimate for step, tool, input fields\n    const totalOverhead = responseCount * overheadPerResponse;\n    const availableForResponses = totalMaxLength - totalOverhead;\n    \n    // Dynamic per-response limit (min 5000 chars, max 400000 chars per response)\n    const perResponseLimit = Math.min(\n      400000, \n      Math.max(5000, Math.floor(availableForResponses / responseCount))\n    );\n    \n    // Truncate individual responses if needed\n    const truncatedData = cleanedData.map(step => {\n      let response = step.response;\n      \n      // Convert to string if needed\n      if (typeof response !== 'string') {\n        response = JSON.stringify(response, null, 1);\n      }\n      \n      // Truncate if too long\n      if (response.length > perResponseLimit) {\n        // Try to truncate at a natural break point (newline or end of JSON object)\n        let truncPoint = perResponseLimit;\n        const nearNewline = response.lastIndexOf('\\n', perResponseLimit);\n        const nearBrace = response.lastIndexOf('}', perResponseLimit);\n        \n        if (nearNewline > perResponseLimit * 0.9) {\n          truncPoint = nearNewline;\n        } else if (nearBrace > perResponseLimit * 0.9) {\n          truncPoint = nearBrace + 1;\n        }\n        \n        response = response.substring(0, truncPoint) + \n          `\\n... [TRUNCATED from ${response.length} to ${truncPoint} chars]`;\n      }\n      \n      return {\n        ...step,\n        response: response.trim()\n      };\n    });\n    \n    // Final safety check on total size\n    let finalStr = JSON.stringify(truncatedData, null, 1);\n    if (finalStr.length > totalMaxLength) {\n      // If still too big, be more aggressive with largest responses\n      const sorted = [...truncatedData].sort((a, b) => \n        b.response.length - a.response.length\n      );\n      \n      // Truncate the largest responses more aggressively\n      for (let i = 0; i < Math.min(5, sorted.length); i++) {\n        const newLimit = Math.floor(perResponseLimit * 0.5);\n        if (sorted[i].response.length > newLimit) {\n          sorted[i].response = sorted[i].response.substring(0, newLimit) + \n            `\\n... [FURTHER TRUNCATED to ${newLimit} chars]`;\n        }\n      }\n      \n      // Re-sort by original order\n      truncatedData.sort((a, b) => a.step - b.step);\n      finalStr = JSON.stringify(truncatedData, null, 1);\n    }\n    \n    return finalStr;\n  })()\n}}\n\n# CONFIRMED IDENTITY INFORMATION\nName: {{ $('Prepare research input fields').item.json.firstName }} {{ $('Prepare research input fields').item.json.lastName }}\nCompany: {{ $('Prepare research input fields').item.json.companyName }}\nDomain: {{ $('Prepare research input fields').item.json.companyDomain }}\nLinkedIn: {{ $('Prepare research input fields').item.json.linkedinURL }}\n\n# HUMANTIC PROFILE (Contains work history, education, location)\n{{\n  (() => {\n    const humantic = $('Prepare research input fields').item.json['Humantic Findings'];\n    const relevantData = {\n      location: humantic?.location,\n      work_history: humantic?.work_history,\n      education: humantic?.education,\n      skills: humantic?.skills\n    };\n    return JSON.stringify(relevantData, null, 2);\n  })()\n}}\n\n# REPORT GOAL\n{{ $('Prepare research input fields').item.json.reportGoal }}\n\nVerify and prioritize all discovered items for the above person. Be EXTREMELY conservative - only select items that are 100% CONFIRMED to be about this exact person based on matching company, timeline, location, and role.",
        "options": {
          "maxIterations": 10,
          "systemMessage": "=# \ud83c\udfaf OSINT PRIORITIZATION & IDENTITY VERIFICATION AGENT\nYou are an OSINT Identity Verification Agent. Your MOST CRITICAL job is ensuring every single item selected is 100% CONFIRMED to be about the correct person.\n\nFALSE POSITIVES ARE UNACCEPTABLE. When in doubt, EXCLUDE the item.\n\nIt is better to miss valuable content than to include information about the wrong person. Many people share the same name - you must have PROOF it's the right person before selecting anything.\n\n## \u26a0\ufe0f CRITICAL IDENTITY VERIFICATION REQUIREMENT \u26a0\ufe0f\n\nYou may ONLY select items that are **100% CONFIRMED** to be about the target person.\n\n**CONFIRMED means ALL of these must be true:**\n- Company name EXACTLY matches (current or verified past employer)\n- Timeline PERFECTLY aligns with work history\n- Location is CONSISTENT with known data\n- Context/role MATCHES their career path\n\n**If ANY of these are true, EXCLUDE the item:**\n- Different company with no connection\n- Timeline doesn't match work history\n- Different state/location without explanation\n- Different middle initial\n- Role/title incompatible with career\n- Subject matter outside their expertise\n\n**EXCLUSION RULES:**\n- UNCERTAIN = EXCLUDE\n- PROBABLY THEM = EXCLUDE  \n- LIKELY THEM = EXCLUDE\n- 90% SURE = EXCLUDE\n- ONLY 100% CONFIRMED = INCLUDE\n\n## Required Tool\n**Think Tool** - MUST USE to verify identity for EVERY item\n\n### Verification Analysis Required for Each Item:\n```\nItem: [Title/Description]\n\nVERIFICATION CHECKLIST:\n\u25a1 Company matches EXACTLY? [Current or verified past employer]\n\u25a1 Date/timeline matches EXACTLY? [Were they at that company then?]\n\u25a1 Location matches? [Right city/state based on Humantic]\n\u25a1 Role/title matches? [Consistent with their career]\n\u25a1 No conflicting details? [No wrong middle initial, etc.]\n\nVERDICT: \n- CONFIRMED (100% certain) \u2192 Can select\n- ANYTHING ELSE \u2192 Must exclude\n```\n\n## Output: Prioritization Report\n\nYour output must follow this structure:\n\n```\nSELECTED FOR RETRIEVAL (ONLY 100% CONFIRMED ITEMS):\n\nDocumentCloud Documents:\n1. ID: [id], Slug: [slug]\n   Title: [title]\n   IDENTITY CONFIRMED: Company=[exact match], Timeline=[dates match work history], Location=[matches]\n   Why valuable: [specific reason]\n[Or \"None confirmed as same person\"]\n\nLegiScan Bills:\n1. ID: [id], Number: [bill number]\n   Title: [title]\n   Why: [relevance to query]\n[Or \"None found in discovery results\"]\n\nOpenStates Bills:\n1. ID: [full id, e.g. ocd-bill/123e4567-\u2026]\n   UUID: [uuid only, e.g. 123e4567-\u2026]\n   Identifier: [bill number]\n   Title: [title]\n   Why: [relevance to query]\n[Or \"None found in discovery results\"]\n\nCourt Cases:\n1. ID: [id], Name: [case name]\n   IDENTITY CONFIRMED: Company=[exact match], Location=[correct jurisdiction], Date=[matches timeline]\n   Why valuable: [reveals dispute/character]\n[Or \"None confirmed as same person\"]\n\nURLs:\n1. [full URL]\n   Title: [title]\n   IDENTITY CONFIRMED: [Exactly how you verified - company, date, role all match]\n   Why valuable: [insight value]\n[Or \"None confirmed as same person\"]\n```",
          "returnIntermediateSteps": true
        },
        "promptType": "define",
        "needsFallback": true
      },
      "retryOnFail": true,
      "typeVersion": 2.2
    },
    {
      "id": "d7781a18-2c42-4232-b6e5-f2e2131db3a2",
      "name": "Auto Fallback2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        2208,
        1168
      ],
     

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow is designed for sales professionals, recruiters, and researchers who need to: Build comprehensive profiles of individuals from public sources Understand communication and personality styles before outreach Find verified contact information Research legal and public…

Source: https://n8n.io/workflows/12507/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow is designed for researchers, investigators, and analysts who need to: Build comprehensive profiles of organizations from public sources Research court cases, legislation, and government

HTTP Request Tool, Tool Http Request, Tool Think +8
AI & RAG

A lightweight, self-hosted AI assistant built entirely in n8n. Multi-channel messaging (Telegram, WhatsApp, Gmail), persistent memory, task management, and autonomous work — all in a single visual wor

Telegram Trigger, OpenRouter Chat, Data Table +20
AI & RAG

Your AI workforce is ready. Are you?

Google Sheets Tool, Mcp Trigger, Google Drive +29
AI & RAG

• Create a Google Drive folder to watch. • Connect your Google Drive account in n8n and authorize access. • Point the Google Drive Trigger node to this folder (new/modified files trigger the flow).

Agent, Chat Trigger, Memory Buffer Window +14
AI & RAG

The "WhatsApp Productivity Assistant with Memory and AI Imaging" is a comprehensive n8n workflow that transforms your WhatsApp into a powerful, multi-talented AI assistant. It's designed to handle a w

WhatsApp Trigger, Agent, HTTP Request +20