AutomationFlowsWeb Scraping › Langmem Memory Consolidation

Langmem Memory Consolidation

LangMem Memory Consolidation. Uses httpRequest. Scheduled trigger; 6 nodes.

Cron / scheduled trigger★★★★☆ complexity6 nodesHTTP Request
Web Scraping Trigger: Cron / scheduled Nodes: 6 Complexity: ★★★★☆ Added:

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
{
  "name": "LangMem Memory Consolidation",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 2 * * *"
            }
          ]
        }
      },
      "id": "langmem-cron-trigger",
      "name": "Nightly at 2 AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "http://backend:8000/memory/health",
        "options": {
          "timeout": 10000
        }
      },
      "id": "langmem-health-check",
      "name": "Check Memory Health",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-enabled",
              "leftValue": "={{ $json.enabled }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        }
      },
      "id": "langmem-if-enabled",
      "name": "Is Memory Enabled?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://backend:8000/memory/consolidate",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{}",
        "options": {
          "timeout": 300000
        }
      },
      "id": "langmem-consolidate",
      "name": "Run Consolidation",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        900,
        240
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "result",
              "value": "=Consolidation completed: reviewed={{ $json.facts_reviewed }}, merged={{ $json.facts_merged }}, superseded={{ $json.facts_superseded }}, expired={{ $json.facts_expired }}"
            }
          ]
        },
        "options": {}
      },
      "id": "langmem-log-result",
      "name": "Log Result",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1120,
        240
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "result",
              "value": "Memory service is disabled, skipping consolidation"
            }
          ]
        },
        "options": {}
      },
      "id": "langmem-skip",
      "name": "Skip (Disabled)",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        900,
        400
      ]
    }
  ],
  "connections": {
    "Nightly at 2 AM": {
      "main": [
        [
          {
            "node": "Check Memory Health",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Memory Health": {
      "main": [
        [
          {
            "node": "Is Memory Enabled?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Memory Enabled?": {
      "main": [
        [
          {
            "node": "Run Consolidation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Skip (Disabled)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Consolidation": {
      "main": [
        [
          {
            "node": "Log Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "memory"
    },
    {
      "name": "langmem"
    }
  ]
}
Pro

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

About this workflow

LangMem Memory Consolidation. Uses httpRequest. Scheduled trigger; 6 nodes.

Source: https://github.com/thekaveh/genai-vanilla/blob/main/services/n8n/workflows-stage/workflows/langmem-consolidation.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

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

Web Scraping

Birthday Automation - Production (Fixed). Uses stopAndError, httpRequest, emailSend, bannerbear. Scheduled trigger; 86 nodes.

Stop And Error, HTTP Request, Email Send +1
Web Scraping

This template runs two scheduled workflows to govern Microsoft Entra ID (Azure AD) guest accounts by detecting stale users via Microsoft Graph, staging deletions in SharePoint with a 72-hour window, n

Microsoft SharePoint, Microsoft Teams, Microsoft Entra +1
Web Scraping

Jira-Allure-Auto-Qa. Uses httpRequest, jira. Scheduled trigger; 68 nodes.

HTTP Request, Jira
Web Scraping

Spotify-Sync-Surrealdb-V1. Uses httpRequest, n8n-nodes-surrealdb, spotify. Scheduled trigger; 62 nodes.

HTTP Request, N8N Nodes Surrealdb, Spotify
Web Scraping

As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o

HTTP Request, n8n, N8N Trigger +1