Back to Integrations
integrationFacebook Graph API node
integrationX (Formerly Twitter) node

Facebook Graph API and X (Formerly Twitter) integration

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

How to connect Facebook Graph API and X (Formerly Twitter)

  • 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.

Facebook Graph API and X (Formerly Twitter) integration: Create a new workflow and add the first step

Step 2: Add and configure Facebook Graph API and X (Formerly Twitter) nodes

You can find Facebook Graph API and X (Formerly Twitter) 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 Facebook Graph API and X (Formerly Twitter) nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Facebook Graph API and X (Formerly Twitter) integration: Add and configure Facebook Graph API and X (Formerly Twitter) nodes

Step 3: Connect Facebook Graph API and X (Formerly Twitter)

A connection establishes a link between Facebook Graph API and X (Formerly Twitter) (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.

Facebook Graph API and X (Formerly Twitter) integration: Connect Facebook Graph API and X (Formerly Twitter)

Step 4: Customize and extend your Facebook Graph API and X (Formerly Twitter) 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 Facebook Graph API and X (Formerly Twitter) with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Facebook Graph API and X (Formerly Twitter) integration: Customize and extend your Facebook Graph API and X (Formerly Twitter) integration

Step 5: Test and activate your Facebook Graph API and X (Formerly Twitter) workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Facebook Graph API to X (Formerly Twitter) 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.

Facebook Graph API and X (Formerly Twitter) integration: Test and activate your Facebook Graph API and X (Formerly Twitter) workflow

AI-Powered Social Media Content Generator & Publisher

AI-Powered Social Media Content Generator & Publisher 🚀

This AI-driven n8n workflow automates social media content creation and publishing across LinkedIn, Instagram, Facebook, and Twitter (X). It generates engaging, platform-optimized posts using Google Gemini AI, based on user inputs such as a post title, keywords, and an uploaded image. The workflow ensures seamless content generation and publishing, making it a perfect tool for marketers, business owners, influencers, and content creators.

🌟 Features & Benefits

✅ AI-Generated Social Media Posts – Uses Google Gemini AI to create high-quality, optimized content.
✅ Multi-Platform Support – Automatically generates posts for LinkedIn, Instagram, Facebook, and Twitter (X).
✅ Hashtag & SEO Optimization – Includes trending hashtags to enhance visibility and engagement.
✅ Image Upload & Processing – Allows image uploads for Instagram and Facebook using imgbb and Facebook Graph API.
✅ Automated Publishing – Posts are automatically published on all selected platforms.
✅ Custom Call-to-Action – Each platform's post is optimized with CTAs for better engagement.
✅ User-Friendly Form Submission – Easy-to-use form where users can enter post titles, keywords, links, and images.
✅ Performance Tracking – Provides confirmation and tracking links for published posts.

📌 How It Works

1️⃣ User Submission Form
Fill out the form with Post Title, Keywords, and an Optional Link.
Upload an image for Instagram & Facebook posts.

2️⃣ AI Content Generation
Google Gemini AI generates optimized content for each platform.
The AI ensures professional, engaging, and audience-specific content.

3️⃣ Content Review
Users review and approve the AI-generated content before publishing.

4️⃣ Automated Publishing
Posts are automatically published on LinkedIn, Facebook, Instagram, and Twitter (X).
Uses Facebook Graph API, LinkedIn API, Twitter API, and Instagram API.

5️⃣ Post Confirmation & Tracking
Get links to track published posts on each platform.

🛠️ Prerequisites

Before using this workflow, ensure you have:

✅ n8n Instance (Cloud or Self-Hosted)
✅ Social Media API Credentials (Facebook, Instagram, LinkedIn, Twitter API)
✅ Google Gemini AI API Key
✅ imgbb API Key (for image hosting)

📺 YouTube Video Tutorial 🎥

Watch the step-by-step tutorial on how to set up and use this n8n workflow template:

🔗 YouTube Tutorial - AI-Powered Social Media Posting in n8n

🎯 Use Cases

📌 Marketing Agencies – Automate client content scheduling.
📌 Businesses & Brands – Maintain a consistent brand presence on social media.
📌 Content Creators & Influencers – Generate high-quality posts quickly.
📌 E-commerce & Startups – Promote products and services effortlessly.
📌 Corporate & Enterprise Teams – Streamline internal and external communications.

👨‍💻 Creator Information

👤 Developed by: Amjid Ali
🌐 Website: SyncBricks
📧 Email: [email protected]
💼 LinkedIn: Amjid Ali
📺 YouTube: SyncBricks

💡 Support & Contributions

If you find this workflow helpful, consider supporting my work:

👉 Donate via PayPal

For full courses on * AI Automation*, visit:

📚 SyncBricks LMS

📚 AI and Auotmation Course

👉 Get Started with N8N

Nodes used in this workflow

Popular Facebook Graph API and X (Formerly Twitter) workflows

+3

AI-Powered Social Media Content Generator & Publisher

AI-Powered Social Media Content Generator & Publisher 🚀 This AI-driven n8n workflow automates social media content creation and publishing across LinkedIn, Instagram, Facebook, and Twitter (X). It generates engaging, platform-optimized posts using Google Gemini AI, based on user inputs such as a post title, keywords, and an uploaded image. The workflow ensures seamless content generation and publishing, making it a perfect tool for marketers, business owners, influencers, and content creators. 🌟 Features & Benefits ✅ AI-Generated Social Media Posts – Uses Google Gemini AI to create high-quality, optimized content. ✅ Multi-Platform Support – Automatically generates posts for LinkedIn, Instagram, Facebook, and Twitter (X). ✅ Hashtag & SEO Optimization – Includes trending hashtags to enhance visibility and engagement. ✅ Image Upload & Processing – Allows image uploads for Instagram and Facebook using imgbb and Facebook Graph API. ✅ Automated Publishing – Posts are automatically published on all selected platforms. ✅ Custom Call-to-Action – Each platform's post is optimized with CTAs for better engagement. ✅ User-Friendly Form Submission – Easy-to-use form where users can enter post titles, keywords, links, and images. ✅ Performance Tracking – Provides confirmation and tracking links for published posts. 📌 How It Works 1️⃣ User Submission Form Fill out the form with Post Title, Keywords, and an Optional Link. Upload an image for Instagram & Facebook posts. 2️⃣ AI Content Generation Google Gemini AI generates optimized content for each platform. The AI ensures professional, engaging, and audience-specific content. 3️⃣ Content Review Users review and approve the AI-generated content before publishing. 4️⃣ Automated Publishing Posts are automatically published on LinkedIn, Facebook, Instagram, and Twitter (X). Uses Facebook Graph API, LinkedIn API, Twitter API, and Instagram API. 5️⃣ Post Confirmation & Tracking Get links to track published posts on each platform. 🛠️ Prerequisites Before using this workflow, ensure you have: ✅ n8n Instance (Cloud or Self-Hosted) ✅ Social Media API Credentials (Facebook, Instagram, LinkedIn, Twitter API) ✅ Google Gemini AI API Key ✅ imgbb API Key (for image hosting) 📺 YouTube Video Tutorial 🎥 Watch the step-by-step tutorial on how to set up and use this n8n workflow template: 🔗 YouTube Tutorial - AI-Powered Social Media Posting in n8n 🎯 Use Cases 📌 Marketing Agencies – Automate client content scheduling. 📌 Businesses & Brands – Maintain a consistent brand presence on social media. 📌 Content Creators & Influencers – Generate high-quality posts quickly. 📌 E-commerce & Startups – Promote products and services effortlessly. 📌 Corporate & Enterprise Teams – Streamline internal and external communications. 👨‍💻 Creator Information 👤 Developed by: Amjid Ali 🌐 Website: SyncBricks 📧 Email: [email protected] 💼 LinkedIn: Amjid Ali 📺 YouTube: SyncBricks 💡 Support & Contributions If you find this workflow helpful, consider supporting my work: 👉 Donate via PayPal For full courses on * AI Automation*, visit: 📚 SyncBricks LMS 📚 AI and Auotmation Course 👉 Get Started with N8N

Build your own Facebook Graph API and X (Formerly Twitter) integration

Create custom Facebook Graph API and X (Formerly Twitter) 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.

X (Formerly Twitter) supported actions

Create
Send a direct message to a user
Add Member
Add a member to a list
Create
Create, quote, or reply to a tweet
Delete
Delete a tweet
Like
Like a tweet
Retweet
Retweet a tweet
Search
Search for tweets from the last seven days
Get
Retrieve a user by username

Facebook Graph API and X (Formerly Twitter) integration details

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
Use case

Automate lead management

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

Learn more

FAQs

  • Can Facebook Graph API connect with X (Formerly Twitter)?

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

  • Can I use X (Formerly Twitter)’s API with n8n?

  • Is n8n secure for integrating Facebook Graph API and X (Formerly Twitter)?

  • How to get started with Facebook Graph API and X (Formerly Twitter) integration in n8n.io?

Need help setting up your Facebook Graph API and X (Formerly Twitter) integration?

Discover our latest community's recommendations and join the discussions about Facebook Graph API and X (Formerly Twitter) integration.
lexgabrees
Andrey Khokhlov

Looking to integrate Facebook Graph API and X (Formerly Twitter) in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Facebook Graph API with X (Formerly Twitter)

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