Created
August 6, 2025 12:09
-
-
Save florian-forestier/8dd9b4f58f742bb829e424efd7795319 to your computer and use it in GitHub Desktop.
n8n workflow demo forestier.re blog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "Article_TMP", | |
| "nodes": [ | |
| { | |
| "parameters": { | |
| "url": "https://github.com/n8n-io/n8n/releases.atom", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.rssFeedRead", | |
| "typeVersion": 1.1, | |
| "position": [ | |
| -240, | |
| -768 | |
| ], | |
| "id": "c7764a7e-f0af-41b7-a7f6-6a1a5a7b3c5d", | |
| "name": "RSS Read" | |
| }, | |
| { | |
| "parameters": { | |
| "jsCode": "let newest = \"0.0.0\"\n\nfor (const item of $input.all()) {\n let testClean = item.json.title.replaceAll(\"n8n@\", \"\")\n let cleanSplitted = testClean.split(\".\")\n let newestSplitted = newest.split(\".\")\n\n if(cleanSplitted[2].includes(\"-rc\")) {\n continue\n }\n\n if(parseInt(cleanSplitted[0]) > parseInt(newestSplitted[0]) || (parseInt(cleanSplitted[0]) === parseInt(newestSplitted[0]) && ( parseInt(cleanSplitted[1]) > parseInt(newestSplitted[1]) || ( parseInt(cleanSplitted[1]) === parseInt(newestSplitted[1]) && parseInt(cleanSplitted[2]) > parseInt(newestSplitted[2]) ) )) ) {\n newest = testClean\n }\n}\n\nif(newest != \"0.0.0\") {\n return {version: newest}; \n}\nreturn []" | |
| }, | |
| "type": "n8n-nodes-base.code", | |
| "typeVersion": 2, | |
| "position": [ | |
| 208, | |
| -768 | |
| ], | |
| "id": "4f9ca570-7857-4119-a431-f215598742e7", | |
| "name": "Determine higher version available" | |
| }, | |
| { | |
| "parameters": { | |
| "operation": "removeItemsSeenInPreviousExecutions", | |
| "dedupeValue": "={{ $json.title }}", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.removeDuplicates", | |
| "typeVersion": 2, | |
| "position": [ | |
| -16, | |
| -768 | |
| ], | |
| "id": "3c978587-755b-41d1-86b6-18f96338d739", | |
| "name": "Remove Duplicates" | |
| }, | |
| { | |
| "parameters": { | |
| "rule": { | |
| "interval": [ | |
| { | |
| "triggerAtHour": 20 | |
| } | |
| ] | |
| } | |
| }, | |
| "type": "n8n-nodes-base.scheduleTrigger", | |
| "typeVersion": 1.2, | |
| "position": [ | |
| -464, | |
| -768 | |
| ], | |
| "id": "4802cd8b-937f-4d1c-b1ef-f3169f108b62", | |
| "name": "Schedule Trigger" | |
| }, | |
| { | |
| "parameters": { | |
| "resource": "message", | |
| "operation": "sendAndWait", | |
| "guildId": { | |
| "__rl": true, | |
| "value": "0000000000000", | |
| "mode": "list", | |
| "cachedResultName": "My House", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000" | |
| }, | |
| "channelId": { | |
| "__rl": true, | |
| "value": "000000000000000000000", | |
| "mode": "list", | |
| "cachedResultName": "automatic-updates", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000/000000000000000000000" | |
| }, | |
| "message": "=**{{ $json.name }} v{{ $json.version }} est disponible.**\n\n🚀 [Notes de version]({{ $json.changelog_link }})\n🐳 [{{ $json.repo_name}}:{{ $json.version }}](https://hub.docker.com/r/{{ $json.repo_name }}/tags)\n\nMettre à jour le serveur automatiquement ?\n\n*(RequestID: {{ $execution.id }})*", | |
| "approvalOptions": { | |
| "values": { | |
| "approvalType": "double" | |
| } | |
| }, | |
| "options": { | |
| "appendAttribution": false | |
| } | |
| }, | |
| "type": "n8n-nodes-base.discord", | |
| "typeVersion": 2, | |
| "position": [ | |
| 656, | |
| -768 | |
| ], | |
| "id": "330de564-4e9f-4ac6-84bf-e910b1eaad06", | |
| "name": "Send question message", | |
| "webhookId": "da88ed99-582f-42a2-9fc9-1333813cff8f", | |
| "credentials": { | |
| "discordBotApi": { | |
| "id": "AAAAAAAAAAAAAAAAA", | |
| "name": "My House" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "method": "POST", | |
| "url": "=https://gitlab.com/api/v4/projects/{{ $('Edit Fields').item.json.gitlab_project_id }}/repository/tags", | |
| "authentication": "predefinedCredentialType", | |
| "nodeCredentialType": "gitlabApi", | |
| "sendQuery": true, | |
| "queryParameters": { | |
| "parameters": [ | |
| { | |
| "name": "tag_name", | |
| "value": "={{ $('Edit Fields').item.json.version }}" | |
| }, | |
| { | |
| "name": "ref", | |
| "value": "main" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.httpRequest", | |
| "typeVersion": 4.2, | |
| "position": [ | |
| 1328, | |
| -864 | |
| ], | |
| "id": "77f79463-f5a1-4579-aef7-16c5d079bb98", | |
| "name": "Create GitLab tag", | |
| "credentials": { | |
| "gitlabApi": { | |
| "id": "BBBBBBBBBBBBBBB", | |
| "name": "GitLab account" | |
| } | |
| }, | |
| "onError": "continueErrorOutput" | |
| }, | |
| { | |
| "parameters": { | |
| "amount": 2, | |
| "unit": "minutes" | |
| }, | |
| "type": "n8n-nodes-base.wait", | |
| "typeVersion": 1.1, | |
| "position": [ | |
| 1552, | |
| -1008 | |
| ], | |
| "id": "943a61c5-b4b8-469b-bd75-67e2e6a00f8f", | |
| "name": "Wait", | |
| "webhookId": "da9259f3-b397-4fc5-9b14-af4fc1e92591" | |
| }, | |
| { | |
| "parameters": { | |
| "conditions": { | |
| "options": { | |
| "caseSensitive": true, | |
| "leftValue": "", | |
| "typeValidation": "strict", | |
| "version": 2 | |
| }, | |
| "conditions": [ | |
| { | |
| "id": "2b1a28d7-fa5e-4666-8ede-bdfd3e966e4f", | |
| "leftValue": "={{ $json.data.approved }}", | |
| "rightValue": "", | |
| "operator": { | |
| "type": "boolean", | |
| "operation": "true", | |
| "singleValue": true | |
| } | |
| } | |
| ], | |
| "combinator": "and" | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.if", | |
| "typeVersion": 2.2, | |
| "position": [ | |
| 880, | |
| -768 | |
| ], | |
| "id": "d4f39524-c5dd-4f63-a4d3-c5743d5a116d", | |
| "name": "Approved?" | |
| }, | |
| { | |
| "parameters": { | |
| "url": "=https://gitlab.com/api/v4/projects/{{ $('Edit Fields').item.json.gitlab_project_id }}/pipelines", | |
| "authentication": "predefinedCredentialType", | |
| "nodeCredentialType": "gitlabApi", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.httpRequest", | |
| "typeVersion": 4.2, | |
| "position": [ | |
| 1776, | |
| -1008 | |
| ], | |
| "id": "ed6a9d7e-d1dc-403e-8066-b8bb5c6c410e", | |
| "name": "Check pipeline status", | |
| "retryOnFail": false, | |
| "maxTries": 5, | |
| "waitBetweenTries": 5000, | |
| "credentials": { | |
| "gitlabApi": { | |
| "id": "BBBBBBBBBBBBBBB", | |
| "name": "GitLab account" | |
| } | |
| }, | |
| "onError": "continueErrorOutput" | |
| }, | |
| { | |
| "parameters": {}, | |
| "type": "n8n-nodes-base.limit", | |
| "typeVersion": 1, | |
| "position": [ | |
| 2000, | |
| -1104 | |
| ], | |
| "id": "966f6268-c044-42b0-af13-e61397f303bb", | |
| "name": "Get only first pipeline" | |
| }, | |
| { | |
| "parameters": { | |
| "conditions": { | |
| "options": { | |
| "caseSensitive": true, | |
| "leftValue": "", | |
| "typeValidation": "strict", | |
| "version": 2 | |
| }, | |
| "conditions": [ | |
| { | |
| "id": "520f306f-0ee4-4a80-946c-6118c85b28d3", | |
| "leftValue": "={{ $json.status }}", | |
| "rightValue": "success", | |
| "operator": { | |
| "type": "string", | |
| "operation": "equals", | |
| "name": "filter.operator.equals" | |
| } | |
| }, | |
| { | |
| "id": "826c7f67-3cf9-48fc-9fae-773f924d4cc1", | |
| "leftValue": "={{ $json.status }}", | |
| "rightValue": "failed", | |
| "operator": { | |
| "type": "string", | |
| "operation": "equals", | |
| "name": "filter.operator.equals" | |
| } | |
| }, | |
| { | |
| "id": "41dc8d9d-1fa6-4abc-ace2-e675e49fb80f", | |
| "leftValue": "={{ $json.status }}", | |
| "rightValue": "canceled", | |
| "operator": { | |
| "type": "string", | |
| "operation": "equals", | |
| "name": "filter.operator.equals" | |
| } | |
| } | |
| ], | |
| "combinator": "or" | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.if", | |
| "typeVersion": 2.2, | |
| "position": [ | |
| 2224, | |
| -1032 | |
| ], | |
| "id": "e0774034-6bf1-4df1-8e5f-e9c4080f294a", | |
| "name": "Finished?" | |
| }, | |
| { | |
| "parameters": { | |
| "conditions": { | |
| "options": { | |
| "caseSensitive": true, | |
| "leftValue": "", | |
| "typeValidation": "strict", | |
| "version": 2 | |
| }, | |
| "conditions": [ | |
| { | |
| "id": "caeb6085-fab0-480b-9d9b-f84e4e2f965c", | |
| "leftValue": "={{ $('Check pipeline status').item.json.status }}", | |
| "rightValue": "success", | |
| "operator": { | |
| "type": "string", | |
| "operation": "equals", | |
| "name": "filter.operator.equals" | |
| } | |
| } | |
| ], | |
| "combinator": "and" | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.if", | |
| "typeVersion": 2.2, | |
| "position": [ | |
| 2448, | |
| -1032 | |
| ], | |
| "id": "59b49516-0d6d-4381-a91f-ec2e16224a83", | |
| "name": "Success?" | |
| }, | |
| { | |
| "parameters": { | |
| "assignments": { | |
| "assignments": [ | |
| { | |
| "id": "9675ddb1-b5be-44dd-a7f3-32b460903c34", | |
| "name": "version", | |
| "value": "={{ $json.version }}", | |
| "type": "string" | |
| }, | |
| { | |
| "id": "6810ac13-e338-412b-a28d-55651c728628", | |
| "name": "name", | |
| "value": "n8n", | |
| "type": "string" | |
| }, | |
| { | |
| "id": "c3f890ef-0dc2-46e0-8cd3-2722fa69ee6e", | |
| "name": "gitlab_project_id", | |
| "value": 227, | |
| "type": "number" | |
| }, | |
| { | |
| "id": "e6c6a824-1190-403b-b3ff-8997aa0744e6", | |
| "name": "repo_name", | |
| "value": "docker.n8n.io/n8nio/n8n", | |
| "type": "string" | |
| }, | |
| { | |
| "id": "a8a5942a-a0b7-4efc-a738-be1e1a829ad8", | |
| "name": "changelog_link", | |
| "value": "=https://github.com/n8n-io/n8n/releases/tag/n8n%40{{ $json.version }}", | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.set", | |
| "typeVersion": 3.4, | |
| "position": [ | |
| 432, | |
| -768 | |
| ], | |
| "id": "1d8befc0-b44a-4f8d-8114-90e05e9371b0", | |
| "name": "Edit Fields" | |
| }, | |
| { | |
| "parameters": { | |
| "resource": "message", | |
| "guildId": { | |
| "__rl": true, | |
| "value": "0000000000000", | |
| "mode": "list", | |
| "cachedResultName": "My House", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000" | |
| }, | |
| "channelId": { | |
| "__rl": true, | |
| "value": "000000000000000000000", | |
| "mode": "list", | |
| "cachedResultName": "automatic-updates", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000/000000000000000000000" | |
| }, | |
| "content": "Bien reçu ! Mise à jour annulée.", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.discord", | |
| "typeVersion": 2, | |
| "position": [ | |
| 1104, | |
| -672 | |
| ], | |
| "id": "e0d3ffc8-28fb-4d10-aef1-4485a9fbc13f", | |
| "name": "Send a message", | |
| "webhookId": "a674d12b-51b7-4912-8116-d113c0f5ce42", | |
| "credentials": { | |
| "discordBotApi": { | |
| "id": "AAAAAAAAAAAAAAAAA", | |
| "name": "My House" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "resource": "message", | |
| "guildId": { | |
| "__rl": true, | |
| "value": "0000000000000", | |
| "mode": "list", | |
| "cachedResultName": "My House", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000" | |
| }, | |
| "channelId": { | |
| "__rl": true, | |
| "value": "000000000000000000000", | |
| "mode": "list", | |
| "cachedResultName": "automatic-updates", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000/000000000000000000000" | |
| }, | |
| "content": "Bien reçu ! Mise à jour en cours", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.discord", | |
| "typeVersion": 2, | |
| "position": [ | |
| 1104, | |
| -864 | |
| ], | |
| "id": "7e21ade0-8953-45ca-be81-32c684fc13ad", | |
| "name": "Send a message1", | |
| "webhookId": "a674d12b-51b7-4912-8116-d113c0f5ce42", | |
| "credentials": { | |
| "discordBotApi": { | |
| "id": "AAAAAAAAAAAAAAAAA", | |
| "name": "My House" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "resource": "message", | |
| "guildId": { | |
| "__rl": true, | |
| "value": "0000000000000", | |
| "mode": "list", | |
| "cachedResultName": "My House", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000" | |
| }, | |
| "channelId": { | |
| "__rl": true, | |
| "value": "000000000000000000000", | |
| "mode": "list", | |
| "cachedResultName": "automatic-updates", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000/000000000000000000000" | |
| }, | |
| "content": "Une erreur est survenue !", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.discord", | |
| "typeVersion": 2, | |
| "position": [ | |
| 2608, | |
| -848 | |
| ], | |
| "id": "980802c7-2610-4fd9-88aa-58d60949b8a6", | |
| "name": "Send a message2", | |
| "webhookId": "a674d12b-51b7-4912-8116-d113c0f5ce42", | |
| "credentials": { | |
| "discordBotApi": { | |
| "id": "AAAAAAAAAAAAAAAAA", | |
| "name": "My House" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "resource": "message", | |
| "guildId": { | |
| "__rl": true, | |
| "value": "0000000000000", | |
| "mode": "list", | |
| "cachedResultName": "My House", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000" | |
| }, | |
| "channelId": { | |
| "__rl": true, | |
| "value": "000000000000000000000", | |
| "mode": "list", | |
| "cachedResultName": "automatic-updates", | |
| "cachedResultUrl": "https://discord.com/channels/0000000000000/000000000000000000000" | |
| }, | |
| "content": "Mise à jour réussie!", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.discord", | |
| "typeVersion": 2, | |
| "position": [ | |
| 2608, | |
| -1056 | |
| ], | |
| "id": "bc8e077a-d52b-438b-8909-7ccbf075bb5a", | |
| "name": "Send a message3", | |
| "webhookId": "a674d12b-51b7-4912-8116-d113c0f5ce42", | |
| "credentials": { | |
| "discordBotApi": { | |
| "id": "AAAAAAAAAAAAAAAAA", | |
| "name": "My House" | |
| } | |
| } | |
| } | |
| ], | |
| "pinData": {}, | |
| "connections": { | |
| "RSS Read": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Remove Duplicates", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Determine higher version available": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Edit Fields", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Remove Duplicates": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Determine higher version available", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Schedule Trigger": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "RSS Read", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Send question message": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Approved?", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Create GitLab tag": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Wait", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ], | |
| [ | |
| { | |
| "node": "Send a message2", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Wait": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Check pipeline status", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Approved?": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Send a message1", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ], | |
| [ | |
| { | |
| "node": "Send a message", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Check pipeline status": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Get only first pipeline", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ], | |
| [ | |
| { | |
| "node": "Wait", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Get only first pipeline": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Finished?", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Finished?": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Success?", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ], | |
| [ | |
| { | |
| "node": "Wait", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Success?": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Send a message3", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ], | |
| [ | |
| { | |
| "node": "Send a message2", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Edit Fields": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Send question message", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Send a message1": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Create GitLab tag", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| } | |
| }, | |
| "active": false, | |
| "settings": { | |
| "executionOrder": "v1" | |
| }, | |
| "versionId": "f1e95b7a-df25-41fd-ad62-02b9ff7472d4", | |
| "meta": { | |
| "templateCredsSetupCompleted": true, | |
| "instanceId": "a3546f1586f2393d8af2e66c0d361fe42a968d0edd90e187b9f13ca767157f39" | |
| }, | |
| "id": "Hi1ODMhJjrISu85s", | |
| "tags": [ ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment