{
  "updatedAt": "2025-12-03T17:37:42.479Z",
  "createdAt": "2025-12-03T17:37:42.479Z",
  "id": "maopl6TYaJ0R58pP",
  "name": "Ssh Workflow",
  "description": "Automated workflow: Ssh Workflow. This workflow integrates 7 different services: stickyNote, code, scheduleTrigger, ssh, stopAndError. It contains 8 nodes and follows best practices for error handling and security.",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "id": "4ca55c6e-cf2e-4239-82a9-88d0a201e761",
      "name": "List upgradable packages",
      "type": "n8n-nodes-base.ssh",
      "notes": "apt list --upgradable",
      "position": [
        -280,
        0
      ],
      "parameters": {
        "command": "apt list --upgradable"
      },
      "credentials": {
        "sshPassword": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "ae1f0a55-31aa-494b-baa6-822dc606188e",
      "name": "Send Email through SMTP",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        380,
        0
      ],
      "parameters": {
        "html": "=The following packages can be updated on your server:\n\n{{ $json.htmlList }}\n\nPlease login and perform upgrade.",
        "options": {},
        "subject": "Server needs updates",
        "toEmail": "change.me@example.com",
        "fromEmail": "change.me@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "notes": "This emailSend node performs automated tasks as part of the workflow."
    },
    {
      "id": "e1d76671-d94c-40d5-9364-623db9319f11",
      "name": "Run workflow every day",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -540,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2,
      "notes": "This scheduleTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "ec4d722a-b88c-42da-971c-28ad5774596d",
      "name": "Format as HTML list",
      "type": "n8n-nodes-base.code",
      "position": [
        -60,
        0
      ],
      "parameters": {
        "jsCode": "function formatStdoutAsHtmlList(stdoutData) {\n\n    // Split the stdout into lines and map to HTML list items\n    const htmlListItems = stdoutData.split('\\n').map((line) => {\n        if (line.trim() && line !== \"Listing...\") { // Optionally skip empty lines or headers\n            return `<li>${line.trim()}</li>`;\n        }\n    }).filter(item => item); // Remove any undefined items due to empty lines or skipped headers\n\n    // Wrap the list items in a <ul> tag\n    const htmlList = `<ul>${htmlListItems.join('')}</ul>`;\n\n    // Return the formatted HTML list as part of an object\n    return { \"htmlList\": htmlList };\n}\n\nreturn formatStdoutAsHtmlList($input.first().json.stdout);"
      },
      "typeVersion": 2,
      "notes": "This code node performs automated tasks as part of the workflow."
    },
    {
      "id": "6f14eb02-c505-4f83-a5bb-68094e763fd9",
      "name": "Check if there are updates",
      "type": "n8n-nodes-base.if",
      "position": [
        140,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "db66d892-26fb-406c-a0ac-2e4b8a60310a",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.htmlList }}",
              "rightValue": "<ul></ul>"
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "notes": "This if node performs automated tasks as part of the workflow."
    },
    {
      "id": "3924c696-5b0e-4ae2-b2e2-435fed344028",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -180
      ],
      "parameters": {
        "width": 300,
        "content": "## VPS upgrade notify \nThis workflow will everyday check if server has upgradable packages and inform you by email if there is."
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    },
    {
      "id": "bb8ade2a-4ffe-4c79-91eb-55af568eb1b1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -180
      ],
      "parameters": {
        "width": 300,
        "content": "## Update email addresses\nUpdate From and To email addresses in this node to receive notifications"
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    }
  ],
  "connections": {
    "ae1f0a55-31aa-494b-baa6-822dc606188e": {
      "main": [
        [
          {
            "node": "error-handler-ae1f0a55-31aa-494b-baa6-822dc606188e-977b3163",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-ae1f0a55-31aa-494b-baa6-822dc606188e-472c967e",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-ae1f0a55-31aa-494b-baa6-822dc606188e-ba860746",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-ae1f0a55-31aa-494b-baa6-822dc606188e-9d7653ee",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-ae1f0a55-31aa-494b-baa6-822dc606188e-1c19482a",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-ae1f0a55-31aa-494b-baa6-822dc606188e-591025a5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-ae1f0a55-31aa-494b-baa6-822dc606188e-16caf0e9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-ae1f0a55-31aa-494b-baa6-822dc606188e-093f8db1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "staticData": null,
  "meta": null,
  "versionId": "79b45dc9-99e8-4a91-b44b-f4493e1c80a4",
  "activeVersionId": null,
  "versionCounter": 1,
  "triggerCount": 0,
  "shared": [
    {
      "updatedAt": "2026-02-02T17:55:15.060Z",
      "createdAt": "2026-02-02T17:55:15.060Z",
      "role": "workflow:owner",
      "workflowId": "maopl6TYaJ0R58pP",
      "projectId": "U3cZjxLpPGVohw1b",
      "project": {
        "updatedAt": "2026-02-02T18:03:13.881Z",
        "createdAt": "2026-02-02T17:54:12.365Z",
        "id": "U3cZjxLpPGVohw1b",
        "name": "Sebbah fsebbah@azy.solutions <fsebbah@azy.solutions>",
        "type": "personal",
        "icon": null,
        "description": null,
        "projectRelations": [
          {
            "updatedAt": "2026-02-02T17:54:12.365Z",
            "createdAt": "2026-02-02T17:54:12.365Z",
            "userId": "af142d6e-919f-4345-b234-759caa50a7bb",
            "projectId": "U3cZjxLpPGVohw1b",
            "user": {
              "updatedAt": "2026-04-09T12:42:54.002Z",
              "createdAt": "2026-02-02T17:54:09.643Z",
              "id": "af142d6e-919f-4345-b234-759caa50a7bb",
              "email": "fsebbah@azy.solutions",
              "firstName": "Sebbah",
              "lastName": "fsebbah@azy.solutions",
              "personalizationAnswers": {
                "version": "v4",
                "personalization_survey_submitted_at": "2026-02-02T18:03:20.553Z",
                "personalization_survey_n8n_version": "2.6.3"
              },
              "settings": {
                "userActivated": true,
                "firstSuccessfulWorkflowId": "zFOKwZABmUlo7tg6",
                "userActivatedAt": 1770062456227,
                "npsSurvey": {
                  "waitingForResponse": true,
                  "ignoredCount": 1,
                  "lastShownAt": 1771441113942
                }
              },
              "disabled": false,
              "mfaEnabled": false,
              "lastActiveAt": "2026-04-09",
              "isPending": false
            }
          }
        ]
      }
    }
  ],
  "tags": [],
  "activeVersion": null
}