<n8n-demo>

Workflow preview web component

Example: Diff Mode

HTML

<n8n-demo
mode="diff"
workflowbefore='{"nodes":[...],"connections":{}}'
workflow='{"nodes":[...],"connections":{}}'
>
</n8n-demo>

Description

Use mode="diff" to compare two workflows side-by-side. The workflowbefore attribute contains the "before" workflow JSON, and workflow contains the "after" workflow JSON.

This uses the /demo/diff endpoint which displays a visual diff of the two workflows.