{
  "id": "2",
  "name": "post to mattermost v2",
  "nodes": [
    {
      "name": "RSS Feed Read",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        580,
        150
      ],
      "parameters": {
        "url": "{{ $env.BASE_URL }}"
      },
      "typeVersion": 1,
      "id": "node-fe95c1f9"
    },
    {
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1170,
        90
      ],
      "parameters": {
        "url": "{{ $env.BASE_URL }}",
        "options": {},
        "requestMethod": "POST",
        "queryParametersUi": {
          "parameter": [
            {
              "name": "status",
              "value": "={{$node[\"RSS Feed Read\"].json[\"title\"]}} \n{{$node[\"RSS Feed Read\"].json[\"link\"]}}"
            }
          ]
        }
      },
      "typeVersion": 1,
      "id": "node-d73d8289"
    },
    {
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "position": [
        400,
        150
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes",
              "value": 10
            }
          ]
        }
      },
      "typeVersion": 1,
      "id": "node-0e35d2b0"
    },
    {
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "position": [
        790,
        150
      ],
      "parameters": {
        "functionCode": "// Get the global workflow static data\nconst staticData = getWorkflowStaticData('global');\n\n// Access its data\nconst lastRssId = staticData.lastRssId\n\nlet list = []\n\n\nfor (const item of $items(\"RSS Feed Read\")){\n  let currentId = item.json[\"id\"].split('/').pop()\n  if(currentId == lastRssId) break;\n  list.push({'json': {\n    'id': currentId,\n    'lastId': lastRssId,\n    'title': item.json[\"title\"],\n    'url': item.json[\"link\"]\n  }})\n}\n\n\n// Get the last ID from Rss Feed\nlet currentRssId = $item(0).$node[\"RSS Feed Read\"].json[\"id\"].split('/').pop()\n\n// TODO: make a loop to get all the items beyond the last saved id\nif(!lastRssId || currentRssId != lastRssId)\n{  \n  // Update its data\n  staticData.lastRssId = currentRssId;\n  \n}\nelse { list = [{'json':{'id': 'NaN', 'lastId': staticData.lastRssId }}] }\nreturn list;\n\n"
      },
      "typeVersion": 1,
      "id": "node-f6bc160c"
    },
    {
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "position": [
        960,
        150
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$node[\"Function\"].json[\"id\"]}}",
              "value2": "NaN",
              "operation": "notEqual"
            }
          ],
          "boolean": []
        }
      },
      "typeVersion": 1,
      "id": "node-66313d45"
    },
    {
      "name": "NoOp",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1180,
        280
      ],
      "parameters": {},
      "typeVersion": 1,
      "id": "node-509ecb5e"
    },
    {
      "id": "error-0582b846",
      "name": "Error Handler",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        1000,
        400
      ],
      "parameters": {
        "message": "Workflow execution error",
        "options": {}
      }
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3
  },
  "connections": {},
  "meta": {
    "instanceId": "workflow-d0e3badc",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:46.115862",
    "updatedAt": "2025-09-29T07:07:46.115898",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
    "optimized"
  ],
  "description": "Production-ready workflow: post to mattermost v2. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}