Corporate Investigation Workflow (n8n)
Investigative Tools

Corporate Investigation Workflow (n8n)

Skip to main content
Table of Contents
< All Topics
Print

Corporate Investigation Workflow (n8n)

Pattern: Follow the money — entity identification → registry lookup → contract cross-reference → network graph

Skills used: corporate-intelligence-investigator, public-records-research-specialist, network-analysis-specialist


Workflow overview


[Webhook Trigger] → [Compose Workflow] → [Entity Lookup] → [OpenCorporates Check]
    → [USAspending Cross-ref] → [Build Edge List] → [Output Report]

Node chain

1. Webhook Trigger

  • Type: Webhook (POST)
  • Path: /webhook/corporate-investigation
  • Body schema:

  {
    "entity_name": "Acme Holdings LLC",
    "jurisdiction": "US-DE",
    "context": "Vendor on DOD contract FA8075-24-C-0001"
  }

2. Compose Investigation Plan

  • Type: HTTP Request
  • Method: POST
  • URL: {{ $vars.PATRIOT_API_URL }}/investigate/workflow
  • Auth: Patriot API credential
  • Body:

  {
    "question": "Investigate {{ $json.entity_name }} for potential conflicts of interest in government contracting",
    "context": "{{ $json.context }}"
  }

3. Entity Lookup (KB cross-reference)

  • Type: HTTP Request
  • Method: POST
  • URL: {{ $vars.PATRIOT_API_URL }}/investigate/entity-lookup
  • Body:

  {
    "query": "{{ $json.entity_name }}",
    "categories": ["accountability", "investigative"],
    "limit": 10
  }
  • Purpose: Check if the entity (or related names) appears in accountability profiles or existing KB documents.

4. OpenCorporates Registry Check (optional — requires API key)

  • Type: HTTP Request
  • Method: GET
  • URL: https://api.opencorporates.com/v0.4/companies/search
  • Query params: q={{ $json.entity_name }}&jurisdiction_code={{ $json.jurisdiction }}&api_token={{ $credentials.opencorporates }}
  • Skip condition: If OPENCORPORATES_API_TOKEN is not configured, skip this node and proceed with KB-only results.

5. USAspending Cross-reference

  • Type: HTTP Request
  • Method: GET
  • URL: https://api.usaspending.gov/api/v2/search/spending_by_award/
  • Body:

  {
    "filters": {
      "recipient_search_text": ["{{ $json.entity_name }}"]
    }
  }
  • Note: USAspending API is free and requires no API key.

6. Build Edge List

  • Type: Code (JavaScript)
  • Purpose: Merge results from steps 3-5 into a structured edge list:

  entity → officer (from OpenCorporates)
  entity → contract (from USAspending)
  entity → accountability_profile (from KB lookup)
  • Output: JSON array of { subject, predicate, object, source_url, evidence_tier } edges.

7. Output Report

  • Type: Respond to Webhook
  • Body: Combined investigation report with workflow plan, entity matches, registry results, contract cross-references, and the edge list.

Evidence tiers applied

Source Tier
OpenCorporates registry filing Documented
USAspending contract award Documented
KB accountability profile match Per profile’s own tier
Inferred relationship (officer → contract) AI-inferred — requires human verification

When to use

  • Investigating government contractors for conflicts of interest
  • Vetting vendors named in FOIA productions
  • Cross-referencing campaign donors with contract recipients
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
Please Share Your Feedback
How Can We Improve This Article?