1. Home
  2. 8: How-to Guides

How to Link Tables in a Rayven.io Workflow (temp)

Linking Primary and Secondary Tables within a workflow allows you to build dynamic, relational data logic inside Rayven. This enables enriched automation — such as triggering actions based on a combination of main and related data, or using lookup fi

Use Cases

  • Combine device metadata from a primary table with sensor readings from a secondary table.

  • Trigger alerts only when certain linked conditions are met across both tables.

  • Enrich workflow decisions with human-entered data (e.g., operator notes or maintenance history).

  • Perform advanced filtering, lookups, or merges using linked tables.


How It Works

Each workflow in Rayven can:

  • Access both primary and secondary tables.

  • Perform lookups using a shared key (e.g., Device ID).

  • Join related data for enriched outputs.

  • Update one or both tables as part of the process.


Step-by-Step Instructions

Step 1: Start Your Workflow

  1. Navigate to the Workflow Builder.

  2. Drag in the appropriate Trigger Node (e.g., “New row in table”, “Scheduled event”).


Step 2: Add Primary Table Node

  1. Use a Table Data or Data Source Node.

  2. Select your Primary Table (e.g., Devices).

  3. Define filters or field mappings as needed.


Step 3: Add Secondary Table Lookup

  1. Drag in another Table Data Node.

  2. Select the Secondary Table (e.g., Maintenance Logs).

  3. Use the lookup/join field to relate it back to the primary table.

    • Example: Match Device ID in both tables.

  4. You can now use fields from both datasets in downstream logic.

🔍 Tip: Use the Merge Node to consolidate data from both tables if needed.


Step 4: Add Conditions or Actions

  • Use a Condition Node to apply logic (e.g., only continue if Last Maintenance > 30 days ago).

  • Connect to Action Nodes like:

    • Notifications

    • AI Agents

    • PDF Generators

    • Data exports

    • API integrations


Step 5: Save and Test

  • Run a manual preview or set up a temporary scheduler.

  • Inspect the log to verify data is being pulled from both tables correctly.

  • Adjust your join logic or mappings as needed.


Best Practices

  • Use unique IDs across tables to keep joins accurate.

  • Always test join logic with different types of data (especially edge cases).

  • Use labels in field mappings to avoid confusion between similar fields (e.g., primary.status vs. secondary.status).

  • Document your table relationships — especially in large projects.


Examples

Scenario Primary Table Secondary Table Workflow Outcome
Alert on overdue maintenance Devices Maintenance Logs Sends an email to ops team
Report with notes Equipment Operator Notes Generates a PDF with data + human inputs
Smart filtering Locations Sensor Events Ignores events for inactive locations

Troubleshooting

  • Data not appearing from secondary table?
    Ensure the join key (e.g., Device ID) exists in both records.

  • Workflow errors?
    Check for mismatched field names or empty result sets during lookup.

  • Performance lags?
    Simplify filters or batch large data sets to avoid overloading the engine.


Next Steps

👉 How to Configure Your Tables
👉 How to Create AI Agents Using Linked Data
👉 Best Practices for Workflow Design
👉 Using Merge Nodes in Workflows