See llms.txt for all machine-readable content.

Facebook Graph API and YouTube integration

Save yourself the work of writing custom integrations for Facebook Graph API and YouTube and use n8n instead. Build adaptable and scalable Development, workflows that work with your technology stack. All within a building experience you will love.

How to connect Facebook Graph API and YouTube

Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Facebook Graph API and YouTube integration: Create a new workflow and add the first step

Create & approve POV videos with AI, ElevenLabs & multi-posting (TikTok/IG/YT)

POV Video Creator: Automating TikTok-Style Instagram Video Automation, Approval, and Multi-Platform Posting Using AI, ElevenLabs, Google Sheets, and Social Media APIs POV Videos Automation.png Description What Problem Does This Solve? 🎥 This workflow automates the creation, rendering, approval, and posting of TikTok-style POV (Point of View) videos to Instagram, with cross-posting to Facebook and YouTube. It eliminates manual video production, approval delays, and inconsistent posting schedules. It ensures high-quality content creation and distribution for social media managers and content creators Target audience: Social media managers, content creators, small to medium-sized businesses, and n8n users familiar with AI tools, Google Sheets, and social media APIs What Does It Do? 🌟 Generates daily POV video ideas using OpenAI Creates images, videos, and audio with PIAPI.ai and ElevenLabs Renders final videos with Creatomate Manages approvals via email and Google Sheets Posts approved videos to Instagram, Facebook, and YouTube Tracks progress in a Google Sheet for transparency Key Features AI-driven idea generation and script creation Automated media production with image, video, and audio synthesis Email-based approval system for quality control Cross-platform posting to Instagram, Facebook, and YouTube Real-time tracking in Google Sheets and Google Drive Error handling for rendering and posting failures Setup Instructions Prerequisites n8n Instance: Self-hosted or cloud n8n instance API Credentials: OpenAI API: API key for idea generation, stored in n8n credentials PIAPI.ai API: API key for image and video generation, stored in n8n credentials ElevenLabs API: API key for audio generation, stored in n8n credentials Creatomate API: API key for video rendering, stored in n8n credentials Google Sheets/Drive API: OAuth2 credentials from Google Cloud Console with Sheets and Drive scopes Gmail API: OAuth2 credentials from Google Cloud Console with Gmail scope Instagram Graph API: User Access Token with instagram_content_publish permission from a Facebook App Facebook Graph API: Access Token from the same Facebook App YouTube API: OAuth2 credentials for YouTube uploads Google Sheet: A sheet named "POV Videos" with a tab "Instagram" and columns: Timestamp, ID, Subject, Topic, Caption, POV_Status, Prompt, Publish_Status, Link, Final Video, Approval, row_number Creatomate Template: A pre-configured template with video, audio, and text elements Installation Steps Import the Workflow: Copy the workflow JSON from the “Template Code” section (to be provided) Import it into n8n via “Import from File” or “Import from URL” Configure Credentials: Add API credentials in n8n’s Credentials section for OpenAI, PIAPI.ai, ElevenLabs, Creatomate, Google Sheets/Drive, Gmail, Instagram Graph, Facebook Graph, and YouTube Assign credentials to respective nodes. For example: In "Text-to-Image", use PIAPI.ai credentials: {{ $credentials.PIAPI }} In "Render with Creatomate", use Creatomate credentials: {{ $credentials.Creatomate }} In "Send Approval Request", use Gmail credentials Set Up Nodes: Schedule Trigger: Configure to run daily Approval Email (Send Approval Request): Customize the HTML email template with approval/rejection links Post to Social Media Nodes (Instagram Container, Facebook Posts, Post YouTube): Configure with your Instagram Business Account ID, Facebook Page ID, and YouTube channel details Configure Google Sheet and Drive: Create "POV Videos" Google Sheet with "Instagram" tab and specified columns Share the sheet with your Google Sheets credential email Create "Audio" and "Video" folders in Google Drive, noting their IDs Test the Workflow: Run manually to verify idea generation, media creation, and posting Check email notifications, Google Sheet updates, and social media posts Schedule the Workflow: Enable "Schedule Trigger" and "Schedule Trigger1" for daily runs Enable "Get Latest Approved Video" to poll at 7 PM daily How It Works High-Level Steps Generate Video Ideas: Creates daily POV video concepts with OpenAI Create Media: Produces images, videos, and audio using AI tools Render Video: Combines media into a final video with Creatomate Manage Approvals: Sends approval emails and processes decisions Post to Platforms: Publishes approved videos to Instagram, Facebook, and YouTube Detailed Descriptions Detailed node descriptions are available in the sticky notes within the workflow (to be provided). Below is a summary of key actions Node Names and Actions Video Idea Generation and Script Creation Schedule Trigger: Initiates daily workflow Get Title: Fetches pending video ideas from Google Sheet Generate Topics: Uses OpenAI to create a new video idea Format Row: Structures the idea into a Google Sheet row Insert new Prompt, Caption and Title/Topic: Adds the idea to Google Sheet Generate Ideas: Produces 3 POV sequences Generate Script: Expands a sequence into a detailed script Set Topics: Stores the script for media creation Media Creation Text-to-Image: Generates an image with PIAPI.ai Get Image: Retrieves the generated image Generate Video Prompt: Creates a video prompt from the image Generate Video: Produces a 5-second video with PIAPI.ai Access Videos: Retrieves the video URL Store Video: Updates Google Sheet with video URL Generate Sound Prompt: Creates an audio prompt Text-to-Sound: Generates a 20-second audio clip with ElevenLabs Store Sound: Uploads audio to Google Drive Allow Access: Sets audio file permissions Video Rendering Merge: Combines script, video, and audio data List Elements: Formats data for Creatomate Render with Creatomate: Renders the final video Check Video Status: Routes based on render success/failure Storage and Notification Google Drive: Uploads the rendered video New Render Video Alert: Sends success email Failed Render: Sends failure email Render Video Link: Updates Google Sheet with final video URL Approval Process Approval Email: Sends approval request email Handle Approval/Rejection1: Processes approval/rejection via webhook Video Update1: Updates Google Sheet with approval status Social Media Posting Get Latest Approved Video: Polls for approved videos Check Approval: Routes based on approval status Instagram Container: Creates Instagram media container Post to Instagram: Publishes to Instagram Facebook Posts: Posts to Facebook Download Video: Downloads video for YouTube Post YouTube: Uploads to YouTube Mark Rejected: Updates status for rejected videos Update Google Sheet: Updates publish status Customization Tips Expand Platforms: Add nodes to post to other platforms Modify Approval Email: Update the Send Approval Request node to customize the HTML template Alternative Notifications: Add nodes for Slack or Telegram alerts Adjust Video Duration: Modify Generate Video node to change duration (default: 5 seconds)

