Data Hub

Overview

The Data Hub action manages centralized data storage and retrieval within workflows. It allows you to store data from workflow steps, share data across workflows, and retrieve stored data for use in subsequent operations.

circle-info

🗄️ Purpose

Use Data Hub to:

  • Store workflow outputs persistently

  • Share data across multiple workflows

  • Retrieve historical data for verification

  • Build data-driven workflows

  • Create shared datasets for teams


When to Use Data Hub

✅ Good Use Cases

Scenario
Reason

Persist Workflow Data

Store IDs/values for later use

Cross-Workflow Data

Share data between workflows

Historical Data

Compare with previous runs

Reference Data

Store test configuration data

Shared Test Data

Common data for multiple tests

Dynamic Test Data

Generate and store runtime data

Audit Trail

Track what changed and when

❌ Anti-Patterns (Don't Do)

  • ❌ Store sensitive data (passwords, tokens)

  • ❌ Store very large datasets

  • ❌ Use as temporary variables (use session instead)

  • ❌ Duplicate data unnecessarily

  • ❌ Store without clear naming


Configuration

Basic Setup

  1. Open your workflow

  2. Click "Add Action" → Select "Data Hub"

  3. Configure operation:

    • Operation: Store, Retrieve, or Update

    • Data Key: Identifier for data

    • Data Value: What to store

    • Scope: Private or Shared

  4. Optional: Set expiration (optional)

  5. Save

Configuration Options


Data Operations

Store Operation

Save data to Data Hub:

Use when:

  • First time saving this data

  • Overwriting existing data

  • Creating new reference data

Retrieve Operation

Fetch data from Data Hub:

Use when:

  • Need to access previously stored data

  • Comparing current vs previous values

  • Reusing reference data

Update Operation

Modify existing stored data:

Use when:

  • Incrementing counters

  • Adding new fields

  • Updating timestamps

Delete Operation

Remove data from Data Hub:

Use when:

  • Cleaning up test data

  • Removing sensitive data

  • Archiving old data


Practical Examples

Example 1: Store User ID for Later Use

Example 2: Track Test Metrics

Example 3: Share Test Data Across Workflows

Example 4: Versioned Data Management

Example 5: Counter Tracking


Data Storage Best Practices

✅ Do

  • Use clear key names - Descriptive, organized naming

  • Store structured data - Use JSON objects for complex data

  • Include metadata - Track what data is and why stored

  • Set expiration - Auto-cleanup old data

  • Document data schema - Explain data structure

  • Version important data - Track changes over time

  • Use appropriate scope - Private vs Shared based on need

  • Encrypt sensitive data - If storing sensitive info

  • Tag related data - Organize with tags/categories

❌ Don't

  • Store passwords - Security risk

  • Store API keys - Should be in secrets manager

  • Store extremely large objects - Memory/performance impact

  • Store without naming convention - Leads to confusion

  • Forget to clean up - Old data accumulates

  • Share sensitive data - Use private scope

  • Store temporary values - Use workflow variables instead

  • Store duplicate data - Consolidate to single storage

  • Ignore expiration - Set TTL to auto-cleanup


Naming Conventions


Working with Data Types

JSON Objects

Arrays

Primitives


Data Lifecycle

Create → Store → Retrieve → Update → Archive → Delete


Performance Considerations

Storage Limits

Optimization Tips

  • ✅ Compress large data before storing

  • ✅ Use efficient data structures (nested JSON)

  • ✅ Retrieve only needed fields

  • ✅ Archive old data regularly

  • ✅ Use versioning for historical data


Troubleshooting

Issue: Data not found on retrieval

Symptoms:

  • Retrieve returns "not found"

  • Data should be there

Causes:

  • Wrong key name

  • Data expired and deleted

  • Wrong scope (private vs shared)

  • Typo in key

Solutions:

  1. Verify key name exactly

  2. Check expiration settings

  3. Verify scope (private/shared)

  4. Look for similar keys

  5. Re-store data if needed

Issue: Stored data changes unexpectedly

Symptoms:

  • Data different than stored

  • Modifications not from this workflow

Causes:

  • Another workflow modified data

  • Update operation accidentally changed it

  • Merge settings caused overwrite

Solutions:

  1. Use versioning to track changes

  2. Review update operation carefully

  3. Use immutable storage for reference data

  4. Check permissions on data

Issue: Performance degradation with Data Hub

Symptoms:

  • Workflow runs slower

  • Data Hub operations delayed

Causes:

  • Storing too much data

  • Large individual entries

  • Too many concurrent operations

  • Inefficient retrieval

Solutions:

  1. Clean up old data

  2. Compress large entries

  3. Use targeted retrieval

  4. Optimize data structure


Real-World Scenarios

E-Commerce: Cross-Workflow Order Processing

Testing: Baseline Performance Tracking

Multi-Team: Shared Test Data


Integration with Other Actions

Data Hub + Retry

Reliable data operations:

Data Hub + Condition

Conditional storage:

Data Hub + Send Email

Include stored data in emails:



Summary

  • Data Hub stores and retrieves workflow data persistently

  • Use for reference data shared across workflows

  • Set expiration to auto-cleanup old data

  • Use clear naming for easy identification

  • Choose appropriate scope (Private/Shared)

  • Combine with conditions for smart storage


Next: Learn about Comment Action for documentation.

Last updated