How to setup Facebook Trigger + Facebook Graph API

Hi guys,

I am trying to figure out how to use the facebook trigger for creating a mention listenner for Instagram.

The goal is that if someone mentions my account, the workflow would get triggered.

Currently stuck at the trigger API settings and facebook is very confusing on how I should go about this.

There is currently 4 pages that I am looking at and confused on which is the correct one to use.

  1. Facebook Developer App Dashboard - I created an app here and I got my app id and have already got it live (All policy settings and links have been uploaded as per their requirements)

  2. After step 1, I enabled the “Instagram API” and this one give me ANOTHER app id and app secret. I successfully generated an access token for this but cant setup the webhook for it, it asks for callback url and verify token. I used the n8n webhook url but for the verify token, I dont know what to use.

NOTE: For this step, I am only at the configure webhook stage and have NOT sent it for review. does this affect testing?

  1. Graph API Tool page - On here, I also created a “get App Token” this one generated well and I beleive is working with the standard Facebook Graph API but doesnt work for the trigger.

  2. Meta business sutie - I created an account on their too and connected all the apps and accounts for it. This also generated a new access token.

Now my confusion is as follows, n8n facebook trigger requires the following:
App ID
App Secret
Access Token

Now which access token and which app ID do I use?? I tired all different combinations and nothing is working.

The error I get is this:

