> ## Documentation Index
> Fetch the complete documentation index at: https://docs.5x.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow builder

> Learn how to create visual data pipelines with triggers, tasks, and dependencies

**Focus:** Master the visual workflow builder to create automated data pipelines with triggers, tasks, and intelligent dependency management.

The 5X Jobs workflow builder provides an intuitive visual interface for creating complex data pipelines. Build workflows by connecting triggers and tasks, define execution dependencies, and configure each component to meet your specific requirements.

## Creating a new job

### **Step 1: Name your job**

Start by creating a new job and giving it a descriptive name:

1. Navigate to the **Jobs** section in your workspace
2. Click **"+ New Job"** to create a new workflow
3. Enter a descriptive name for your job in the modal dialog
4. Click **"Create job"** to proceed to the workflow builder

### **Step 2: Configure job settings**

Before building your workflow, configure the basic job settings:

* **Job name** - Update the job name if needed
* **Compute profile** - Select the appropriate compute resources (Small, Medium, Large)
* **Environment** - Choose the environment where this job will execute
* **Timeout settings** - Set execution time limits if needed
* **Concurrent runs** - Configure how many instances can run simultaneously

<img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-job-settings.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=1e629322f84733ac2da31371c2822b49" alt="Job Settings Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)'}} width="290" height="536" data-path="images/jobs/jobs-job-settings.png" />

## Building workflows with triggers

Every job workflow starts with a trigger that determines when and how the pipeline executes.

<Tabs>
  <Tab title="Manual trigger">
    Perfect for testing, debugging, or ad-hoc execution:

    1. Click **"Start the flow"** on the canvas
    2. Select **"Manual"** from the trigger options
    3. Configure the trigger name
    4. Click to add the trigger to your workflow

    <img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-manual-trigger-config.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=cff4c3356c93ef7febe03a8ef07bda05" alt="Manual Trigger Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)', width: '400px'}} width="992" height="432" data-path="images/jobs/jobs-manual-trigger-config.png" />

    **Use cases:**

    * Testing new workflows
    * Ad-hoc data processing
    * Manual data refresh
    * Debugging pipeline issues
  </Tab>

  <Tab title="Scheduled trigger">
    Automate execution based on time intervals:

    1. Select **"Scheduled"** from the trigger options
    2. Configure the trigger name
    3. Choose scheduling method:
       * **Custom Time** - Set intervals (every minute, hour, day, week, month)
       * **CRON Expression** - Use advanced scheduling syntax
    4. Set the execution time and timezone

    <img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-scheduled-trigger-config.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=c59c53903e7a28a9fee10d9ffda17a11" alt="Scheduled Trigger Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)', width: '400px'}} width="982" height="836" data-path="images/jobs/jobs-scheduled-trigger-config.png" />

    **Scheduling options:**

    * **Frequency** - Every minute, hour, day, week, or month
    * **Time** - Specific time of day for execution
    * **Timezone** - Automatic UTC handling with local time display
    * **CRON** - Advanced scheduling for complex patterns
  </Tab>

  <Tab title="Webhook trigger">
    Enable event-driven execution from external systems:

    1. Select **"Webhook"** from the trigger options
    2. Configure the trigger name
    3. Enable authorization (recommended for security)
    4. Save to generate webhook URL and access token

    <img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-webhook-trigger-config.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=a6f33739880efd3a096a535008be792b" alt="Webhook Trigger Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)', width: '400px'}} width="984" height="698" data-path="images/jobs/jobs-webhook-trigger-config.png" />

    **Features:**

    * **Secure authentication** - Configurable access tokens
    * **Real-time execution** - Immediate pipeline activation
    * **External integration** - Connect with any system that can send HTTP requests
  </Tab>

  <Tab title="Pull request trigger">
    Integrate with GitHub for CI/CD workflows:

    1. Select **"Pull Request"** from the trigger options
    2. Configure the trigger name
    3. Select the GitHub repository
    4. Optionally enable **"Run on draft pull request"**
    5. Note the access token requirements

    <img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-pr-trigger-config.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=dd54159effd1e1cdee0e4d3ece5931d5" alt="Pull Request Trigger Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)', width: '400px'}} width="984" height="946" data-path="images/jobs/jobs-pr-trigger-config.png" />

    **Requirements:**

    * GitHub repository access
    * Contact 5X support for access token
    * Configure `DBT_TOKEN` in GitHub Secrets
  </Tab>
</Tabs>

## Adding tasks to your workflow

Once you have a trigger, add tasks to define what work your pipeline performs.

