Back to Integrations
integrationWebhook node
integrationFacebook Graph API node

Webhook and Facebook Graph API integration

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

How to connect Webhook and Facebook Graph API

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: 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.

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

Step 2: Add and configure Webhook and Facebook Graph API nodes

You can find Webhook and Facebook Graph API in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Webhook and Facebook Graph API nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Webhook and Facebook Graph API integration: Add and configure Webhook and Facebook Graph API nodes

Step 3: Connect Webhook and Facebook Graph API

A connection establishes a link between Webhook and Facebook Graph API (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Webhook and Facebook Graph API integration: Connect Webhook and Facebook Graph API

Step 4: Customize and extend your Webhook and Facebook Graph API integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Webhook and Facebook Graph API with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Webhook and Facebook Graph API integration: Customize and extend your Webhook and Facebook Graph API integration

Step 5: Test and activate your Webhook and Facebook Graph API workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Webhook to Facebook Graph API or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Webhook and Facebook Graph API integration: Test and activate your Webhook and Facebook Graph API workflow

Extract trends, auto-generate social content with AI, Reddit, Google & post

Extract Trends and Auto-Generate Social Media Content with OpenAI, Reddit, and Google Trends: Approve and Post to Instagram, TikTok, and More

Description
What Problem Does This Solve? 🛠️
This workflow automates trend extraction and social media content creation for businesses and marketers. It eliminates manual trend research and content generation by fetching trends, scoring them with AI, and posting tailored content to multiple platforms. Target audience: Social media managers, digital marketers, and businesses aiming to streamline content strategies.

What Does It Do? 🌟
Fetches trending topics from Reddit, X and Google Trends
Scores trends for relevance using OpenAI.
Generates content for Twitter/X, LinkedIn, Instagram and Facebook
Posts to supported platforms
Stores results in Google Sheets for tracking

Key Features 📋
Real-time trend fetching from Reddit and Google Trends.
AI-driven trend scoring and content generation (OpenAI).
Automated posting to Twitter/X, LinkedIn, Instagram, and Facebook.
Persistent storage in Google Sheets.
Setup Instructions

Prerequisites ⚙️
n8n Instance**: Self-hosted or cloud n8n instance.
API Credentials**:
Reddit API: Client ID and secret from Reddit.
SerpApi (Google Trends): API key from SerpApi, stored in n8n credentials
OpenAI API: API key with GPT model access.
Twitter/X API: OAuth 1.0a credentials with write permissions.
LinkedIn API: OAuth 2.0 credentials with w_organization_social scope.
Instagram/Facebook API: Meta Developer app with posting permissions.
Google Sheets API: Credentials from Google Cloud Console.

Installation Steps 📦
Import the Workflow:
Copy the workflow JSON from the "Template Code" section below.
Import it into n8n via "Import from File" or "Import from URL".
Configure Credentials:
Add API credentials in n8n’s Credentials section for Reddit, SerpApi, OpenAI, Twitter/X, LinkedIn, Instagram/Facebook, and Google Sheets.
Assign credentials to respective nodes. For example:
In the Fetch Google Trends node (HTTP Request), use n8n credentials for SerpApi instead of hardcoding the API key.
Example: Set the API key in n8n credentials as SerpApiKey and reference it in the node’s query parameter: api_key={{ $credentials.SerpApiKey }}.
Set Up Google Sheets with the following columns (exact column names are case-sensitive)
-Timestamp | Trend | Score | BrandVoice | AudienceMood |

Customize Nodes:
OpenAI Nodes** (Trend Relevance Scoring, Generate Social Media Content): Update the model (e.g., gpt-4o) and prompt as needed.
HTTP Request Nodes** (Post to Twitter/X, Post to LinkedIn, etc.): Verify URLs, authentication, and payloads.
Brand Voice/Audience Mood**: Adjust Prepare Trend Scoring Input for your desired brand_voice (e.g., "casual") and audience_mood (e.g., "curious").
Test the Workflow:
Fetch Reddit Trends to Store Selected Trends- to score and store trends.
Retrieve Latest Trends to end) to generate and post content
Check Google Sheets for posting statuses
How It Works

