Publication RSS sur Facebook et Instagram

Avancé

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 34 nœuds.Utilise principalement des nœuds comme If, Set, Code, Html, Merge. Automatisation de la publication de RSS vers les médias sociaux avec résumés par IA et génération d'images

Prérequis
  • Token Bot Telegram
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
  • Clé API OpenAI
  • Clé API Anthropic
  • Clé API Google Gemini
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "R84XmkBzgZQgQPbH",
  "meta": {
    "instanceId": "a244e08ca65e768d1cee097a486ef066f1968b077e055f21a34efe4e78c40e76",
    "templateCredsSetupCompleted": true
  },
  "name": "RSS Publish to FB & Insta",
  "tags": [
    {
      "id": "AOZlNztgqiOQKd6j",
      "name": "n8n Creators",
      "createdAt": "2025-09-28T11:02:15.227Z",
      "updatedAt": "2025-09-28T11:02:15.227Z"
    },
    {
      "id": "ay7TXKzjrY5N4ZmD",
      "name": "Bangla",
      "createdAt": "2025-07-08T20:11:28.278Z",
      "updatedAt": "2025-07-08T20:11:28.278Z"
    }
  ],
  "nodes": [
    {
      "id": "f69c226a-fb49-40eb-8e56-330381747a0d",
      "name": "Déclencheur Flux RSS",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -3248,
        -640
      ],
      "parameters": {
        "feedUrl": "[INSERT_YOUR_RSS_CHANNEL_URL_HERE]",
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3f91cf1a-9f1e-412f-a0c6-dbc89aff9296",
      "name": "Obtenir ligne(s) dans la feuille",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -3024,
        -640
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.link }}",
              "lookupColumn": "URL"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VdLMMjlMb03BhUJHt1q51yG8yJOK0Cvv5pJJa8tBMLk/edit#gid=0",
          "cachedResultName": "Arkusz1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1VdLMMjlMb03BhUJHt1q51yG8yJOK0Cvv5pJJa8tBMLk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VdLMMjlMb03BhUJHt1q51yG8yJOK0Cvv5pJJa8tBMLk/edit?usp=drivesdk",
          "cachedResultName": "Artykuły RSS"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HNc7xoP7FLMEQ23o",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "b7154b6a-f6df-4f49-b3c8-6660f43a7a08",
      "name": "Condition Si",
      "type": "n8n-nodes-base.if",
      "position": [
        -2800,
        -640
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5ba488f6-049b-48f0-8ec0-8e97eb3fe90d",
              "operator": {
                "type": "object",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $item(\"0\").$node[\"Get row(s) in sheet\"].json }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "01e742d6-6d5d-4b9f-a5d7-67af777a9059",
      "name": "Requête HTTP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2576,
        -640
      ],
      "parameters": {
        "url": "={{ $('RSS Feed Trigger').item.json.link }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "48877dcf-d9e7-431b-8d57-1cca347b40e6",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        -2352,
        -640
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "cssSelector": "*",
              "skipSelectors": "a, img"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d989d9d1-9f63-424e-bf30-bcc6cb73598e",
      "name": "Chaîne LLM de base",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -2128,
        -640
      ],
      "parameters": {
        "text": "={{ $json[''] }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "Step into the role of a technology blog editor. You will receive an article. Your task is to summarize it in 5 sentences. Use the English language. At the end, encourage discussion or comments in a natural way. Skip unnecessary remarks. You may use a maximum of 3 emojis in the entire post. Add the source (name of the service) and 5 hashtags."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "66784d91-6263-44db-8723-176527cd93aa",
      "name": "Ajouter ligne dans la feuille",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1040,
        -640
      ],
      "parameters": {
        "columns": {
          "value": {
            "URL": "={{ $('RSS Feed Trigger').first().json.link }}",
            "Image URL": "={{ $json.public_image_url }}",
            "FB Post ID": "={{ $json.facebook_post_id }}",
            "FB Post URL": "={{ $json.facebook_post_url }}",
            "Treść posta ": "={{ $('Basic LLM Chain').first().json.text }}",
            "Instagram Post ID": "={{ $json.instagram_post_id }}",
            "Instagram Post URL": "={{ $json.instagram_post_url }}"
          },
          "schema": [
            {
              "id": "URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Treść posta ",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Treść posta ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Image URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FB Post URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FB Post URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FB Post ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FB Post ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Instagram Post URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Instagram Post URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Instagram Post ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Instagram Post ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VdLMMjlMb03BhUJHt1q51yG8yJOK0Cvv5pJJa8tBMLk/edit#gid=0",
          "cachedResultName": "Arkusz1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1VdLMMjlMb03BhUJHt1q51yG8yJOK0Cvv5pJJa8tBMLk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VdLMMjlMb03BhUJHt1q51yG8yJOK0Cvv5pJJa8tBMLk/edit?usp=drivesdk",
          "cachedResultName": "Artykuły RSS"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HNc7xoP7FLMEQ23o",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "4119845f-0a1d-498a-88b2-2a86e357a3df",
      "name": "Publier sur Instagram",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -304,
        -544
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v23.0/[INSERT_YOUR_SITE_ID]/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image_url",
              "value": "={{ $json.public_url }}"
            },
            {
              "name": "caption",
              "value": "={{ $('Basic LLM Chain').item.json.text }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/x-www-form-urlencoded"
            }
          ]
        },
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YliEbZCZWU3Hizi4",
          "name": "Facebook Graph AKTUALNY"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "189295a3-794c-4171-ad92-e13efad5789d",
      "name": "Publier sur Instagram1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        -544
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v23.0/[INSERT_YOUR_SITE_ID]/media_publish",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "creation_id",
              "value": "={{ $json.id }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/x-www-form-urlencoded"
            }
          ]
        },
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YliEbZCZWU3Hizi4",
          "name": "Facebook Graph AKTUALNY"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f7764612-2c59-4015-9841-acf33026e825",
      "name": "Obtenir l'URL de publication",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        144,
        -544
      ],
      "parameters": {
        "url": "={{ `https://graph.facebook.com/${$json.fbApiVersion || 'v19.0'}/${$json.id}?fields=permalink` }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YliEbZCZWU3Hizi4",
          "name": "Facebook Graph AKTUALNY"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a4383011-8e48-46ef-8094-cc656b6eccc0",
      "name": "Envoyer un message photo",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1264,
        -640
      ],
      "webhookId": "b91ccd44-0556-4582-bf42-f338737efbc4",
      "parameters": {
        "file": "={{ $json['Image URL'] }}",
        "chatId": "=1187348254",
        "operation": "sendPhoto",
        "additionalFields": {
          "caption": "=New post published!\n\nFacebooka Link:\n{{ $json['FB Post URL'] }}\nInstagram Link:\n{{ $json['Instagram Post URL'] }}"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "0182R0Ur9p3JWSfZ",
          "name": "SmartCamp.AI Social Media Bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cbee4ab0-e47f-4543-be38-1f748d88142b",
      "name": "Chaîne LLM de base1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1776,
        -640
      ],
      "parameters": {
        "text": "=Generate a prompt for Open AI Image Generation to create a professional image for social media (Facebook, Instagram) on this TOPIC: {{ $json.text }}. The image should be engaging, suitable for a technology blog, for example photorealistic shots of experts in the office, in the field, photos of specific devices, technologies, or concepts described in the article. The images should be aesthetic and evoke positive feelings. The subject and appearance of the image must be closely related to the given TOPIC. Remember, this is a prompt that will later be pasted into the body in the API, so avoid elements that may break the JSON (you cannot use quotation marks). Generate only the prompt, without introduction, without quotation marks. The entire message must be less than 1000 characters.",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "38b9755e-5f67-4a43-aebf-a6445f0cf488",
      "name": "Modèle de chat Anthropic",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -2064,
        -416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "Claude 4 Sonnet"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "id": "sOnoKEVS37DZ4otg",
          "name": "Anthropic account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "b86f044c-4183-4d33-998c-587c9079e1c3",
      "name": "Modèle de chat Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1712,
        -416
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "Rrs7dei8RtxmvU6n",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8b1284be-d6df-4578-9847-fcf58662870f",
      "name": "Publier sur Facebook",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -288,
        -768
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/[INSERT_YOUR_SITE_ID]/photos",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "caption",
              "value": "={{ $('Basic LLM Chain').item.json.text }} \n\nŹródło: {{ $('RSS Feed Trigger').item.json.link }}"
            },
            {
              "name": "=url",
              "value": "={{ $json.public_url }}"
            },
            {}
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/x-www-form-urlencoded"
            }
          ]
        },
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YliEbZCZWU3Hizi4",
          "name": "Facebook Graph AKTUALNY"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9b6166e7-caff-439e-9fb1-a28ef9296090",
      "name": "Fusionner",
      "type": "n8n-nodes-base.merge",
      "position": [
        592,
        -640
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "c6d0cbd6-cbed-458a-a630-804b1fe34ca8",
      "name": "Envoyer un message texte",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1488,
        -640
      ],
      "webhookId": "93dd7833-b953-4dd8-abdc-b1ff22ccd7b2",
      "parameters": {
        "text": "=Original article:\n{{ $('RSS Feed Trigger').first().json.title }}\n{{ $('RSS Feed Trigger').first().json.link }}\n\n\nPost Content:\n\n{{ $('Basic LLM Chain').first().json.text }}\n",
        "chatId": "1187348254",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "0182R0Ur9p3JWSfZ",
          "name": "SmartCamp.AI Social Media Bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ec53d477-6b08-4bb9-9db4-13d566013d2c",
      "name": "Générer une image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1424,
        -640
      ],
      "parameters": {
        "model": "gpt-image-1",
        "prompt": "={{ $json.text }}",
        "options": {
          "size": "1024x1024",
          "quality": "high"
        },
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "id": "1rHbxq7xrWlOZ6zj",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "f1818d78-9245-46d3-b338-c13d14b7f396",
      "name": "Modifier les champs",
      "type": "n8n-nodes-base.set",
      "position": [
        -1200,
        -640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bb4004a1-9c8b-4603-b8ed-227e50940f87",
              "name": "filename",
              "type": "string",
              "value": "={{$now.toMillis()}}.png"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "f20e1497-7241-4c54-8b17-057050fc2e06",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3296,
        -752
      ],
      "parameters": {
        "width": 176,
        "height": 272,
        "content": "## RSS Trigger\nPaste a RSS channel URL here"
      },
      "typeVersion": 1
    },
    {
      "id": "2039fdb6-004b-404e-b09f-5b32add81dfe",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3056,
        -752
      ],
      "parameters": {
        "width": 384,
        "height": 272,
        "content": "## Filtering used content\nIf the URL has not been processed (row does not exist in Google Sheets), the workflow will proceed."
      },
      "typeVersion": 1
    },
    {
      "id": "299eddc0-de9d-4fea-a4de-96ed7a4f9c79",
      "name": "Téléverser vers Supabase (utilise les identifiants)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -752,
        -640
      ],
      "parameters": {
        "url": "={{ ($json.supabase_base_url || '').trim().replace(/\\/+$/,'') + '/storage/v1/object/' + ($json.bucket || 'social-media-ai-generated') + '/' + $json.filename }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "content-type",
              "value": "=={{ $binary.data?.mimeType || 'application/octet-stream' }}"
            },
            {
              "name": "x-upsert",
              "value": "true"
            }
          ]
        },
        "inputDataFieldName": "data",
        "nodeCredentialType": "supabaseApi"
      },
      "credentials": {
        "supabaseApi": {
          "id": "xNNUVvVXkkEjNATa",
          "name": "Supabase account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "54d2a31b-ef8b-4ea6-a900-519170db3876",
      "name": "Configuration Supabase",
      "type": "n8n-nodes-base.set",
      "position": [
        -976,
        -640
      ],
      "parameters": {
        "options": {
          "stripBinary": false
        },
        "assignments": {
          "assignments": [
            {
              "id": "1dbcf7c4-2e01-4df2-874e-93868b74a519",
              "name": "bucket",
              "type": "string",
              "value": "[INSERT_THE_NAME_OF_YOUR_BUCKET]"
            },
            {
              "id": "4e88d63f-01de-4265-8271-fd0ed637b5fd",
              "name": "filename",
              "type": "string",
              "value": "={{ $json.filename }}"
            },
            {
              "id": "b5579b42-bc9e-44d9-b997-2f1e505c0692",
              "name": "link_ttl_seconds",
              "type": "string",
              "value": "3600"
            },
            {
              "id": "ab260017-3161-4cbf-ad86-84d23a94e780",
              "name": "supabase_base_url",
              "type": "string",
              "value": "[INSERT_YOUR_SUPABASE_URL]"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "32b6f415-a837-4783-a76c-795276d3c4e4",
      "name": "URL publique Supabase",
      "type": "n8n-nodes-base.set",
      "position": [
        -528,
        -640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cdc9fb52-3d91-4af4-9ff4-8fb15e6543c4",
              "name": "public_url",
              "type": "string",
              "value": "={{ $node[\"Supabase Config\"].json.supabase_base_url.toString().trim().replace(/\\/+$/,'') + \"/storage/v1/object/public/\" + encodeURIComponent($node[\"Supabase Config\"].json.bucket) + \"/\" + encodeURIComponent($node[\"Supabase Config\"].json.filename) }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "57519156-2fe8-4f0b-8841-968eeeb443ca",
      "name": "Pipeline d'images",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        -752
      ],
      "parameters": {
        "width": 888,
        "height": 268,
        "content": "## Saving Image to Supabase\nUploads the image to Supabase Storage.\nSet your bucket name in the Set node or via JSON."
      },
      "typeVersion": 1
    },
    {
      "id": "a1eda551-4d5f-4504-97bb-c4186366e10f",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2592,
        -752
      ],
      "parameters": {
        "width": 384,
        "height": 272,
        "content": "## Text extraction\nThe contents of the article gets extracted."
      },
      "typeVersion": 1
    },
    {
      "id": "b5691de0-99a5-401a-9972-603e0f38aaf9",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2176,
        -752
      ],
      "parameters": {
        "width": 320,
        "height": 480,
        "content": "## Post generation\nA summary of the article is written by Claude."
      },
      "typeVersion": 1
    },
    {
      "id": "68990808-cec4-46fd-ae73-ea4c2045dce9",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1824,
        -752
      ],
      "parameters": {
        "width": 528,
        "height": 480,
        "content": "## Image Generation\nA prompt for image generation is created based on the Claude's summary and an image is generated in the OpenAI Image Generator."
      },
      "typeVersion": 1
    },
    {
      "id": "bc9b5229-bbe2-49a4-840f-d2fd9c38b5a6",
      "name": "Construire l'URL Facebook",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        -736
      ],
      "parameters": {
        "jsCode": "// Pobierz post_id prosto z node 'Post to Facebook'\nconst post_id = $node[\"Post to Facebook\"].json.post_id || '';\n\n// Twój username/slug strony FB\nconst facebookUsername = 'SmartCampAI';\n\n// Wyciągnij tylko właściwy postId (po podkreślniku, jeśli występuje)\nconst parts = post_id.split('_');\nconst postId = parts.length > 1 ? parts[1] : post_id;\n\n// Buduj link\nconst facebookPostUrl = postId\n  ? `https://facebook.com/${facebookUsername}/posts/${postId}`\n  : '';\n\nreturn {\n  json: {\n    facebook_post_id: postId,\n    facebook_post_url: facebookPostUrl,\n    facebook_published: !!postId\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "3cb5a6d0-dada-4485-bce7-88ef3fb7b4da",
      "name": "Construire l'URL Instagram",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        -544
      ],
      "parameters": {
        "jsCode": "const mediaId = $json.id || '';\nreturn {\n  json: {\n    instagram_post_id: mediaId,\n    instagram_post_url: $input.first().json.permalink, // nie mamy shortcode :(\n    instagram_published: !!mediaId\n  }\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "da68cf9b-f4ef-417b-9747-a5a98a535e72",
      "name": "Collecter les données importantes",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        -640
      ],
      "parameters": {
        "jsCode": "// Bezpieczny getter do $()\n// Zwraca { json: {} } gdy node nie istnieje lub nie ma danych\nfunction pickNodeFirst(name) {\n  try {\n    const arr = $(name).all();\n    if (Array.isArray(arr) && arr.length > 0) return arr[0];\n  } catch (e) {\n    // node nie istnieje – zwróć pusty obiekt, żeby nie wywalić wykonania\n  }\n  return { json: {} };\n}\n\nfunction safeGet(obj, path, def = null) {\n  try {\n    const parts = Array.isArray(path) ? path : String(path).split('.');\n    return parts.reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : def), obj);\n  } catch {\n    return def;\n  }\n}\n\n// Skróty do node’ów (UŻYJ DOKŁADNYCH NAZW)\nconst fb   = pickNodeFirst('Build Facebook URL');\nconst insta= pickNodeFirst('Build Instagram URL');\nconst llm  = pickNodeFirst('Basic LLM Chain');\nconst rss  = pickNodeFirst('RSS Feed Trigger');\nconst pub  = pickNodeFirst('Supabase Public URL'); // <-- poprawiona nazwa\n\nreturn [\n  {\n    json: {\n      facebook_post_id:   safeGet(fb,   ['json','facebook_post_id'],   null),\n      facebook_post_url:  safeGet(fb,   ['json','facebook_post_url'],  null),\n      facebook_published: safeGet(fb,   ['json','published'],          false),\n\n      instagram_post_id:  safeGet(insta,['json','instagram_post_id'],  null),\n      instagram_post_url: safeGet(insta,['json','instagram_post_url'], null),\n      instagram_published:safeGet(insta,['json','published'],          false),\n\n      caption:            safeGet(llm,  ['json','caption'],            null),\n      title:              safeGet(rss,  ['json','title'],              null),\n\n      public_image_url:   safeGet(pub,  ['json','public_url'],   null) // URL z Supabase\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "b612862f-f41c-42ef-9691-65de8f59d93f",
      "name": "Pipeline d'images1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        -944
      ],
      "parameters": {
        "width": 888,
        "height": 556,
        "content": "# Posting to Facebook & Instagram\nRemember to paste your unique site ID"
      },
      "typeVersion": 1
    },
    {
      "id": "d5acbcda-aa09-4b0a-98e4-45cdb6cd1f49",
      "name": "Pipeline d'images2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        -864
      ],
      "parameters": {
        "width": 648,
        "height": 412,
        "content": "# Collect and organize data\nInformation about generated posts gets saved to Google Sheets."
      },
      "typeVersion": 1
    },
    {
      "id": "a242af6a-6b20-4051-a5ad-736c76ff8559",
      "name": "Pipeline d'images3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        -864
      ],
      "parameters": {
        "width": 472,
        "height": 412,
        "content": "# Send a report via Telegram\nInformation about published posts gets sent by a Telegram bot."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6fbcafe1-f983-4a9a-95c6-df50b6ce31d5",
  "connections": {
    "b7154b6a-f6df-4f49-b3c8-6660f43a7a08": {
      "main": [
        [
          {
            "node": "01e742d6-6d5d-4b9f-a5d7-67af777a9059",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "48877dcf-d9e7-431b-8d57-1cca347b40e6": {
      "main": [
        [
          {
            "node": "d989d9d1-9f63-424e-bf30-bcc6cb73598e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9b6166e7-caff-439e-9fb1-a28ef9296090": {
      "main": [
        [
          {
            "node": "da68cf9b-f4ef-417b-9747-a5a98a535e72",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f1818d78-9245-46d3-b338-c13d14b7f396": {
      "main": [
        [
          {
            "node": "54d2a31b-ef8b-4ea6-a900-519170db3876",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f7764612-2c59-4015-9841-acf33026e825": {
      "main": [
        [
          {
            "node": "3cb5a6d0-dada-4485-bce7-88ef3fb7b4da",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "01e742d6-6d5d-4b9f-a5d7-67af777a9059": {
      "main": [
        [
          {
            "node": "48877dcf-d9e7-431b-8d57-1cca347b40e6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d989d9d1-9f63-424e-bf30-bcc6cb73598e": {
      "main": [
        [
          {
            "node": "cbee4ab0-e47f-4543-be38-1f748d88142b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "54d2a31b-ef8b-4ea6-a900-519170db3876": {
      "main": [
        [
          {
            "node": "299eddc0-de9d-4fea-a4de-96ed7a4f9c79",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cbee4ab0-e47f-4543-be38-1f748d88142b": {
      "main": [
        [
          {
            "node": "ec53d477-6b08-4bb9-9db4-13d566013d2c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8b1284be-d6df-4578-9847-fcf58662870f": {
      "main": [
        [
          {
            "node": "bc9b5229-bbe2-49a4-840f-d2fd9c38b5a6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f69c226a-fb49-40eb-8e56-330381747a0d": {
      "main": [
        [
          {
            "node": "3f91cf1a-9f1e-412f-a0c6-dbc89aff9296",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec53d477-6b08-4bb9-9db4-13d566013d2c": {
      "main": [
        [
          {
            "node": "f1818d78-9245-46d3-b338-c13d14b7f396",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4119845f-0a1d-498a-88b2-2a86e357a3df": {
      "main": [
        [
          {
            "node": "189295a3-794c-4171-ad92-e13efad5789d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bc9b5229-bbe2-49a4-840f-d2fd9c38b5a6": {
      "main": [
        [
          {
            "node": "9b6166e7-caff-439e-9fb1-a28ef9296090",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "189295a3-794c-4171-ad92-e13efad5789d": {
      "main": [
        [
          {
            "node": "f7764612-2c59-4015-9841-acf33026e825",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "66784d91-6263-44db-8723-176527cd93aa": {
      "main": [
        [
          {
            "node": "a4383011-8e48-46ef-8094-cc656b6eccc0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3cb5a6d0-dada-4485-bce7-88ef3fb7b4da": {
      "main": [
        [
          {
            "node": "9b6166e7-caff-439e-9fb1-a28ef9296090",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "3f91cf1a-9f1e-412f-a0c6-dbc89aff9296": {
      "main": [
        [
          {
            "node": "b7154b6a-f6df-4f49-b3c8-6660f43a7a08",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "32b6f415-a837-4783-a76c-795276d3c4e4": {
      "main": [
        [
          {
            "node": "4119845f-0a1d-498a-88b2-2a86e357a3df",
            "type": "main",
            "index": 0
          },
          {
            "node": "8b1284be-d6df-4578-9847-fcf58662870f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "38b9755e-5f67-4a43-aebf-a6445f0cf488": {
      "ai_languageModel": [
        [
          {
            "node": "d989d9d1-9f63-424e-bf30-bcc6cb73598e",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "a4383011-8e48-46ef-8094-cc656b6eccc0": {
      "main": [
        [
          {
            "node": "c6d0cbd6-cbed-458a-a630-804b1fe34ca8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "da68cf9b-f4ef-417b-9747-a5a98a535e72": {
      "main": [
        [
          {
            "node": "66784d91-6263-44db-8723-176527cd93aa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b86f044c-4183-4d33-998c-587c9079e1c3": {
      "ai_languageModel": [
        [
          {
            "node": "cbee4ab0-e47f-4543-be38-1f748d88142b",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "299eddc0-de9d-4fea-a4de-96ed7a4f9c79": {
      "main": [
        [
          {
            "node": "32b6f415-a837-4783-a76c-795276d3c4e4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Création de contenu, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Workflows recommandés

Générer automatiquement des publications de médias sociaux à partir d'URL en utilisant l'IA, Telegram et une publication multiplateforme
Génération automatique de publications de médias sociaux avec AI, Telegram et publication multiplateforme à partir d'URL
If
Set
Code
+
If
Set
Code
42 NœudsKarol
Création de contenu
Génération de blog WordPress optimisé pour le SEO avec Gemini, Tavily et une révision humaine
Utiliser Gemini, Tavily et une révision manuelle pour générer des articles de blog WordPress optimisés SEO
If
Set
Code
+
If
Set
Code
38 NœudsAryan Shinde
Création de contenu
Création et téléchargement de vidéos AI vers Instagram, TikTok et YouTube
Création de vidéos pilotée par l'IA depuis Google Drive, téléchargement sur Instagram, TikTok et YouTube
If
Set
Code
+
If
Set
Code
53 NœudsDevCode Journey
Création de contenu
Automatisation de la publication RSS vers Medium avec Groq, Gemini et un système d'approbation Slack
Automatisation du flux de publication de RSS vers Medium avec Groq, Gemini et le système d'approbation Slack
If
Set
Code
+
If
Set
Code
41 NœudsObisDev
Création de contenu
Agrégation de contenu
Automatiser la publication de publications sur les réseaux sociaux à partir d'articles de site web vers LinkedIn et X/Twitter avec Gemini AI
If
Set
Xml
+
If
Set
Xml
34 NœudsVadim
Création de contenu
Automatisation LinkedIn
Utiliser l'IA Gemini et un processus d'approbation pour convertir les messages Telegram en publications LinkedIn professionnelles
If
Set
Code
+
If
Set
Code
54 NœudsSateesh
Création de contenu
Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds34
Catégorie2
Types de nœuds14
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34