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¶
- Receive Salesforce webhook request.
- Read
data.entityanddata.id. - Load the Salesforce source record.
- Enrich the company or person data.
- Normalize values according to
ai-configs/schemas/output-structure.schema.json. - Write the result to the matching enrichment object.
- Return HTTP
202or200to 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.