đź’» Schedule Workflow Activity Time

This workflow can automatically activate and deactivate specified automation tasks based on a custom Cron expression, ensuring they run during scheduled working hours. By calling the API, users can precisely control the active periods of the workflow without manual intervention, enhancing system resource utilization efficiency, reducing operational costs and potential risks. It is suitable for enterprises and teams that require time management for automated tasks.

Workflow Diagram
đź’» Schedule Workflow Activity Time Workflow diagram

Workflow Name

đź’» Schedule Workflow Activity Time

Key Features and Highlights

This workflow enables automatic activation and deactivation of specified n8n workflows according to a predefined schedule. It supports custom time settings based on Cron expressions, allowing precise control over the active periods of workflows. By leveraging the n8n API, it remotely activates or deactivates workflows without manual intervention.

Core Problem Addressed

Helps users automatically manage workflow execution times to prevent workflows from running outside of business hours, thereby improving system resource utilization, reducing unnecessary operational costs, and minimizing potential risks.

Use Cases

  • Enterprise automation scenarios requiring certain automated tasks to run only during business hours
  • Daily management of multiple workflows’ activation statuses by development and operations teams
  • Business systems needing dynamic adjustment of workflow states based on time
  • Any user seeking fine-grained control over n8n workflow execution schedules

Main Process Steps

  1. Use the “Schedule Trigger” node to set activation at 08:00 and deactivation at 20:00 daily.
  2. Configure the “Workflow ID” node with the target workflow’s ID (manual input required).
  3. Use the “Merge” node to combine workflow ID data and route it to the “n8n Activate” and “n8n Deactivate” nodes respectively.
  4. Call the n8n API to activate or deactivate the specified workflows.

Involved Systems or Services

  • Built-in n8n nodes (Schedule Trigger, Set, Merge, n8n nodes)
  • n8n API (requires API key credentials to enable workflow activation and deactivation)

Target Users and Value

  • DevOps teams and automation engineers who need precise control over workflow activity periods to ensure efficient business process execution within scheduled times.
  • Enterprise users aiming to save resources and reduce operational risks by managing automated tasks via time-based scheduling.
  • Advanced n8n users and administrators leveraging API permissions for flexible lifecycle management of workflows.

Important Notes

  • This workflow requires configuration of n8n API credentials; trial users cannot use this feature.
  • The target workflow ID must be manually specified in the workflow configuration, and it is recommended to use Cron expressions for custom activation/deactivation times.

This workflow serves as an efficient tool for managing the runtime of n8n automation processes, facilitating automated control of workflows within designated business hours.