Publication de vidéos en histoire sur votre page Facebook

Avancé

Ceci est unSocial Mediaworkflow d'automatisation du domainecontenant 16 nœuds.Utilise principalement des nœuds comme If, Set, Code, GoogleDrive, HttpRequest. Automatiser la publication d'histoires vidéo sur la page Facebook avec Google Drive et Sheets

Prérequis
  • Informations d'identification Google Drive API
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
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": "Y0jw3nbvhkigsAeh",
  "meta": {
    "instanceId": "b5825084f383ba38862ba0b5b7e95c5107a40c4ed7afc78372d74501163a8e33",
    "templateCredsSetupCompleted": true
  },
  "name": "Post a video story on your Facebook Page",
  "tags": [
    {
      "id": "U9LHxJS6pH2YCEtj",
      "name": "Sheet",
      "createdAt": "2025-10-13T08:26:02.584Z",
      "updatedAt": "2025-10-13T08:26:02.584Z"
    },
    {
      "id": "TSDrPBKIHGgril48",
      "name": "Page",
      "createdAt": "2025-10-13T08:26:02.604Z",
      "updatedAt": "2025-10-13T08:26:02.604Z"
    },
    {
      "id": "ph1PMcg0s6aIzhHu",
      "name": "Stories",
      "createdAt": "2025-10-13T08:27:45.422Z",
      "updatedAt": "2025-10-13T08:27:45.422Z"
    }
  ],
  "nodes": [
    {
      "id": "6610905b-a452-4271-b201-c78efb25371c",
      "name": "Déclencheur planifié",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1664,
        96
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 2,
              "triggerAtMinute": 30
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c0ba59ab-53b3-441a-a830-775dde0f4b41",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1344,
        416
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('If').first().json[\"File ID\"] }}"
        },
        "options": {
          "binaryPropertyName": "data"
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "b1IgmLfVK7MkWuXO",
          "name": "Google Drive account"
        }
      },
      "executeOnce": true,
      "typeVersion": 3,
      "alwaysOutputData": false
    },
    {
      "id": "5e527ed0-ddc1-450a-b655-127954c89fbb",
      "name": "info",
      "type": "n8n-nodes-base.set",
      "position": [
        -1440,
        96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0fc539bd-e223-4f1a-86b2-15e4b2a34df6",
              "name": "ID Page",
              "type": "string",
              "value": "<id page>"
            },
            {
              "id": "5ca53588-a5fd-47fe-a9db-5e8b42e88a19",
              "name": "Token",
              "type": "string",
              "value": "<token>"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d441d79f-4dcf-4142-8397-b433a5f8bf38",
      "name": "Rechercher fichiers et dossiers",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1376,
        -256
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "16tm-jSUaz4B4Xk8Dc0h-jxxKVydzwHKJ",
            "cachedResultUrl": "https://drive.google.com/drive/folders/16tm-jSUaz4B4Xk8Dc0h-jxxKVydzwHKJ",
            "cachedResultName": "n8n creator"
          }
        },
        "options": {
          "fields": [
            "id",
            "name"
          ]
        },
        "resource": "fileFolder",
        "returnAll": true,
        "queryString": "mimeType = 'video/mp4'",
        "searchMethod": "query"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "b1IgmLfVK7MkWuXO",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "6a4a9d0e-6e90-409e-9d75-2666edaad284",
      "name": "Déclencheur planifié1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1664,
        -256
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8242c54c-0100-40ab-9ef3-10eee0587e40",
      "name": "Ajouter ou mettre à jour une ligne dans la feuille",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1024,
        -256
      ],
      "parameters": {
        "columns": {
          "value": {
            "Name": "={{ $json.name }}",
            "File ID": "={{ $json.id }}",
            "Link Share": "=https://drive.google.com/uc?id={{ $json.id }}&export=download"
          },
          "schema": [
            {
              "id": "Stories",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Stories",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "File ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "File ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Link Share",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Link Share",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "File ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI/edit#gid=0",
          "cachedResultName": "Trang tính1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI/edit?usp=drivesdk",
          "cachedResultName": "Video stories facebook"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HfujyDOlKBcmEBrq",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "0e173c5f-d33a-4b6e-ba29-89b815c1e26c",
      "name": "Si",
      "type": "n8n-nodes-base.if",
      "position": [
        -1040,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e9464670-2642-4a70-9ec2-90211044bb72",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json[\"File ID\"] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "48727079-929a-49ec-9370-a327609c3d94",
      "name": "Étape 1 : Initialiser la session",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        -1648,
        416
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v23.0/{{ $('info').first().json['ID Page'] }}/video_stories",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "upload_phase",
              "value": "start"
            },
            {
              "name": "access_token",
              "value": "={{ $('info').first().json.Token }}"
            }
          ]
        }
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "5a0bf363-f623-4010-be5c-430fb107d814",
      "name": "Définir la taille totale en octets",
      "type": "n8n-nodes-base.code",
      "position": [
        -1040,
        416
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const size = item.binary.data.fileSize;\n  const contentLength = Buffer.from(item.binary.data.data, 'base64').length;\n\n  item.json = {\n    declaredSize: size,\n    actualSize: contentLength\n  };\n\n  return item;\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "49bcfba4-e00b-4297-8ce8-92418531eb34",
      "name": "Étape 2 : Téléverser le fichier stocké",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        -1680,
        656
      ],
      "parameters": {
        "url": "={{ $('Step 1: Initialize session').first().json.body.upload_url }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "offset",
              "value": "0"
            },
            {
              "name": "file_size",
              "value": "={{ $('Set to the total size in bytes').first().json.actualSize }}"
            },
            {
              "name": "Authorization",
              "value": "=OAuth {{ $('info').first().json.Token }}"
            }
          ]
        },
        "inputDataFieldName": "=data"
      },
      "typeVersion": 4.2
    },
    {
      "id": "d2e56376-e073-4a69-92be-002690c363c7",
      "name": "Étape 3 : Publier la vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        -1456,
        656
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v23.0/{{ $('info').first().json['Id Page'] }}/video_stories",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "video_id",
              "value": "={{ $('Step 1: Initialize session').item.json.body.video_id }}"
            },
            {
              "name": "upload_phase",
              "value": "finish"
            },
            {
              "name": "access_token",
              "value": "=EAAJQeT0qhu8BO7iHI2a7ZBNGmI2iLo1SJ6hUdhlyUoJe1dCZBAZC0wkVa9gyF6AUiG4fxfc36qvTyZBeJLR60EL0FRHBYdImZC6o6PZAvdj9ZAQUbGCNJfpEZC0MCuFYxU5XlHrVrTYaqcbjtkionualjCyPxHgAdBBVvsvTrKUcu8rh4Qb0yKe5JyfTCFqpyNstZBiPnSVw35wavyowusyh5rhMZD"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4e5360d8-184b-42c7-b21c-6179ede6f2ff",
      "name": "Obtenir l'état du téléversement",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        -1264,
        656
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v23.0/{{ $('Step 1: Initialize session').first().json.body.video_id }}",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "access_token",
              "value": "={{ $('info').first().json.Token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3d0876ac-b2e2-4813-862d-c1f544482787",
      "name": "Mettre à jour l'état dans la feuille",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1056,
        656
      ],
      "parameters": {
        "columns": {
          "value": {
            "row_number": "={{ $('If').first().json.row_number }}"
          },
          "schema": [
            {
              "id": "Stories",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Stories",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "File ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "File ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Link Share",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Link Share",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI/edit#gid=0",
          "cachedResultName": "Trang tính1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI/edit?usp=drivesdk",
          "cachedResultName": "Video stories facebook"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HfujyDOlKBcmEBrq",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "139aa6d4-a7fb-49e8-afa4-2b83a1c2937d",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        -304
      ],
      "parameters": {
        "width": 1536,
        "height": 272,
        "content": "## Automated Google Drive Video List Update to Google Sheet\n\nThis workflow is designed to **periodically search for new MP4 video files** \nin a specific Google Drive folder and **update the file details** \n(Name, File ID, Share Link) into a Google Sheet.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "6dd1a5f7-d7d1-45c0-8cc0-b93950d4df97",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        48
      ],
      "parameters": {
        "width": 1536,
        "height": 816,
        "content": "\n## Automated Video Posting\n to Facebook (3-Step Upload)\n\nThis advanced workflow is designed to\n **automatically upload a video to Facebook \nPage Stories** by following the platform's \nmulti-step uploading process, based on data pulled from a Google Sheet.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "644cfefc-9786-4c56-96ac-4c9bcb7907bc",
      "name": "Obtenir une ligne de la feuille",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        -1248,
        96
      ],
      "parameters": {
        "options": {
          "returnFirstMatch": true
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Stories"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI/edit#gid=0",
          "cachedResultName": "Trang tính1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RnE5O06l7W6TLCLKkwEH5Oyl-EZ3OE-Uc3OWFbDohYI/edit?usp=drivesdk",
          "cachedResultName": "Video stories facebook"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HfujyDOlKBcmEBrq",
          "name": "Google Sheets account"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.5,
      "alwaysOutputData": true
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0ab02551-da14-4f2f-b378-396d3aa12812",
  "connections": {
    "0e173c5f-d33a-4b6e-ba29-89b815c1e26c": {
      "main": [
        [
          {
            "node": "48727079-929a-49ec-9370-a327609c3d94",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "644cfefc-9786-4c56-96ac-4c9bcb7907bc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5e527ed0-ddc1-450a-b655-127954c89fbb": {
      "main": [
        [
          {
            "node": "644cfefc-9786-4c56-96ac-4c9bcb7907bc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c0ba59ab-53b3-441a-a830-775dde0f4b41": {
      "main": [
        [
          {
            "node": "5a0bf363-f623-4010-be5c-430fb107d814",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "644cfefc-9786-4c56-96ac-4c9bcb7907bc": {
      "main": [
        [
          {
            "node": "0e173c5f-d33a-4b6e-ba29-89b815c1e26c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6610905b-a452-4271-b201-c78efb25371c": {
      "main": [
        [
          {
            "node": "5e527ed0-ddc1-450a-b655-127954c89fbb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4e5360d8-184b-42c7-b21c-6179ede6f2ff": {
      "main": [
        [
          {
            "node": "3d0876ac-b2e2-4813-862d-c1f544482787",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6a4a9d0e-6e90-409e-9d75-2666edaad284": {
      "main": [
        [
          {
            "node": "d441d79f-4dcf-4142-8397-b433a5f8bf38",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d2e56376-e073-4a69-92be-002690c363c7": {
      "main": [
        [
          {
            "node": "4e5360d8-184b-42c7-b21c-6179ede6f2ff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d441d79f-4dcf-4142-8397-b433a5f8bf38": {
      "main": [
        [
          {
            "node": "8242c54c-0100-40ab-9ef3-10eee0587e40",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "48727079-929a-49ec-9370-a327609c3d94": {
      "main": [
        [
          {
            "node": "c0ba59ab-53b3-441a-a830-775dde0f4b41",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5a0bf363-f623-4010-be5c-430fb107d814": {
      "main": [
        [
          {
            "node": "49bcfba4-e00b-4297-8ce8-92418531eb34",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "49bcfba4-e00b-4297-8ce8-92418531eb34": {
      "main": [
        [
          {
            "node": "d2e56376-e073-4a69-92be-002690c363c7",
            "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é - Réseaux sociaux

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.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds16
Catégorie1
Types de nœuds8
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