Implementation Guide for Healthcare

    Keeping PHI out of n8n execution data and saved execution history

    To keep PHI out of n8n execution data, restrict what the instance saves (successful, failed, and manual runs, plus progress saving), set pruning windows, design workflows so nodes pass record references instead of identifiers, and treat the execution database, backups, and any log sinks as systems that may hold ePHI. Configuration cannot remove data already written or control what is sent to AI models and third-party tools. That gap is where runtime policy enforcement applies.

    Why execution history is a PHI data store

    An n8n execution record exists so that engineers can see what a workflow did. To do that it holds node inputs and outputs, trigger payloads, and the details of failed runs. When a workflow touches patient data, those records can hold names, identifiers, and clinical content for as long as the record exists.

    The HIPAA Security Rule sets national standards for protecting electronic protected health information that a covered entity or business associate creates, receives, uses, or maintains. Execution history that holds ePHI is maintained ePHI. It sits in a database, is copied into backups, and is visible to anyone who can open the editor. HHS stresses that documenting which values in health data are PHI, and which systems manage PHI, is of great importance. For an automation platform, that means the execution store belongs in the inventory alongside the systems the workflows connect.

    The practical goal is to scope this store, minimize what enters it, and be able to show what was stored, where, and for how long.

    Step 1: Configure what n8n saves and for how long

    Start with instance-level settings, then apply per-workflow overrides where a specific workflow needs different handling. The aim is to save the least data that still lets your team operate the workflow. Confirm the exact setting names and defaults for your n8n version in your own environment before you roll changes out.

    Work through the following decisions in order, and record each one so you can later show what was configured and when it changed.

    • Successful executions: Decide whether successful runs are saved at all. For workflows that handle patient data, not saving them is the most direct way to avoid accumulating PHI.
    • Failed executions: Failed runs are the ones engineers most want to keep, and they often hold the full payload that caused the failure. Decide per workflow whether that trade is acceptable.
    • Manual executions: Test runs by developers can use real records. Disable saving for manual runs in production, and use synthetic data in development.
    • Progress saving: Saving state at each step writes intermediate data to storage. Turn it off for PHI-bearing workflows unless resumability is required.
    • Pruning and retention: Set a maximum age and a maximum count so records expire on a schedule. Choose the window from your retention decision, not from storage convenience.
    • Per-workflow settings: Use workflow-level options to tighten handling for the workflows that touch PHI, so a permissive instance default does not apply to them.

    Step 2: Map where PHI can persist beyond the execution list

    The visible execution list is only one location. Inventory each place a run can leave data: the execution database, binary data storage for files and attachments, error workflow payloads that forward failure context to another workflow, webhook request data, any components added in queue-mode deployments, database backups, and external log streams or monitoring sinks.

    For each location, record who can read it, how long it is retained, and how it is purged. Pruning an execution does not by itself reach a backup taken before the prune, and it does not reach a copy forwarded to an alerting channel or log sink. Error workflows deserve particular attention, because they are built to carry failure context outward, often to chat or ticketing tools with their own retention.

    Access belongs in the same inventory. HHS identifies Information Access Management and Access Control as Security Rule standards governing access to ePHI, and notes that network segmentation and network access control can limit access to systems holding ePHI. Applied here, that means restricting who can open executions in the editor, who can reach the database, and who can read backups and log sinks.

    Step 3: Design workflows that do not carry PHI

    Configuration reduces what is retained. Design reduces what exists to be retained. Four patterns do most of the work.

    Pass record references instead of PHI. A workflow that moves a record identifier and fetches the data only in the step that needs it leaves little behind in upstream node outputs. Minimize node output, so that each node returns only the fields the next step uses. Filter or mask fields as early as possible, before downstream nodes receive them. Keep secrets and patient data in credentials and external stores rather than in workflow parameters.

    Two cautions apply. First, identifiers appear in free text as well as structured fields. HHS de-identification guidance makes no distinction between the two, and an identifier must be removed wherever it appears if it is recognizable as one. Masking logic that inspects only named fields will miss clinician notes, error messages, and message bodies. Second, suppressing or generalizing fields does not give absolute privacy guarantees, because remaining data may be re-identified using auxiliary data. Treat masked output as still sensitive, and keep access limits in place.

    Debuggability is the cost of these patterns. Plan for it by logging record references and step outcomes, so an engineer can trace a failure back to the source system without the payload being stored.

    What configuration alone does not cover

    Native settings govern what n8n writes and keeps. They do not undo data that was written before the change, and they do not reach backups, external log sinks, or copies forwarded by error workflows. They also do not control what a workflow sends to an AI model or a third-party tool. Once a prompt containing PHI leaves the workflow, retention is governed by the receiving system.

    There is also an evidence gap. A retention setting shows intent. It does not show what was stored on a given day, or what a node did with a record. An auditor asking which PHI was stored, where, and for how long needs records produced by the controls themselves, supported by your system inventory and change history for the settings above.

    For workflows that must handle PHI, the remaining question is how to control what AI model calls and tool calls receive and return. That control has to operate at the moment of the call.

    Runtime enforcement on AI and tool calls in workflows

    Trussed enforces policy in the execution path of AI model calls and tool calls, at the level of the individual interaction. For a workflow that sends patient context to a model or invokes a tool, policy can allow the call, redact PHI from it, or block it. The decision is enforced at runtime, not reviewed after the fact. Where PHI is redacted or blocked in the path, it does not reach the model or tool, and it is not returned into the data that downstream nodes hold and that n8n may store. What a workflow holds before it reaches that call still depends on the design and configuration steps above.

    Each enforcement action produces audit-ready evidence of what policy applied and what was done, mapped to HIPAA, including 164.312(b) audit controls. This gives a platform team a record of enforced decisions that retention settings cannot provide. Trussed runs in production with healthcare and pharma organizations, can be deployed self-managed in the customer cloud, and supports configurable retention and data residency.

    The scope is deliberate. Trussed enforces policy on individual AI interactions and tool calls. It does not replace the native n8n settings, access controls, or workflow design described here, and those remain the first line of defense.

    From configuration to evidence

    Scope

    Inventory where execution data lands and which fields are PHI.

    Configure

    Limit what is saved and how long it is kept.

    Design

    Pass references, filter fields, and minimize node output.

    Enforce

    Allow, redact, or block on AI and tool calls, with audit-ready evidence.

    Review your n8n workflows that touch PHI

    Talk through where execution data persists in your environment and how runtime enforcement on AI and tool calls can produce audit-ready evidence.

    Talk to an Expert