Append Branch Block Order Guard
Loading workflow…
Workflow Description
A self-contained validation template proving that Merge in append mode keeps branch blocks in the documented order. Two Code nodes build local sample lists and stamp a branch tag plus an internal rank, then Merge joins both inputs. A single verification Code node scans the actual output once and checks three independent conditions: input 1 block appears before input 2, no return to an earlier branch after a block switch, and strictly increasing internal rank per branch. The report shows the observed sequence, per-block counts, and the position and type of the first violation; If routes to a pass or fail NoOp.
How it works
- 1.Manual Trigger emits one empty item and feeds both seeding nodes.
- 2.Seed Input 1 Branch builds the first sample and adds مصدر_الفرع=input1 with ascending rank.
- 3.Seed Input 2 Branch builds the second sample with a deliberate rank regression (1, 3, 2).
- 4.Two Set nodes add the test case name with includeOtherFields enabled.
- 5.Merge (append, numberInputs=2) combines branch one on input 1 and branch two on input 2.
- 6.Verify Block Order scans items once, builds the observed sequence and detects the first violation.
- 7.If checks the verdict and routes to Order Guard Passed or Order Guard Failed.
Use cases
- Regression test for contiguous branch blocks after Append
- Protecting reports that implicitly depend on branch item order
- Auditing internal numbering before downstream aggregation
- Training QA teams to separate content integrity from sequence integrity
Requirements
- n8n 2.48.7 with the listed node versions
- No credentials: execution is fully local
- Two ordered JSON arrays or the bundled sample
- Keep مصدر_الفرع and رتبة_داخلية until the verification node
- A dedicated Merge input index per branch
Setup and testing in n8n
- Import the JSON, open the workflow and click Execute Workflow.
- Inspect Verify Block Order: verdict is خرق with نوع_أول_خرق=تراجع_الرتبة_الداخلية at position 6 and the run ends in Order Guard Failed.
- Fix the second sample to ranks 1,2,3 and rerun: verdict becomes سليم and the run ends in Order Guard Passed.
- Swap the two Merge input indexes to test block order inversion.
- Delete رتبة_داخلية from one sample item to test the missing-tag violation.
- Empty both samples to test the no-items case.
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (10)
Manual Trigger
Manual Trigger
Seed Input 1 Branch
Code
Seed Input 2 Branch
Code
Tag Test Case 1
Set
Tag Test Case 2
Set
Merge Append Branches
Merge
Verify Block Order
Code
Order Valid?
If
Order Guard Passed
No Op
Order Guard Failed
No Op
Sticky Stage 1
Sticky Note
Sticky Stage 2
Sticky Note
Sticky Stage 3
Sticky Note
Fresh workflows, straight to your inbox
Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.
- New workflows
- Clear overviews
- Setup guides