dchupp

GitHub Workflow Version History

Oct 12th, 2025 (edited)
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 9.82 KB | Source Code | 0 0
  1. {
  2.   "name": "GitHub Workflow Version History",
  3.   "nodes": [
  4.     {
  5.       "parameters": {
  6.         "rule": {
  7.           "interval": [
  8.             {
  9.               "field": "hours",
  10.               "hoursInterval": 4
  11.             }
  12.           ]
  13.         }
  14.       },
  15.       "type": "n8n-nodes-base.scheduleTrigger",
  16.       "typeVersion": 1.2,
  17.       "position": [
  18.         0,
  19.         96
  20.       ],
  21.       "id": "205daad7-56f4-488b-a98b-0081d831c82a",
  22.       "name": "Schedule Trigger"
  23.     },
  24.     {
  25.       "parameters": {
  26.         "resource": "file",
  27.         "owner": {
  28.           "__rl": true,
  29.           "value": "YOUR_GITHUB_USERNAME",
  30.           "mode": "list",
  31.           "cachedResultName": "YOUR_GITHUB_USERNAME",
  32.           "cachedResultUrl": ""
  33.         },
  34.         "repository": {
  35.           "__rl": true,
  36.           "value": "YOUR_REPOSITORY_NAME",
  37.           "mode": "list",
  38.           "cachedResultName": "YOUR_REPOSITORY_NAME",
  39.           "cachedResultUrl": ""
  40.         },
  41.         "filePath": "={{ $json.name }}.json",
  42.         "fileContent": "={{ $json.toJsonString() }}",
  43.         "commitMessage": "=Updated {{ $json.updatedAt }}",
  44.         "additionalParameters": {
  45.           "branch": {
  46.             "branch": "main"
  47.           },
  48.           "author": {
  49.             "name": "YOUR_NAME",
  50.             "email": "[email protected]"
  51.           }
  52.         }
  53.       },
  54.       "type": "n8n-nodes-base.github",
  55.       "typeVersion": 1.1,
  56.       "position": [
  57.         896,
  58.         192
  59.       ],
  60.       "id": "e13d2006-2f7a-43b2-ad0e-4c3b7e97f37e",
  61.       "name": "Create a file",
  62.       "webhookId": "3401d931-11ad-4e09-be5a-cbad607fe8e1"
  63.     },
  64.     {
  65.       "parameters": {
  66.         "resource": "file",
  67.         "operation": "edit",
  68.         "owner": {
  69.           "__rl": true,
  70.           "value": "YOUR_GITHUB_USERNAME",
  71.           "mode": "list",
  72.           "cachedResultName": "YOUR_GITHUB_USERNAME",
  73.           "cachedResultUrl": ""
  74.         },
  75.         "repository": {
  76.           "__rl": true,
  77.           "value": "YOUR_REPOSITORY_NAME",
  78.           "mode": "list",
  79.           "cachedResultName": "YOUR_REPOSITORY_NAME",
  80.           "cachedResultUrl": ""
  81.         },
  82.         "filePath": "={{ $('Get All Active Workflows').item.json.name }}.json",
  83.         "fileContent": "={{ $json.toJsonString() }}",
  84.         "commitMessage": "=Updated At {{ $json.data.updatedAt }}"
  85.       },
  86.       "type": "n8n-nodes-base.github",
  87.       "typeVersion": 1.1,
  88.       "position": [
  89.         1120,
  90.         0
  91.       ],
  92.       "id": "5a6b55ca-03d7-46f5-a448-f1316db735d2",
  93.       "name": "Edit a file",
  94.       "webhookId": "83055caa-9e23-4ce7-916e-389a0906257f"
  95.     },
  96.     {
  97.       "parameters": {
  98.         "operation": "fromJson",
  99.         "options": {}
  100.       },
  101.       "type": "n8n-nodes-base.extractFromFile",
  102.       "typeVersion": 1,
  103.       "position": [
  104.         672,
  105.         -96
  106.       ],
  107.       "id": "b27525a4-8f6a-4f37-b597-353ae54bc9a5",
  108.       "name": "Extract from File"
  109.     },
  110.     {
  111.       "parameters": {},
  112.       "type": "n8n-nodes-base.noOp",
  113.       "typeVersion": 1,
  114.       "position": [
  115.         1120,
  116.         -192
  117.       ],
  118.       "id": "48ec6713-a0c9-4da8-aae6-81d40342ecd5",
  119.       "name": "Ignores Because it is already up to date"
  120.     },
  121.     {
  122.       "parameters": {},
  123.       "type": "n8n-nodes-base.noOp",
  124.       "typeVersion": 1,
  125.       "position": [
  126.         896,
  127.         368
  128.       ],
  129.       "id": "d953ec2b-3560-42ce-8f99-86325977e8a5",
  130.       "name": "Ignores because it's not related to missing file"
  131.     },
  132.     {
  133.       "parameters": {
  134.         "filters": {
  135.           "activeWorkflows": true
  136.         },
  137.         "requestOptions": {}
  138.       },
  139.       "type": "n8n-nodes-base.n8n",
  140.       "typeVersion": 1,
  141.       "position": [
  142.         224,
  143.         96
  144.       ],
  145.       "id": "98fd97f3-8efe-4352-bad1-efd82204581d",
  146.       "name": "Get All Active Workflows"
  147.     },
  148.     {
  149.       "parameters": {
  150.         "resource": "file",
  151.         "operation": "get",
  152.         "owner": {
  153.           "__rl": true,
  154.           "value": "YOUR_GITHUB_USERNAME",
  155.           "mode": "list",
  156.           "cachedResultName": "YOUR_GITHUB_USERNAME",
  157.           "cachedResultUrl": ""
  158.         },
  159.         "repository": {
  160.           "__rl": true,
  161.           "value": "YOUR_REPOSITORY_NAME",
  162.           "mode": "list",
  163.           "cachedResultName": "YOUR_REPOSITORY_NAME",
  164.           "cachedResultUrl": ""
  165.         },
  166.         "filePath": "={{ $json.name }}.json",
  167.         "additionalParameters": {}
  168.       },
  169.       "type": "n8n-nodes-base.github",
  170.       "typeVersion": 1.1,
  171.       "position": [
  172.         448,
  173.         96
  174.       ],
  175.       "id": "256128b4-b2b9-4c1e-80e7-23cfd4f92ba8",
  176.       "name": "Check if File exists And Return if Exists",
  177.       "webhookId": "42cce76f-ff67-40f1-870a-b7b6349c1458",
  178.       "onError": "continueErrorOutput"
  179.     },
  180.     {
  181.       "parameters": {
  182.         "conditions": {
  183.           "options": {
  184.             "caseSensitive": true,
  185.             "leftValue": "",
  186.             "typeValidation": "strict",
  187.             "version": 2
  188.           },
  189.           "conditions": [
  190.             {
  191.               "id": "6d500852-4065-4cf2-8ec2-69fdc7ca1c76",
  192.               "leftValue": "={{ $json.data.updatedAt }}",
  193.               "rightValue": "={{ $('Get All Active Workflows').item.json.updatedAt }}",
  194.               "operator": {
  195.                 "type": "string",
  196.                 "operation": "equals",
  197.                 "name": "filter.operator.equals"
  198.               }
  199.             }
  200.           ],
  201.           "combinator": "and"
  202.         },
  203.         "options": {}
  204.       },
  205.       "type": "n8n-nodes-base.if",
  206.       "typeVersion": 2.2,
  207.       "position": [
  208.         896,
  209.         -96
  210.       ],
  211.       "id": "c5e8b708-47b6-4179-a97e-f474531196d9",
  212.       "name": "Check if Update to Date"
  213.     },
  214.     {
  215.       "parameters": {
  216.         "conditions": {
  217.           "options": {
  218.             "caseSensitive": true,
  219.             "leftValue": "",
  220.             "typeValidation": "strict",
  221.             "version": 2
  222.           },
  223.           "conditions": [
  224.             {
  225.               "id": "44998fae-9cd0-479d-9360-a281c8dfef4b",
  226.               "leftValue": "={{ $json.error }}",
  227.               "rightValue": "The resource you are requesting could not be found",
  228.               "operator": {
  229.                 "type": "string",
  230.                 "operation": "equals",
  231.                 "name": "filter.operator.equals"
  232.               }
  233.             }
  234.           ],
  235.           "combinator": "and"
  236.         },
  237.         "options": {}
  238.       },
  239.       "type": "n8n-nodes-base.if",
  240.       "typeVersion": 2.2,
  241.       "position": [
  242.         672,
  243.         256
  244.       ],
  245.       "id": "add1f71e-1885-4186-a684-9c71926ad39a",
  246.       "name": "Check if File Missing"
  247.     },
  248.     {
  249.       "parameters": {
  250.         "content": "##Update Existing File",
  251.         "height": 384,
  252.         "width": 752
  253.       },
  254.       "type": "n8n-nodes-base.stickyNote",
  255.       "position": [
  256.         624,
  257.         -240
  258.       ],
  259.       "typeVersion": 1,
  260.       "id": "c56683f7-3021-4900-93c2-51e066db4240",
  261.       "name": "Sticky Note"
  262.     },
  263.     {
  264.       "parameters": {
  265.         "content": "## Add New File",
  266.         "height": 384,
  267.         "width": 752,
  268.         "color": 5
  269.       },
  270.       "type": "n8n-nodes-base.stickyNote",
  271.       "position": [
  272.         624,
  273.         144
  274.       ],
  275.       "typeVersion": 1,
  276.       "id": "3a4435ba-e3e0-4f35-9a8f-80300826eafa",
  277.       "name": "Sticky Note1"
  278.     },
  279.     {
  280.       "parameters": {
  281.         "content": "## Check Workflow State",
  282.         "height": 272,
  283.         "width": 720,
  284.         "color": 6
  285.       },
  286.       "type": "n8n-nodes-base.stickyNote",
  287.       "position": [
  288.         -96,
  289.         32
  290.       ],
  291.       "typeVersion": 1,
  292.       "id": "c7d7bbf3-bf7d-4388-b5bd-d631f38e7fcb",
  293.       "name": "Sticky Note2"
  294.     }
  295.   ],
  296.   "pinData": {},
  297.   "connections": {
  298.     "Schedule Trigger": {
  299.       "main": [
  300.         [
  301.           {
  302.             "node": "Get All Active Workflows",
  303.             "type": "main",
  304.             "index": 0
  305.           }
  306.         ]
  307.       ]
  308.     },
  309.     "Extract from File": {
  310.       "main": [
  311.         [
  312.           {
  313.             "node": "Check if Update to Date",
  314.             "type": "main",
  315.             "index": 0
  316.           }
  317.         ]
  318.       ]
  319.     },
  320.     "Get All Active Workflows": {
  321.       "main": [
  322.         [
  323.           {
  324.             "node": "Check if File exists And Return if Exists",
  325.             "type": "main",
  326.             "index": 0
  327.           }
  328.         ]
  329.       ]
  330.     },
  331.     "Check if File exists And Return if Exists": {
  332.       "main": [
  333.         [
  334.           {
  335.             "node": "Extract from File",
  336.             "type": "main",
  337.             "index": 0
  338.           }
  339.         ],
  340.         [
  341.           {
  342.             "node": "Check if File Missing",
  343.             "type": "main",
  344.             "index": 0
  345.           }
  346.         ]
  347.       ]
  348.     },
  349.     "Check if Update to Date": {
  350.       "main": [
  351.         [
  352.           {
  353.             "node": "Ignores Because it is already up to date",
  354.             "type": "main",
  355.             "index": 0
  356.           }
  357.         ],
  358.         [
  359.           {
  360.             "node": "Edit a file",
  361.             "type": "main",
  362.             "index": 0
  363.           }
  364.         ]
  365.       ]
  366.     },
  367.     "Check if File Missing": {
  368.       "main": [
  369.         [
  370.           {
  371.             "node": "Create a file",
  372.             "type": "main",
  373.             "index": 0
  374.           }
  375.         ],
  376.         [
  377.           {
  378.             "node": "Ignores because it's not related to missing file",
  379.             "type": "main",
  380.             "index": 0
  381.           }
  382.         ]
  383.       ]
  384.     }
  385.   },
  386.   "active": false,
  387.   "settings": {
  388.     "executionOrder": "v1"
  389.   },
  390.   "versionId": "3b89d86e-6809-4a55-ac6a-d7b7fa32638f",
  391.   "meta": {
  392.     "templateCredsSetupCompleted": true,
  393.     "instanceId": "30a7d5bd3ded7aaf7d092822cf25bde1a7a80c113246004be47c438c17ff5bbc"
  394.   },
  395.   "id": "ix8CoZSODshwVulg",
  396.   "tags": []
  397. }
Advertisement
Add Comment
Please, Sign In to add comment