<Tabs>
  <Tab title="Data ingestion tasks">
    Use existing connectors to bring data into your warehouse:

    1. Click the **"+"** button after your trigger
    2. Select **"Ingestion"** from the task options
    3. Configure the task:
       * **Task name** - Descriptive name for this ingestion step
       * **Connector** - Select from 600+ available connectors
       * **Depends on** - Choose trigger or previous tasks

    <img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-ingestion-task-config.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=2b4c3ee607fb13d110e8740f4e72d586" alt="Ingestion Task Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)', width: '400px'}} width="970" height="646" data-path="images/jobs/jobs-ingestion-task-config.png" />

    **Integration benefits:**

    * Same connectors as 5X Ingestion
    * Automatic dependency management
    * Seamless data flow between pipeline steps
  </Tab>

  <Tab title="dbt modeling tasks">
    Execute dbt transformations and models:

    1. Select **"Modeling"** from the task options
    2. Configure the modeling task:
       * **Task name** - Name for this modeling step
       * **Repository** - GitHub repository containing dbt project
       * **Branch** - Specific branch to use
       * **Depends on** - Choose trigger or previous tasks
       * **dbt commands** - Commands to execute (default: `dbt run`)
       * **Target name** - dbt target environment
       * **Number of threads** - Parallel execution threads
       * **Deferral** - Compare against another environment
       * **Generate dbt docs** - Automatically create documentation

    <img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-modeling-task-config.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=b09bcf4ff2a6277ff3d226aed17c371c" alt="dbt Modeling Task Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)', width: '400px'}} width="780" height="1380" data-path="images/jobs/jobs-modeling-task-config.png" />

    **dbt integration features:**

    * Multiple dbt versions supported (1.6.18, 1.7.19, 1.8.9, 1.9.10)
    * Custom command execution
    * Environment-specific targeting
    * Documentation generation
    * Deferral for change comparison
  </Tab>

  <Tab title="Custom Python code tasks">
    Execute Python scripts and applications:

    1. Select **"Custom Code"** from the task options
    2. Configure the Python task:
       * **Task name** - Name for this code execution
       * **Repository** - GitHub repository with Python code
       * **Branch** - Specific branch to use
       * **Python file** - Main script to execute (by name or path)
       * **Dependent libraries** - Requirements file (by name or path)
       * **Python version** - Select from supported versions (3.8.19 - 3.12.4)
       * **Depends on** - Previous tasks or triggers

    <img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-custom-code-task-config.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=58c1cedeca6ccdc0754602c087f3c0ed" alt="Custom Python Code Task Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)', width: '400px'}} width="784" height="1108" data-path="images/jobs/jobs-custom-code-task-config.png" />

    **Python execution features:**

    * Multiple Python versions (3.8.19, 3.9.19, 3.10.14, 3.11.9, 3.12.4)
    * Dependency management with requirements files
    * Environment variable injection
    * Secret management for sensitive data
  </Tab>

  <Tab title="Parallel job tasks">
    Execute other jobs as sub-workflows:

    1. Select **"Job"** from the task options
    2. Configure the job task:
       * **Task name** - Name for this sub-job execution
       * **Job** - Select another job from your workspace
       * **Depends on** - Previous tasks or triggers

    <img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-parallel-job-task-config.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=41ab5a3e2f961069276d2d415cc879b1" alt="Parallel Job Task Configuration" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)', width: '400px'}} width="782" height="532" data-path="images/jobs/jobs-parallel-job-task-config.png" />

    **Parallel execution benefits:**

    * Reuse existing job definitions
    * Create hierarchical workflows
    * Enable complex orchestration patterns
    * Modular pipeline design
  </Tab>
</Tabs>

## Managing dependencies and flow

### **Visual dependency management**

The workflow builder automatically handles task dependencies:

* **Sequential execution** - Tasks run in order based on connections
* **Parallel execution** - Tasks without dependencies run simultaneously
* **Conditional flow** - Complex branching based on task outcomes
* **Error handling** - Failed tasks stop dependent execution

<img src="https://mintcdn.com/5x/TQB4cKAt-LB-irjl/images/jobs/jobs-workflow-with-tasks.png?fit=max&auto=format&n=TQB4cKAt-LB-irjl&q=85&s=a90ecd9adcc5cb373832339090e8f711" alt="Complete Workflow with Tasks and Dependencies" style={{borderRadius: '12px', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)'}} width="2024" height="910" data-path="images/jobs/jobs-workflow-with-tasks.png" />

### **Best practices for workflow design**

**Start simple:**

* Begin with basic triggers and single tasks
* Test each component before adding complexity
* Use manual triggers for initial development

**Design for reliability:**

* Add appropriate timeout settings
* Configure concurrent run limits
* Plan for error scenarios and retries

**Optimize for performance:**

* Use parallel execution where possible
* Select appropriate compute profiles
* Minimize unnecessary dependencies

**Maintain clarity:**

* Use descriptive names for triggers and tasks
* Document complex workflows
* Keep workflows focused on specific business processes

## Publishing and testing workflows

### **Draft vs Live versions**

5X Jobs supports draft development with live execution:

* **Draft changes** - Develop and modify workflows without affecting production. Test changes thoroughly before publishing!
* **Live execution** - Only published workflows execute on schedule

### **Publishing workflows**

1. Complete your workflow configuration
2. Review all settings and dependencies
3. Click **"Publish"** to make changes live
4. Monitor the first execution to ensure proper operation

***