High-Level Steps 🔍
Fetch Trends**: Pulls trends from Reddit,X and Google Trends.
Score Trends**: Uses OpenAI to score trends for relevance.
Generate Content**: Creates platform-specific social media content.
Post Content**: Posts to LinkedIn, Facebook or X

Detailed descriptions are available in the sticky notes within the workflow screenshot above.

Node Names and Actions

Trend Extraction and Scoring
Daily Trigger Idea: Triggers the workflow daily.
Set Default Inputs: Sets default brand_voice and inputs.
Fetch Reddit Trends: Fetches Reddit posts.
Extract Reddit Trends: Extracts trends from Reddit.
Fetch Google Trends: Fetches Google Trends via SerpApi.
Extract Google Trends2: Processes Google Trends data.
Fetch Twitter Mentions: Fetches Twitter mentions.
Translate Tweets to English: Translates tweets.
Fix Tweet Translation Output: Fixes translation format.
Detect Audience Mood: Detects audience mood.
Fix Audience Mood Output: Fixes mood output format.
Analyze News Sentiment: Analyzes news sentiment.
Combine Data (Merge): Merges all data sources.
Merge Items into Single Item: Combines data into one item.
Combine Trends and UGC: Combines trends with UGC.
Prepare Trend Scoring Input: Prepares data for scoring.
Trend Relevance Scoring: Scores trends with OpenAI.
Parse Trend Scores: Parses scoring output.
Store Selected Trends: Stores trends in Google Sheets.

Content Generation and Posting
Retrieve Latest Trends: Retrieves trends from Google Sheets.
Parse Retrieved Trends: Parses retrieved trends.
Select Top Trends: Selects the top trend.
Generate Social Media Content: Generates platform-specific content.
Parse Social Media Content: Parses generated content.
Generate Images: Generates images for posts (if applicable).
-Handle Approvals/Rejection before Posting
Post to Instagram: Posts to Instagram.
Post to Facebook: Posts to Facebook.
Post to LinkedIn: Posts to LinkedIn.

Customization Tips

Add Trend Sources** 📡: Include more sources (e.g., Instagram trends) by adding nodes to Combine Data (Merge).
Change Content Tone** ✍️: Update the Generate Social Media Content prompt for a different tone (e.g., "humorous").
Adjust Schedule** ⏰: Modify Daily Trigger Idea to run hourly or weekly.
Automate TikTok/YouTube** 🎥: Add video generation (e.g., FFMPEG) to post TikTok and YouTube Shorts

Nodes used in this workflow

Popular Webhook and Facebook Graph API workflows

+2

Automated Instagram Reels Workflow

This workflow automates the process of creating and posting Instagram Reels, combining Google Drive, AI, Airtable, and the Facebook Graph API. It supports two content creation paths: Scheduled Random Video Selection & Posting Selects a random video from a Google Drive folder named "Random video mover" based on a schedule. Moves the video to a processing folder for posting. Manual Upload Trigger & Posting Watches a specific Google Drive folder ("n8n reels automation on instagram"). Triggers the workflow when a new video is uploaded. Core Process (applies to both paths) Download Video from Google Drive. AI Caption Generation with Google Gemini, using the file name as context. The AI creates concise captions with hashtags and a call-to-action. Airtable Logging to store video name, caption, and URL. Instagram Reels Posting via the Facebook Graph API. Recent Change In early 2025, Meta tightened its requirements for video_url and image_url parameters. URLs must now be direct, public links to the raw media file with no redirects or authentication. Google Drive links no longer work. Our Fix Store the binary file locally on the n8n server at /tmp/video.mp4. Serve the file through a public n8n webhook with the correct Content-Type. Use the webhook URL in the Facebook Graph API request. Upload succeeds without the “Media download has failed” error. Cleanup Deletes the temporary file after posting. Benefits Saves time with full automation. Improves engagement through AI-generated captions. Keeps content organized in Airtable. Works with Meta’s updated API requirements by hosting files directly from the n8n server.
+3

Extract Trends, Auto-Generate Social Content with AI, Reddit, Google & Post

