Control Flow

Merge and Match Nodes Reference

Technical reference for `merge` and `matchFiles`, including synchronization modes, timeout handling, and filename pairing rules.

Updated 2 min read

Overview

These nodes coordinate multiple incoming streams:

  • merge synchronizes or forwards branches.
  • matchFiles pairs files from multiple lists before later processing.

Configuration / Settings

NodeSettingDetails
mergeinputCount, mode, timeout, onTimeout, onUpstreamFailwaitAll is the synchronization mode. first is a race. any is pass-through.
matchFilesinputCount, strategy, sourceInput, regexGroup, ignoreExtension, normalizeSeparators, caseSensitive, allowReuse, regexPattern, regexFlagsSupports sequential pairing or name-based matching with optional normalization.

Inputs Expected

  • merge accepts any payload type.
  • matchFiles expects two or more non-empty arrays of file-like objects.

Variables Exported / Outputs

NodeOutput shapeNotes
mergepassthrough inputThe executor is intentionally simple because the engine performs the real synchronization work.
matchFilesany[][]Each inner array is a matched file tuple ordered by input stream.

Common Use Cases

  • Wait for a spreadsheet branch and a file branch before generating final output.
  • Pair original PDFs with signed copies or sidecar metadata files by filename.
  • Race two alternative upstream branches and keep whichever arrives first.

Edge Cases

  • merge timeout handling only applies in waitAll mode.
  • matchFiles drops incomplete pairs instead of emitting partial matches.
  • Regex matching compares the selected capture group across inputs.
  • allowReuse determines whether one candidate file can satisfy multiple base items.