n8n: AI automation, AI support agents and integration middleware

n8n: AI automation, AI support agents and integration middleware

What it is

n8n is an external workflow automation platform that 3B Onboarding is designed to work alongside. It is not part of the managed package, and this article does not cover installing or building n8n workflows node by node. Instead it explains the three roles n8n plays in a 3B Onboarding rollout, and how to wire each role to the objects, fields, components and metadata you already have in your Salesforce org.

The three roles are:

  1. AI automation platform: orchestrate LLM-driven steps in onboarding and credentialling (summarise a candidate's documents, extract data from an uploaded certificate, draft a compliance decision for a specialist to approve).
  2. AI support-agent platform: power the AI Agent Chat and AI Form components that 3B Onboarding embeds in candidate portals, so a candidate can ask "what documents do I still need?" and get an answer grounded in org data.
  3. Integration middleware: sit between Salesforce and external systems (job boards, ATS, background-check and credential-verification providers, e-sign, messaging/WhatsApp/email) so 3B Onboarding stays the system of record while n8n moves data in and out.

Across all three, the design principle is the same: Salesforce (3B Onboarding) is the system of record; n8n is the moving parts around it. Candidate state, document packs, requested documents, compliance items and certificates live in Salesforce. n8n reacts to them, enriches them, or feeds external systems from them.

This matters for the verticals 3B Onboarding serves. Healthcare, Education and Blue-Collar staffing all depend on repeated, time-boxed checks against third-party systems and on chasing candidates for the right evidence. That is exactly the work n8n is good at automating.

The problem it solves

3B Onboarding models the credentialling lifecycle well: document packs, conditional requested documents, compliance requirements, certificates and expiry. But a real staffing operation also has to:

Salesforce Flow can do some of this, but it is not the right tool for long-running, many-step, retry-heavy calls to flaky external APIs, and it is not where you want to host LLM prompt logic or hold third-party credentials. n8n absorbs that responsibility and keeps Salesforce clean.

Who uses it

How n8n connects to 3B Onboarding today

3B Onboarding already ships two native components that are backed by an n8n endpoint, plus an org-level setting that points at it.

The org-level endpoint setting

Object Field Type Purpose
b3o__Onboarding_Default_Settings__c (custom setting) b3o__N8N_Endpoint__c URL Base URL of your n8n instance. Injected into the host pages as the AI endpoint. Default value ships as https://n8n.3bapi.com; set this to your own n8n instance.
b3o__Onboarding_Default_Settings__c b3o__Site_URL__c URL Site / portal base URL used by the host pages. Must be populated or the host page will warn on load.

Set b3o__N8N_Endpoint__c once, per org, to the base URL of the n8n instance you control. Every embed reads from it, so you do not repeat the URL per component.

The AI Agent Chat component

Design properties you set when you drop the native component onto a page:

Property Required What it does
chatId Yes The Chat ID of the AI Agent workflow in n8n. This selects which n8n workflow answers the conversation.
themeType Yes Visual theme (light, dark, and other named themes).
height Yes Component height in pixels.
title / subtitle No Header text.
initialMessage No A pre-set opening message from the agent.
inputPlaceholder No Placeholder text in the message box.
allowFileUploads No Whether the candidate can attach files to the conversation.
allowedFilesMimeTypes No Comma-separated list of accepted MIME types.

When surfaced through the AI Chat Component portal block, the same values are set as block traits, plus context traits the portal fills in automatically: record-id (defaults to the portal contact, {{contactUser.Id}}), object-name (default Contact), action-name (default portal_chat), and ai-endpoint (defaults to the n8n base URL).

The AI Form component

Design properties:

Property Required What it does
formId Yes The production Form ID from n8n. Selects which n8n form workflow drives the experience.
themeType Yes Visual theme.
height Yes Component height in pixels.

How the embed reaches n8n

Both components point at your n8n base URL (b3o__N8N_Endpoint__c) and use the chatId / formId to select the specific workflow. The candidate's browser talks to the n8n webhook for that workflow; the AI Agent Chat conversation posts to a webhook path derived from the base URL and the Chat ID. Every request carries a small block of context metadata so the workflow knows who and what the conversation is about:

That context is what lets an n8n workflow answer "what documents do I still need?": it takes the recordId (the candidate contact), queries Salesforce for that contact's requested documents / compliance items, and composes an answer.

Example: candidate context sent to an AI agent

The payload below is illustrative only. It shows the shape of the context that accompanies a candidate message so an n8n workflow can ground its answer in org data. Do not treat field names here as guaranteed API names; treat them as the kind of context available.

{
  "action": "sendMessage",
  "chatId": "onboarding-help",
  "message": "What documents do I still need to upload?",
  "metadata": {
    "userType": "Guest",
    "userId": "005XXXXXXXXXXXXXXX",
    "orgId": "00DXXXXXXXXXXXXXXX",
    "objectName": "Contact",
    "recordId": "003XXXXXXXXXXXXXXX",
    "actionName": "portal_chat",
    "sessionContext": "<session-context>"
  }
}

A grounded response from the workflow might look like this. The workflow, not the browser, has done the Salesforce lookup and any LLM call:

{
  "reply": "You have 2 documents outstanding: your DBS certificate and your right-to-work evidence. Your first-aid certificate is on file and approved. Would you like the upload link for the DBS certificate?",
  "grounding": {
    "outstandingCount": 2,
    "requestedDocuments": ["DBS Certificate", "Right to Work Evidence"],
    "completedDocuments": ["First Aid Certificate"]
  },
  "suggestedActions": [
    { "label": "Upload DBS certificate", "actionName": "open_document", "recordId": "a0XXXXXXXXXXXXXXXX" }
  ]
}

The important point: the candidate's browser never queried Salesforce directly and never held Salesforce credentials. It sent a message plus signed session context; n8n did the privileged work.

The two integration directions

Beyond the embedded AI components, n8n as middleware works in both directions.

Salesforce to n8n (outbound)

Trigger an n8n workflow from something that happens in the org:

Typical outbound triggers in staffing:

n8n to Salesforce (inbound)

Have n8n write results back into 3B Onboarding:

Both engines are idempotent and safe to re-run, which is exactly what you want an external system calling in to rely on.

Concrete staffing examples

Healthcare

Education

Blue-Collar

In every case, 3B Onboarding holds the authoritative record (document pack, requested documents, compliance items, certificates) and n8n does the outside work.

When to reach for n8n vs native Salesforce Flow

Use Flow when the work is:

Reach for n8n when the work is:

A good default: keep the decision and the record state in Salesforce; keep the orchestration, the external calls and the AI in n8n.

Access and permissions