@schift-io/workflow-n8n
v0.1.1
Published
Import and project n8n workflow exports through Schift Workflow v2.
Maintainers
Readme
@schift-io/workflow-n8n
Import n8n workflow exports into canonical Schift Workflow v2 JSON and project Workflow v2 JSON back into an n8n-like export shape.
import { fromN8n, asN8n, analyzeN8nLoss } from "@schift-io/workflow-n8n";
const workflowV2 = fromN8n(n8nExport);
const losses = analyzeN8nLoss(n8nExport);
const n8nExportAgain = await asN8n(workflowV2);This package is an import/projection compatibility layer. It does not execute n8n nodes, run an n8n server, or bundle n8n node implementations.
First-class mappings
Common n8n node concepts are normalized into Schift Workflow v2 block types:
- triggers:
manual_trigger,schedule_trigger,webhook_source - flow:
condition,filter,switch,merge,loop,wait - data transformation:
set,aggregate,sort,limit,split_out,summarize,remove_duplicates,datetime - execution and integrations:
http_request,code,subworkflow - agent concepts:
ai_agent, LangChain chat models asllm_generate, LangChain embeddings asembedder - Schift first-party document-helper AWP primitives:
document_helper_hwpx_mutate,document_helper_hwpx_render_pages,document_helper_pdf_from_png_pages,document_helper_pdf_merge, anddocument_helper_office_convert_pdf - Hub trigger concepts: Gmail inquiry triggers and Notion change triggers are preserved as draft/preview intent when present in the source workflow. They do not imply credential transfer or automatic external writes.
Unknown or runtime-owned nodes are preserved as raw config with
n8n_conversion_loss metadata so callers can review what needs a clean-room
runtime binding. Runtime bridge nodes such as executeWorkflow and LangChain
Agent are still marked with medium conversion loss because their bindings,
sidecar ports, and credentials need operator review before execution.
Gmail send/reply/label/archive actions and Notion create/update/comment/archive
actions should also stay review-gated after import.
Document-helper blocks are Schift-owned runtime bindings. They call Schift API
and the private document-helper service for HWPX mutation, render, Office-to-PDF,
and PDF bundle operations; business approval, evidence checks, and billing stay
in the surrounding AWP workflow.
Test contract
test/index.test.ts covers import, reverse projection, conversion-loss
metadata, sidecar-port loss recording, and the first-class n8n-derived node
concept list above.
