Skip to content
Data & Databases

Append Branch Block Order Guard

10 nodes 27 2 Manual trigger
Download

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. 1.Manual Trigger emits one empty item and feeds both seeding nodes.
  2. 2.Seed Input 1 Branch builds the first sample and adds مصدر_الفرع=input1 with ascending rank.
  3. 3.Seed Input 2 Branch builds the second sample with a deliberate rank regression (1, 3, 2).
  4. 4.Two Set nodes add the test case name with includeOtherFields enabled.
  5. 5.Merge (append, numberInputs=2) combines branch one on input 1 and branch two on input 2.
  6. 6.Verify Block Order scans items once, builds the observed sequence and detects the first violation.
  7. 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

  1. Import the JSON, open the workflow and click Execute Workflow.
  2. Inspect Verify Block Order: verdict is خرق with نوع_أول_خرق=تراجع_الرتبة_الداخلية at position 6 and the run ends in Order Guard Failed.
  3. Fix the second sample to ranks 1,2,3 and rerun: verdict becomes سليم and the run ends in Order Guard Passed.
  4. Swap the two Merge input indexes to test block order inversion.
  5. Delete رتبة_داخلية from one sample item to test the missing-tag violation.
  6. Empty both samples to test the no-items case.

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger Code Set Merge If No Op

Details

Trigger Manual trigger
Nodes 10
Apps 6
Views 27
Downloads 2

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (10)

/

Manual Trigger

Manual Trigger

#1

Seed Input 1 Branch

Code

#2

Seed Input 2 Branch

Code

#3

Tag Test Case 1

Set

#4

Tag Test Case 2

Set

#5

Merge Append Branches

Merge

#6

Verify Block Order

Code

#7

Order Valid?

If

#8

Order Guard Passed

No Op

#9

Order Guard Failed

No Op

#10

Sticky Stage 1

Sticky Note

#11

Sticky Stage 2

Sticky Note

#12

Sticky Stage 3

Sticky Note

#13
Stay in the loop

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

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime