AutomationFlowsAI & RAG › Parse Natural Language Dates with Openai Gpt-4o for Smart Scheduling

Parse Natural Language Dates with Openai Gpt-4o for Smart Scheduling

ByJaredCo @jaredco on n8n.io

This n8n workflow demonstrates how to transform natural language date and time expressions into structured data with 96%+ accuracy. Parse complex expressions like "early next July", "2 weeks after project launch", or "end of Q3" into precise datetime objects with confidence…

Event trigger★★☆☆☆ complexityAI-powered5 nodesOpenAI ChatAgentHTTP Request Tool
AI & RAG Trigger: Event Nodes: 5 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5460 — we link there as the canonical source.

This workflow follows the Agent → HTTP Request Tool recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "aC1k1pYeeq4depUi",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI-Powered Natural Language Date Parser with 96% Accuracy",
  "tags": [],
  "nodes": [
    {
      "id": "65d87d2e-6091-4ec2-98d2-589dddec0748",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1000,
        360
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "bf8c983c-ee58-4aae-83be-76196a976f91",
      "name": "AI Agent with Date Parser",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1000,
        140
      ],
      "parameters": {
        "text": "={{ $json.userInput }}",
        "options": {
          "systemMessage": "// PART 1: Developer's Agent Purpose (Customizable)\nYou are a helpful scheduling and planning assistant. Help users with date-related requests, meeting planning, and timeline coordination.\n\nWhen you use the dateParserTool, always format your response in this clean structure:\n\n\ud83c\udfaf **REQUEST:** [User's original request]\n\ud83d\udcc5 **PARSED DATE:** [Start date] to [End date]\n\ud83d\udcca **CONFIDENCE:** [X%] [confidence indicator: \ud83c\udf1f for >90%, \u26a1 for >70%, \u26a0\ufe0f for lower]\n\ud83c\udf0d **TIMEZONE:** [timezone]\n\u23f1\ufe0f **TIMING:** [Any specific time details]\n\ud83d\udca1 **CONTEXT:** [Brief explanation of how the date was interpreted]\n[If ambiguities exist, mention them with suggestions]\n\n// PART 2: Tool Description (Fixed/Standard)\n---\nAVAILABLE TOOLS:\n\ndateParserTool - Advanced natural language date parser that can:\n- Parse quarters (Q1, Q2, Q3, Q4) with specific year support\n- Handle fuzzy date ranges (early/mid/late month)\n- Calculate business days excluding weekends  \n- Process complex patterns (last Friday of March, 2 weeks before Christmas)\n- Interpret relative dates (next week, in 3 months, tomorrow)\n- Handle seasonal references (spring 2025, winter campaign)\n- Detect vague terms and provide guidance (soon, eventually, ASAP)\n- Support multi-year planning and fiscal periods\n- Provide confidence scoring and intelligent explanations\n\nThe tool returns precise date ranges with start/end times, confidence levels, and business context. Use it whenever users mention dates, deadlines, scheduling, or time-related planning.\n\nAlways use the dateParserTool for ANY date, time, or scheduling reference in the user's message. Do not guess or estimate dates - use the tool to get precise results."
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "a1c65f40-fbf7-4f76-a286-6bae182ebe7f",
      "name": "Natural Language Date Parser",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1220,
        360
      ],
      "parameters": {
        "url": "https://mcp-dateparser.jaredco.com",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"type\": \"call-tool\",\n  \"tool_id\": \"natural_language_date_parser\",\n  \"input\": {\n    \"text\": \"{{ $fromAI('text', 'The date/time text to parse', 'string') }}\"\n  }\n}",
        "sendBody": true,
        "specifyBody": "json",
        "toolDescription": "dateParserTool"
      },
      "typeVersion": 4.2
    },
    {
      "id": "de12c5d2-ffec-4456-8ee8-c2c2f6393977",
      "name": "Set User Input",
      "type": "n8n-nodes-base.set",
      "position": [
        800,
        140
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "userInput",
              "name": "userInput",
              "type": "string",
              "value": "First Monday in July 2025"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "54378fc9-36a6-405d-9581-5dbf32efed5f",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        600,
        140
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "cd771a77-777a-46bb-99a8-5df040e1b630",
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Set User Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set User Input": {
      "main": [
        [
          {
            "node": "AI Agent with Date Parser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent with Date Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Natural Language Date Parser": {
      "ai_tool": [
        [
          {
            "node": "AI Agent with Date Parser",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n workflow demonstrates how to transform natural language date and time expressions into structured data with 96%+ accuracy. Parse complex expressions like "early next July", "2 weeks after project launch", or "end of Q3" into precise datetime objects with confidence…

Source: https://n8n.io/workflows/5460/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

QuantumDefender AI is a next-generation intelligent cybersecurity assistant designed to harness the symbolic strength of quantum computing’s promise alongside cutting-edge AI capabilities. This sophis

OpenAI Chat, Agent, Memory Buffer Window +7
AI & RAG

A short-term technical analysis agent for 15-minute candles on Binance Spot Market pairs. Calculates and interprets key trading indicators (RSI, MACD, BBANDS, ADX, SMA/EMA) and returns structured summ

OpenAI Chat, Memory Buffer Window, Execute Workflow Trigger +2
AI & RAG

A medium-term trend analyzer for the Binance Spot Market that leverages core technical indicators across 4-hour candle data to provide human-readable swing-trade signals via AI.

OpenAI Chat, Memory Buffer Window, Execute Workflow Trigger +2
AI & RAG

A precision trading signal engine that interprets 1-hour candlestick indicators for Binance Spot Market pairs using a GPT-4.1-mini LLM. Ideal for swing traders seeking directional bias and momentum cl

OpenAI Chat, Memory Buffer Window, Execute Workflow Trigger +2
AI & RAG

This advanced agent analyzes long-term price action in the Binance Spot Market using 1-day candles. It calculates key macro indicators like RSI, MACD, BBANDS, EMA, SMA, and ADX to identify high-confid

OpenAI Chat, Memory Buffer Window, Execute Workflow Trigger +2