Build your own Facebook Graph API and YouTube integration

Create custom Facebook Graph API and YouTube workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

YouTube supported actions

Facebook Graph API and YouTube integration details

Facebook Graph API

Facebook Graph API

Facebook needs no introduction. It is an online social networking and media service that gathers people from all parts of the world, from different backgrounds, and allows them to promote their businesses and services, share, react to and comment on all types of content, and communicate and message their friends.

YouTube

YouTube

YouTube is the best video hosting and social media website where users can upload, watch, comment, rate and share streaming videos. It is now one of the most popular sites on the Web, with visitors watching around 6 billion hours of video every month.

Automate lead management

Using too many marketing tools? n8n lets you orchestrate all your apps into one cohesive, automated workflow.

Learn more

Save engineering resources

Reduce time spent on customer integrations, engineer faster POCs, keep your customer-specific functionality separate from product all without having to code.

Learn more

FAQ about Facebook Graph API integrations

Need help setting up your Facebook Graph API and YouTube integration?

Discover our latest community's recommendations and join the discussions about Facebook Graph API and YouTube integration.

  • Tarek Moubarek

    YouTube Upload Node Fails with "Media type 'application/mp4' is not supported" Error

    Tarek Moubarek

    Bug Report: YouTube Upload Node Fails with “Media type ‘application/mp4’ is not supported” Error Summary The n8n YouTube node consistently fails when uploading standard .mp4 video files. It returns a HTTP 400 Bad Reque…

    Open topic
  • Jan Koch

    YouTube upload is failing

    Jan Koch

    Describe the problem/error/question I want to upload a Video from Google Drive to YouTube. I get the file downloaded and into a binary field but the upload in the YouTube node is failing with an “internal error” message.…

    Open topic
  • Nicolas Almazan

    Instagram DMs webhooks work only in test mode

    Nicolas Almazan

    I am having an issue when receiving direct messages on Instagram in LIVE mode within my workflow. I have Webhooks and HTTP requests configured in my workflow, but they are only triggered when I send direct messages from…

    Open topic
  • Cristian Martanov

    Best way to get leads from META?

    Cristian Martanov

    Hello! I have seen that there is a direct extractor of leads from META: Facebook Lead Ads Trigger, but there is also Graph API, which I think can also extract leads From what Im getting from online tutorials, this Facebo…

    Open topic

Looking to integrate Slack and VirusTotal in your company?

Three colleagues talking around laptops at a shared desk

Trusted by teams building smarter workflows.

Why

Why use n8n to integrate Facebook Graph API with YouTube

Handle branching, merging and iteration easily. Pause your workflow to wait for external events.

Re-run single steps to test changes in no time. And pin your data to avoid generating trigger events every time you execute.

Your data is displayed alongside your settings, making edge cases easy to track down.

Use 1000+ workflow templates available from our core team and our community.

Copy and paste, easily import and export workflows.

Simple enough to 
understand + sophisticated 
enough to ship

Man in a brown jacket working at his desk by a window