Skip to content

n8n Setup

Required Nodes

Recommended workflow nodes:

  • Webhook Trigger
  • Salesforce Get Record
  • HTTP Request or AI Agent for external research
  • Code node for normalization and mapping
  • Salesforce Upsert or Create Record for enrichment records
  • Respond to Webhook
  • Error Trigger or separate error handler workflow

Flow

  1. Receive Salesforce webhook request.
  2. Read data.entity and data.id.
  3. Load the Salesforce source record.
  4. Enrich the company or person data.
  5. Normalize values according to ai-configs/schemas/output-structure.schema.json.
  6. Write the result to the matching enrichment object.
  7. Return HTTP 202 or 200 to Salesforce.

Error Handling

On enrichment failure, update the related EnrichmentRun__c or source record with a clear error message so the Salesforce panel can show the failure state.