Skip to main content

Node Versioning

Node versioning allows you to evolve your nodes over time while maintaining backward compatibility for existing workflows. This guide covers both light versioning and full versioning strategies.

Why Version Nodes?

Versioning is essential when:
  • Adding new features that change parameters
  • Fixing bugs that alter behavior
  • Changing API endpoints or data structures
  • Improving performance with different approaches
  • Deprecating old functionality
Existing workflows continue to use the node version they were created with. Only new instances use the latest version.

Light Versioning

Light versioning uses version arrays in the node description. All versions share the same implementation.

When to Use Light Versioning

  • ✅ Minor bug fixes
  • ✅ Adding optional parameters
  • ✅ Small behavior changes
  • ✅ UI improvements
  • ✅ Adding new operations without breaking existing ones

Implementation

Version-Specific Behavior

Use this.getNode().typeVersion to check the version:

Full Versioning

Full versioning creates separate implementations for each major version using the VersionedNodeType class.

When to Use Full Versioning

  • ✅ Major breaking changes
  • ✅ Complete parameter restructuring
  • ✅ Different execution logic
  • ✅ API version changes
  • ✅ Fundamental architecture changes

Implementation

Full versioning requires three files:
1

Create Main Node File

2

Create Version 1 Implementation

3

Create Version 2 Implementation

Version Migration

When users update node versions, their workflows don’t automatically migrate. Consider providing migration helpers:

Document Breaking Changes

Provide Clear Documentation

In your node documentation, include migration guides:
Breaking Changes in v3.0:
  • Removed keepOnlySet parameter
  • Added new mode parameter
  • Changed output format
Migration Steps:
  1. Update to latest version
  2. Reconfigure mode parameter
  3. Test your workflow

Version Strategy Best Practices

Follow semantic versioning principles:
  • Major (1.0 → 2.0): Breaking changes
  • Minor (1.0 → 1.1): New features, backward compatible
  • Patch (1.1 → 1.1.1): Bug fixes, backward compatible

Real-World Example: Gmail Trigger Versions

The Gmail Trigger uses light versioning to evolve behavior:

Version Evolution:

Deprecation Strategy

When deprecating old versions:
1

Add Deprecation Notice

2

Provide Migration Path

Document how to migrate in the deprecation notice:
3

Keep Supporting Old Versions

Continue supporting deprecated versions for at least 6-12 months.
4

Remove After Grace Period

Only remove old versions after the grace period and multiple warnings.

Version Comparison Table

Checklist for Adding New Version

1

Decide Versioning Strategy

  • Is this a breaking change?
  • Can it be handled with light versioning?
  • Do you need full versioning?
2

Update Version Number

  • Follow semantic versioning
  • Update version array
  • Update defaultVersion (if applicable)
3

Implement Version Logic

  • Add version checks in code
  • Maintain backward compatibility
  • Test old and new versions
4

Document Changes

  • Update node documentation
  • Add migration guide
  • Add deprecation notices (if needed)
5

Test Thoroughly

  • Test all supported versions
  • Test version-specific behavior
  • Test migration paths
  • Test with existing workflows

Common Pitfalls

Avoid these common versioning mistakes:
  • ❌ Changing behavior without incrementing version
  • ❌ Breaking old versions when adding new features
  • ❌ Not testing all supported versions
  • ❌ Removing old versions too quickly
  • ❌ Not documenting breaking changes
  • ❌ Using full versioning for minor changes
  • ❌ Forgetting to update defaultVersion

Next Steps

Overview

Review node development fundamentals

Testing

Test your versioned nodes