Extract Trends and Auto-Generate Social Media Content with OpenAI, Reddit, and Google Trends: Approve and Post to Instagram, TikTok, and More Description What Problem Does This Solve? 🛠️ This workflow automates trend extraction and social media content creation for businesses and marketers. It eliminates manual trend research and content generation by fetching trends, scoring them with AI, and posting tailored content to multiple platforms. Target audience: Social media managers, digital marketers, and businesses aiming to streamline content strategies. What Does It Do? 🌟 Fetches trending topics from Reddit, X and Google Trends Scores trends for relevance using OpenAI. Generates content for Twitter/X, LinkedIn, Instagram and Facebook Posts to supported platforms Stores results in Google Sheets for tracking Key Features 📋 Real-time trend fetching from Reddit and Google Trends. AI-driven trend scoring and content generation (OpenAI). Automated posting to Twitter/X, LinkedIn, Instagram, and Facebook. Persistent storage in Google Sheets. Setup Instructions Prerequisites ⚙️ n8n Instance**: Self-hosted or cloud n8n instance. API Credentials**: Reddit API: Client ID and secret from Reddit. SerpApi (Google Trends): API key from SerpApi, stored in n8n credentials OpenAI API: API key with GPT model access. Twitter/X API: OAuth 1.0a credentials with write permissions. LinkedIn API: OAuth 2.0 credentials with w_organization_social scope. Instagram/Facebook API: Meta Developer app with posting permissions. Google Sheets API: Credentials from Google Cloud Console. Installation Steps 📦 Import the Workflow: Copy the workflow JSON from the "Template Code" section below. Import it into n8n via "Import from File" or "Import from URL". Configure Credentials: Add API credentials in n8n’s Credentials section for Reddit, SerpApi, OpenAI, Twitter/X, LinkedIn, Instagram/Facebook, and Google Sheets. Assign credentials to respective nodes. For example: In the Fetch Google Trends node (HTTP Request), use n8n credentials for SerpApi instead of hardcoding the API key. Example: Set the API key in n8n credentials as SerpApiKey and reference it in the node’s query parameter: api_key={{ $credentials.SerpApiKey }}. Set Up Google Sheets with the following columns (exact column names are case-sensitive) -Timestamp | Trend | Score | BrandVoice | AudienceMood | Customize Nodes: OpenAI Nodes** (Trend Relevance Scoring, Generate Social Media Content): Update the model (e.g., gpt-4o) and prompt as needed. HTTP Request Nodes** (Post to Twitter/X, Post to LinkedIn, etc.): Verify URLs, authentication, and payloads. Brand Voice/Audience Mood**: Adjust Prepare Trend Scoring Input for your desired brand_voice (e.g., "casual") and audience_mood (e.g., "curious"). Test the Workflow: Fetch Reddit Trends to Store Selected Trends- to score and store trends. Retrieve Latest Trends to end) to generate and post content Check Google Sheets for posting statuses How It Works High-Level Steps 🔍 Fetch Trends**: Pulls trends from Reddit,X and Google Trends. Score Trends**: Uses OpenAI to score trends for relevance. Generate Content**: Creates platform-specific social media content. Post Content**: Posts to LinkedIn, Facebook or X Detailed descriptions are available in the sticky notes within the workflow screenshot above. Node Names and Actions Trend Extraction and Scoring Daily Trigger Idea: Triggers the workflow daily. Set Default Inputs: Sets default brand_voice and inputs. Fetch Reddit Trends: Fetches Reddit posts. Extract Reddit Trends: Extracts trends from Reddit. Fetch Google Trends: Fetches Google Trends via SerpApi. Extract Google Trends2: Processes Google Trends data. Fetch Twitter Mentions: Fetches Twitter mentions. Translate Tweets to English: Translates tweets. Fix Tweet Translation Output: Fixes translation format. Detect Audience Mood: Detects audience mood. Fix Audience Mood Output: Fixes mood output format. Analyze News Sentiment: Analyzes news sentiment. Combine Data (Merge): Merges all data sources. Merge Items into Single Item: Combines data into one item. Combine Trends and UGC: Combines trends with UGC. Prepare Trend Scoring Input: Prepares data for scoring. Trend Relevance Scoring: Scores trends with OpenAI. Parse Trend Scores: Parses scoring output. Store Selected Trends: Stores trends in Google Sheets. Content Generation and Posting Retrieve Latest Trends: Retrieves trends from Google Sheets. Parse Retrieved Trends: Parses retrieved trends. Select Top Trends: Selects the top trend. Generate Social Media Content: Generates platform-specific content. Parse Social Media Content: Parses generated content. Generate Images: Generates images for posts (if applicable). -Handle Approvals/Rejection before Posting Post to Instagram: Posts to Instagram. Post to Facebook: Posts to Facebook. Post to LinkedIn: Posts to LinkedIn. Customization Tips Add Trend Sources** 📡: Include more sources (e.g., Instagram trends) by adding nodes to Combine Data (Merge). Change Content Tone** ✍️: Update the Generate Social Media Content prompt for a different tone (e.g., "humorous"). Adjust Schedule** ⏰: Modify Daily Trigger Idea to run hourly or weekly. Automate TikTok/YouTube** 🎥: Add video generation (e.g., FFMPEG) to post TikTok and YouTube Shorts

