See llms.txt for all machine-readable content.

Facebook Graph API and Supabase integration

Save yourself the work of writing custom integrations for Facebook Graph API and Supabase 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 Supabase

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 Supabase integration: Create a new workflow and add the first step

Reply to Facebook comments with OpenRouter, Supabase, Postgres and Google Drive

Quick overview This workflow auto-replies to Facebook Page comments using an OpenRouter-powered AI Agent with Postgres chat memory and a Supabase vector knowledge base, while keeping that knowledge base synced from PDFs in Google Drive (new, updated, and deleted files). How it works Receives Meta webhook requests and returns the hub.challenge value to complete Facebook webhook verification when required. Extracts the incoming Facebook comment details, ignores non-comment events, and skips comments authored by the Page itself to prevent reply loops. Fetches the original Facebook post message via the Facebook Graph API to provide context for the reply. Uses an AI Agent backed by an OpenRouter chat model, Postgres chat memory (per post and user), and a Supabase vector-store retrieval tool to draft a concise response. Posts the AI-generated text back to Facebook as a reply to the specific comment via the Facebook Graph API. Monitors Google Drive folders for PDF creations, updates, and “trash” events, then extracts text, generates OpenAI embeddings, and inserts or deletes matching vectors in Supabase to keep the knowledge base in sync. Setup Create and connect Facebook Graph API credentials, subscribe your Facebook App/Page to the webhook, and configure Meta to call this workflow’s webhook URL. Add an OpenRouter API credential and select the model you want the AI Agent to use. Add Postgres credentials and ensure the database is reachable for storing chat history sessions. Add Supabase credentials, create a documents table for vector storage, and ensure the vector store configuration matches your embeddings. Add Google Drive OAuth credentials and update the folder IDs to the Drive folders you want to watch for new PDFs, updated PDFs, and trashed files.

Build your own Facebook Graph API and Supabase integration

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

Supabase supported actions

Facebook Graph API and Supabase 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.

Supabase

Supabase

Supabase is an open-source Firebase alternative that provides all the backend features you need to build a product. It provides database storage, along with an easy to use authentication service.

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 Supabase integration?

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

  • 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
  • Rafael Ramos

    RAG supabase error searching for documents: 42883 operator does not exist: extensions.vector <=> extensions.vector null

    Rafael Ramos

    Describe the problem/error/question What is the error message (if any)? Hello everyone! I’m having trouble configuring the retrieval of information after the initial setup process has gone correctly. The database appea&hellip;

    Open topic
  • Malte Mattsson

    Problem with Supabase "Empty Array"

    Malte Mattsson

    Describe the problem/error/question I have two Supabase Vector Store nodes configured identically in “Retrieve Documents (As Tool for AI Agent)” mode, but one returns results while the other returns an empty array. Work&hellip;

    Open topic
  • Jeroen van Amerongen

    Supabase vector DB as a tool retrieval

    Jeroen van Amerongen

    Describe the problem/error/question Unable to retrieve from supabase vector DB node. Insert works fine, Supabase setup is all correct. Tested with meta data search and without but nothing comes back. Embeddings works fin&hellip;

    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 Supabase

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