Facebook Trigger: (#190) Application Secret required for this endpoint

but I used the Access token from the business suite and used the app id, app secret from step 1. This is because when I use step 2s ID, I get an error saying ID not found which makes me think that step 2 is incomplete.

I am looking for a video guide that would allow me to see how to get this working well and not have to do all these juggling of websites and keys so I can get this trigger to work.

Thank you all for reading and if I missed any critical info, please ask me!

This should help:

*please mark me as solution if this helped, thanks :slight_smile:

Hi, thank you for taking intrest!

Thank you for sharing this. I have already read this multiple times and attempted it and it fails to cover any of the important points…

such as:

  • Step 13/14 in “Creating Meta App” - It requires me to create a webhook but doesnt guide me on how to do so, it requests a “verify token” but doesnt tell me which one to use. Also for the instagram integration, the instagram app already has webhook in that app so realistically I should be settings it up there. but again No documentation on how to do this.
    When attempting to add the n8n webhook, it fails to call it because the webhook is not active… which I cant active until I get the hook to work… you see the flaw in this step?
  • When talking about " Generate an App Access Token" - this is for a grahp API which is NOT used in the Facebook trigger, its only used for the facebook normal node. The docs does NOT specify this.
  • In " Configure the Facebook Trigger" section - it fails again to identify what “app id” to use, there is two, one that the app itself created and the other is the app integration that I enabled on my app, such as Instagram. Do not worry, I tested both and I still get the same error. For the instagram app id, I got a 404 error which indicates that this might not have initialised correctly.
    which brings me to the second issue with this section - the webhook config, it says to use the “access token” as the “verify token” but does not tell me which access token to use (i.e. the graph API one or the account generated one?) and does not tell me how to enable the webhook so it can actually verify itself with facebook, cuz when I attempt to verify, I get a bounce back instantly.

As you can see, I have read the docs a lot and tried to use it in all different ways. I also googled it and still not worked.

I would recommend you to attempt to get this TRIGGER to work and share your finding. I used all caps for “trigger” because its that node that I have an issue with mainly.

Thank you very much for your time.

some additional info for the users who will ask about the docs.

here is where I have gathered all my values so you know that I am using the values that the DOCS has requested.

Access Token

App Id + App Secret

Error Message:
Facebook Trigger: (#190) Application Secret required for this endpoint

Can you show me your n8n connections for these (with PIIs removed)? The error indicates you put in the secret wrong or similar.

Hi,

I am only using facebook trigger, nothing else is connected to it and my other workflows are non-related to this.

I have used the access token from the graph API as shown in the previous image
I have used the app secret from the previous image as well
and the app id as well.

All match up to what I got in the n8n configuration.


Then testing the trigger gives this

this is the entire workflow

Did you do this step:

  1. Copy the Webhook URL from n8n and enter it as the Callback URL in your Meta App.

I cant do this step if the trigger is not active bro…

the websocket needs to be active from my side so it can verify it…

incase you mention about the product not matching, I tried using just instagram too but does not work…

You open the trigger node and click the “test trigger/node” button on the left and let it run while adding the test webhook.

that doesnt work because it cant authenticate…

I tried activating this many different ways, non of them work.

if you gonna say to click test and verify at the same time, that wont work because I get that error on n8n INSTANTLY

The issue must be related the credential setup then, have you tried/double checked it has the correct values?

Yes, they are exactly the ones specified.

which brings me exactly to what I said in my original post, the docs does not point to the correct credential setup.

Please attempt to create this yourself and see if you have any luck getting it to work.

1 Like

Hello there!
Did you find a solution for this, I have being going at the exact same problem for days and have gotten nowhere, any new developments?

1 Like

Unfortunately not…

From what I have found tho, there is few issues:

  1. The n8n docs are incorrect and doesnt help with the correct settings.
    However, I found this comment in one of the forums that worked for getting the correct credentials:
    Issues Setting up the Facebook Trigger - #6 by Tony_Tran

Here is the command you need to run on your local machine so you can generate the “access token” this will work for getting the trigger.

curl -X GET "https://graph.facebook.com/oauth/access_token
  ?client_id={your-app-id}
  &client_secret={your-app-secret}
  &grant_type=client_credentials"
  1. It turns out you need a business account to be able to use any of the facebook triggers, so even if you do manage to get the trigger details to work, it will NOT activate without the having your business account to be a “Verified Business” and have access to “Advanced Access”, you can find more info here:
    Instagram - Webhooks from Meta - Documentation - Meta for Developers

So the issue still not solved and the docs dont help. also facebooks requirements are quite difficult to acheive.

I don´t know your backgrownd or how experienced you are on this matters, myself have little to no Experience.
But I did manage to make it work, I spent countless hours trying to troubleshoot this thing.
I agree with you something in the documentation has to be wrong, neither the Facebook graph API nor the Facebook trigger node works they allways end up running into the same error, I also tried the HTTP node, to the same result:
However, the weebhook node did work for me and I managed to fetch a comment on one of my post (My goal is to fetch comments and send an auto reply)

This is more or less what we did:

:repeat: Instagram Comment Webhook Setup with n8n (Self-hosted)

We just completed a successful integration between Instagram and a self-hosted n8n instance. Here’s a full breakdown of what we did to make comments trigger workflows in n8n using Meta’s Webhooks:


:brick: 1. Self-hosted n8n Setup with Ngrok

  • We’re running n8n on our own VPS, not using n8n cloud.
  • We installed ngrok on our server to expose n8n with a public HTTPS URL (https://XXXX.ngrok-free.app).
  • This ngrok URL was used as the callback URL for Meta’s webhook verification.

:repeat: 2. Initial Webhook Verification (GET)

  • Created a new workflow in n8n with:
    • A Webhook (GET) node to handle the initial verification request from Meta.
    • A Set Response node to return the challenge sent by Meta using custom code:

json

CopiarEditar

{
  "mode": "manual",
  "statusCode": 200,
  "responseMode": "lastNode",
  "body": {
    "hub.challenge": "={{$json[\"query\"][\"hub.challenge\"]}}"
  }
}
  • Pointed Meta’s webhook config (inside the Instagram Product, not the generic Webhooks section!) to our GET webhook URL and successfully verified the token.

:incoming_envelope: 3. Created a POST Webhook Workflow to Receive Instagram Events

  • Created a second workflow with:
    • A Webhook (POST) node to receive incoming IG comment data.
    • Mapped fields like text, username, timestamp, etc.
    • Used {{$json["body"]["entry"][0]["changes"][0]["value"]["text"]}} style expressions.

:closed_lock_with_key: 4. Instagram Business Login + Access Token

  • Created a Facebook Login for Business product and set up redirect URIs.
  • Generated the secure Instagram login URL (OAuth).
  • Logged in using a tester account to authorize the app and grabbed the code from the redirect URL.
  • Used the code with curl to generate an access token using this format:

bash

CopiarEditar

curl -X POST "https://graph.facebook.com/v22.0/oauth/access_token" \
-d "client_id=APP_ID" \
-d "client_secret=APP_SECRET" \
-d "redirect_uri=NGROK_URL" \
-d "code=CODE_FROM_REDIRECT"

:test_tube: 5. Verifying Access & Subscribing to Events

  • Verified token with /me and /me/accounts.
  • Retrieved Instagram Business account ID with:

bash

CopiarEditar

curl -G \
  -d "fields=accounts{instagram_business_account}" \
  -d "access_token=ACCESS_TOKEN" \
  "https://graph.facebook.com/v22.0/me"
  • Subscribed to comments, live_comments, and mentions inside the Instagram Product → Webhooks section (not the generic webhook tab).

:satellite: 6. Comment Triggers n8n Flow

  • Comment posted on the connected IG account.
  • n8n received the payload via POST.
  • Data extracted and workflow triggered successfully!

:brain: Pro Tips:

  • Tester accounts must be added under App Roles → Roles → Testers.
  • Ngrok URLs expire unless you’re using a paid version or refresh the tunnel.
  • Do not forget to check webhook subscriptions inside the Instagram Product, not the generic Webhooks section — that tripped us up for a while.
1 Like

I have a verified business account, and am in the exact same situation as you. that is not making any difference. its a lot of going in circles. Searched every forum for answers. None seen yet.