Upload Video & Image Ads to Meta Ads Manager from Google Sheets & Google Drive

Upload Video & Image Ads to Meta Ads Manager from Google Sheets using Google Drive & Meta Graph API Product Description This n8n workflow automates the process of uploading video and image advertisements to Meta Ads Manager via the Meta Graph API (Facebook Ads) directly from Google Sheets and Google Drive. The workflow monitors a specified Google Drive folder for new assets, extracts file metadata, and creates Facebook ad campaigns with customizable creative elements including multiple text variations, headlines, and descriptions. The automation supports both video and image assets, with intelligent handling of single or multiple image creatives. For video assets, it manages the upload process, monitors processing status, and automatically generates preview thumbnails. Image assets can be configured with multiple variations and custom placement targeting across Facebook, Instagram, Messenger, and Audience Network. Key Features Automated Asset Monitoring**: Watches Google Drive folder for new uploads and file updates Multi-Format Support**: Handles both video and image advertisements Flexible Creative Options**: Supports multiple text variations, headlines, and descriptions Smart Image Handling**: Creates single or multi-image creatives based on available assets Cross-Platform Targeting**: Configures ads for Facebook, Instagram, Messenger, and Audience Network Status Tracking**: Updates Google Sheets with upload progress and ad IDs Batch Processing**: Processes multiple ads efficiently with built-in rate limiting Direct Sheet Integration**: Upload ads directly from Google Sheets using custom menu Prerequisites Required Accounts & Access Meta Developer Account**: Required for Facebook Graph API access Meta Business Manager**: Active ad account with appropriate permissions Google Account**: With access to Google Drive and Google Sheets APIs n8n Instance**: Self-hosted or cloud instance with appropriate node packages Technical Requirements Meta App must be set to "Live" status (not Development mode) Facebook Graph API v22.0 access Google Drive API credentials with folder access permissions Google Sheets API credentials with read/write permissions Setup Instructions Meta Developer Setup Create a Meta Developer account and register a new app Generate a long-lived access token with the following permissions: ads_management business_management pages_read_engagement Ensure your app status is set to "Live" Note your Ad Account ID, Page ID, and Instagram User ID Google Services Configuration Create a Google Cloud project and enable: Google Drive API Google Sheets API Generate OAuth2 credentials for both services Create a dedicated Google Drive folder for asset uploads Make a copy of the Google Sheets template Workflow Configuration Import the workflow JSON into your n8n instance Configure the following credentials: Facebook Graph API (using your access token) Google Drive OAuth2 API Google Sheets OAuth2 API Settings Configuration Update the settings and settings_1 nodes with: Your Google Sheets URL Your Google Drive folder URL Execute and pin these settings nodes to preserve configurations Google Sheets Setup Fill in the "Settings" tab of your copied template with: Ad Account IDs Page IDs Instagram User IDs Webhook URL: Copy the webhook URL from your n8n workflow and paste it in the settings tab Configure your ad campaigns in the "Ready to Upload" sheet Asset Management Upload your video/image assets to the designated Google Drive folder Ensure file naming follows your tracking conventions Update the Google Sheets with corresponding asset information Workflow Triggers The workflow can be activated through: Manual Trigger**: For testing and one-time executions Google Drive Trigger**: Automatic execution when files are added/updated Webhook Trigger**: Integration with Google Apps Script for direct sheet control Custom Menu Integration**: Upload ads directly from Google Sheets via "Meta → Upload Ads" menu option Using the Custom Menu The Google Sheets template includes a custom Google Apps Script that adds a "Meta" menu to your spreadsheet. To upload ads: Ensure the webhook URL is correctly configured in the Settings tab Navigate to the "Meta" menu in your Google Sheet Click "Upload Ads" to trigger the workflow The workflow will process all ads marked for upload in the "Ready to Upload" sheet File Support Video Assets**: MP4, MOV, AVI formats (uploaded via Meta's video API) Image Assets**: JPG, PNG formats with support for multiple creative variations Large File Handling**: Includes workaround for Google Drive virus scanning on large files Important Notes All ads are created in "PAUSED" status for review before activation The workflow includes built-in delays to respect API rate limits Asset processing status is monitored and updated in real-time Multiple text variations enable A/B testing capabilities Custom placement rules optimize ad delivery across different platforms Webhook Configuration**: Ensure the webhook URL in your Google Sheets settings matches your n8n workflow webhook endpoint This automation significantly reduces manual work in Meta Ads Manager while maintaining full control over creative elements and targeting parameters.
+7

AI Sales Agent: WhatsApp, FB, IG, OpenAI, Airtable, Supabase Auto-Booking

This workflow automates multi-channel AI-driven sales engagement for lead qualification, service information delivery, and consultation booking. It integrates WhatsApp, Facebook Messenger, Instagram DM, and an n8n chat interface with a backend CRM (Airtable), a knowledge base (Supabase), and conversational AI (OpenAI), all orchestrated by n8n. Tools & Services Used Messaging Platforms: WhatsApp, Facebook Messenger, Instagram DM, n8n Built-in Chat AI Core & Processing: OpenAI (GPT-4o for main agent logic, Whisper for audio transcription) CRM & Data Management: Airtable (for initial WhatsApp lead lookup, lead form submissions, and as the backend for the crmAgent sub-workflow operations) Knowledge Base: Supabase (Vector Store for technical_and_sales_knowledge tool) Chat Memory: PostgreSQL (for the main AI Agent's conversation history) Orchestration & Automation: n8n (Self-hosted, utilizing Langchain community nodes) Calendar Service: Integrated via the calendarAgent sub-workflow CRM Service: Integrated via the crmAgent sub-workflow (interacting with Airtable) Workflow Overview This automation performs the following steps: Trigger: A new interaction is initiated through one of the following channels: A new message is received via the WhatsApp Trigger. A new message is received via the Facebook Trigger (Webhook). A new message is received via the Instagram Trigger (Webhook). A new message is received via the n8n Chat Trigger. Alternatively, a new lead is submitted via the Airtable Form Submitted Webhook. Channel-Specific Ingestion & Pre-processing: For WhatsApp: The system attempts to find an existing lead in Airtable using the sender's phone number. Incoming messages are routed by the Handle Message Types switch: Text messages are passed to the Edit Fields - chat1 node to prepare input for the AI Agent, including any found lead information. Audio messages are processed: the WhatsApp Business Cloud node gets the media URL, the HTTP Request node downloads the audio, OpenAI transcribes it to text, and Edit Fields - chat2 prepares this transcribed text and lead information for the AI Agent. Unsupported message types trigger the Reply To User1 node to send a notification that the message type cannot be processed. For Facebook Messenger: The system responds to webhook verification (Respond to Webhook - facebook get) and acknowledges new messages (Respond to Webhook - facebook post). The If is not echo - facebook node filters out messages sent by the page. The Sales Agent Demo - typing_on node sends a typing indicator. The Edit Fields - facebook node prepares the message text, sender ID, and Facebook-specific context for the AI Agent. For Instagram DM: The system responds to webhook verification (Respond to Webhook - instagram get) and acknowledges new messages (Respond to Webhook - instagram post). The If is not echo - instagram node filters out messages sent by the business account. The Edit Fields - instagram node prepares the message text, sender ID, and Instagram-specific context for the AI Agent. For n8n Chat: The Edit Fields - chat node prepares the user's input and session information for the AI Agent. Input Aggregation for AI Agent: Processed data from all active messaging channels (WhatsApp text/audio, Facebook, Instagram, n8n Chat) is funneled through the No Operation, do nothing node to the main AI Agent. AI Sales Conversation & Tool Utilization: The AI Agent (using OpenAI Chat Model - GPT-4o, and Postgres Chat Memory) engages the user according to its system prompt, aiming to qualify them for Paint Protection Film (PPF), Ceramic Coating, or Window Tint. The AI Agent uses the technical_and_sales_knowledge tool (which queries the Demo Supabase vector store via Embeddings OpenAI and OpenAI Chat Model1) to provide service details and answer questions. The AI Agent uses the crmAgent tool (a sub-workflow) to log contact details (Name, Email, service interest) and update opportunity statuses in Airtable. The AI Agent uses the calendarAgent tool (a sub-workflow) to book consultation appointments once preferred dates/times are provided. This occurs after contact details are logged in the CRM. Response Delivery: The AI Agent's final textual response is passed to the Switch node. The Switch node routes the response to the appropriate node for delivery on the original channel: Reply To User for WhatsApp. Facebook Graph API - Sales Agent Demo for Facebook Messenger. Instagram Graph API - smb.sales.agent.demo for Instagram DM. Output - chat for the n8n Chat interface. Airtable Form Submission Processing (Separate Branch): When the Airtable Form Submitted webhook receives data, the Airtable node fetches the full record. The Create Contact node creates a new contact in the Airtable 'Contacts' table. The Edit Fields - form node prepares data for a notification. The WhatsApp Business Cloud2 node sends a templated WhatsApp message to the lead, confirming their form submission.

Facebook/Meta Conversion API for eCommerce Leads/Orders

This n8n workflow helps eCommerce businesses (especially in the Cash on Delivery space) send real-time order events to the Meta (Facebook) Conversions API, ensuring accurate event tracking and better ad attribution. Features Webhook Listener**: Accepts incoming order data (name, phone, IP, user-agent, etc.) via HTTP POST/GET. Data Normalization**: Cleans and formats first_name, last_name, phone, and event_time according to Facebook's strict specs. Data Hashing**: Securely hashes sensitive user data (SHA256), as required by Meta. Full Custom Data Suppor**t: Pass order value, currency, and more. Ideal For: Shopify, WooCommerce, custom stores (Laravel, Node, etc.) Businesses using Meta Ads and needing high-quality server-side tracking Teams without access to full dev resources, but using n8n for automation How It Works: Receive Order from your store via Webhook or API. Format & Normalize fields to match Facebook’s expected structure. Encrypt Sensitive Fields using SHA256 (name, phone, email). Send to Facebook via the Conversions API endpoint. Requirements: A Meta Business Manager account with Conversions API access Your Access Token and Pixel ID set up in n8n credentials
+8

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 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 Webhook and Facebook Graph API integration

Create custom Webhook and Facebook Graph API 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.

Webhook and Facebook Graph API integration details

integrationWebhook node
Webhook

Webhooks are automatic notifications that apps send when something occurs. They are sent to a certain URL, which is effectively the app's phone number or address, and contain a message or payload. Polling is nearly never quicker than webhooks, and it takes less effort from you.

integrationFacebook Graph API node
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.

Use case

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

FAQs

  • Can Webhook connect with Facebook Graph API?

  • Can I use Webhook’s API with n8n?

  • Can I use Facebook Graph API’s API with n8n?

  • Is n8n secure for integrating Webhook and Facebook Graph API?

  • How to get started with Webhook and Facebook Graph API integration in n8n.io?

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

Discover our latest community's recommendations and join the discussions about Webhook and Facebook Graph API integration.
Benjamin Hatton
Albert Ashkhatoyan
Víctor González
Salomão
sg tech

Looking to integrate Webhook and Facebook Graph API in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Webhook with Facebook Graph API

Build complex workflows, really fast

Build complex workflows, really fast

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

Code when you need it, UI when you don't

Simple debugging

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

Use templates to get started fast

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

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon