Publicar historias de video en tu página de Facebook

Avanzado

Este es unSocial Mediaflujo de automatización del dominio deautomatización que contiene 16 nodos.Utiliza principalmente nodos como If, Set, Code, GoogleDrive, HttpRequest. Automatizar la publicación de historias de video en páginas de Facebook desde Google Drive y Sheets

Requisitos previos
  • Credenciales de API de Google Drive
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Credenciales de API de Google Sheets

Categoría

Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "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": "Disparador programado",
      "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": "Buscar archivos y carpetas",
      "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": "Disparador programado1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1664,
        -256
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8242c54c-0100-40ab-9ef3-10eee0587e40",
      "name": "Append or update row in sheet",
      "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": "If",
      "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": "Step 1: Initialize 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": "Establecer to the total size in bytes",
      "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": "Step 2: Upload the stored file",
      "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": "Step 3. Post video",
      "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": "Get upload status",
      "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": "Update upload status in sheet",
      "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": "Nota adhesiva",
      "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": "Nota adhesiva1",
      "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": "Get Row Sheet",
      "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": "Set to the total size in bytes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "644cfefc-9786-4c56-96ac-4c9bcb7907bc": {
      "main": [
        [
          {
            "node": "0e173c5f-d33a-4b6e-ba29-89b815c1e26c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "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
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d2e56376-e073-4a69-92be-002690c363c7": {
      "main": [
        [
          {
            "node": "4e5360d8-184b-42c7-b21c-6179ede6f2ff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "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
          }
        ]
      ]
    },
    "Set to the total size in bytes": {
      "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
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Avanzado - Redes sociales

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos16
Categoría1
Tipos de nodos8
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34