AI Automation Module

Dynamic Ukrainian Month Generator

A reusable n8n workflow module that eliminates hardcoded date lists.
n8n JavaScript JSON Automation

Context & Problem

Business Case

Many automation systems require dynamic date-based logic — especially when generating reports, building filters, or constructing AI-driven workflows. Hardcoded month lists quickly become outdated and require manual updates.

The Challenge: Business automation often includes static month lists, manual editing every new month, risk of incorrect ordering, and non-reusable date logic.

Goal: Create a dynamic, reusable workflow module that automatically generates month data from the current month to the end of the year.

Implementation

Architecture & Logic

A lightweight AI Automation module built in n8n. It detects the current system month, maps Ukrainian month names, and dynamically generates structured JSON output.

Workflow Structure: Manual Trigger → Code Node
Fig 1. Workflow structure in n8n
JavaScript / Code Node
// 1. Detect current month (0-11)
const now = new Date();
const currentMonth = now.getMonth();

// 2. Ukrainian Month Array
const months = [
  'січень', 'лютий', 'березень', 'квітень', 'травень', 'червень',
  'липень', 'серпень', 'вересень', 'жовтень', 'листопад', 'грудень'
];

// 3. Generate output from current month to December
const output = [];
for (let i = currentMonth; i < 12; i++) {
  output.push({ month: months[i] });
}

// 4. Return structured JSON
return output;

Output & Results

Structured Data
JSON Output example
Fig 2. Structured JSON output ready for integration
Quantitative
  • 100% dynamic generation
  • Zero manual maintenance
  • Instant execution (<2 seconds)
Qualitative
  • Reusable automation module
  • Clean structured output
  • Easy integration into bots
Business Impact
  • Reduces repetitive logic
  • Increases system scalability
  • Improves architecture

Export Workflow

Download the ready-to-use n8n workflow JSON file. Import it directly into your n8n instance.