Set up the Facebook app to use the Facebook Messenger Platform.
Follow steps in the
Setting Up Your Facebook App
documentation to accomplish the following:
Add the Messenger Platform to your Facebook app.
Subscribe your app to a Facebook page.
You are provided with an access token at this step.
Copy this value.
This token is used to configure the integration
from the Dialogflow Console.
Don't configure the webhook or test your integration yet.
Configure the integration from the Dialogflow Console:
Show old callback URL:
If this toggle is shown, it defaults to off.
This is a temporary option to accommodate a recent
modification to the Facebook Messenger API.
Do not change this toggle unless instructed
by Dialogflow support.
After all agents have been updated,
this option is removed.
Callback URL:
Copy this value.
This is used to configure the Facebook Messenger Webhook.
Verify Token:
You can enter any private token you need.
Copy this value.
This is used to configure the Facebook Messenger Webhook.
Page Access Token:
Enter the access token you copied when creating the Facebook page.
Start: Click to start this integration service
for your agent.
Finish setup of the Facebook app and test it.
Follow steps in the
Setting Up Your Facebook App
documentation to accomplish the following:
Configure the Facebook webhook for your app.
Use the Callback URL and Verify Token values you copied above.
Be sure to enable messages and messaging_postbacks.
Test your app.
Events
The following events
are invoked by this integration:
Event
Description
FACEBOOK_WELCOME
Triggered when an end-user starts a conversation with your bot.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis integration allows you to create a Facebook Messenger bot using Dialogflow to interact with users, sending and receiving messages via the Facebook Messenger API.\u003c/p\u003e\n"],["\u003cp\u003eThe setup involves creating a Facebook app, configuring it for the Messenger Platform, and then integrating it with Dialogflow through the Dialogflow console using a Page Access Token, Callback URL, and a Verify Token.\u003c/p\u003e\n"],["\u003cp\u003eThe default agent language is the only language supported by this integration.\u003c/p\u003e\n"],["\u003cp\u003eDialogflow translates several rich response messages, including images, cards, and quick replies, into their corresponding Facebook Messenger message types.\u003c/p\u003e\n"],["\u003cp\u003eCustom payloads can be used to send more complex Facebook messenger messages such as audio, video, and file attachments, in addition to the rich responses already translated by Dialogflow.\u003c/p\u003e\n"]]],[],null,["# Messenger from Facebook\n\nUsing the Dialogflow Facebook Messenger integration,\nyou can create a Facebook Messenger bot to interact with your end-users.\n\n\n| **Note:** When using a third party integration, requests and end-user data are sent to both Google and the third party. The terms of service, SLA, pricing, and quotas [for your agent edition](/dialogflow/docs/editions) are applicable for Google's handling of these requests. The third party's terms of service, SLA, pricing, and quotas are applicable for the third party's handling of these requests.\n\n\u003cbr /\u003e\n\nLimitations\n-----------\n\nOnly the\n[default agent language](/dialogflow/es/docs/agents-settings#lang)\nis supported by this integration.\n\nHow it works\n------------\n\nThis is how the integration works:\n\n- You create a Facebook app that uses the [Facebook Messenger platform](https://developers.facebook.com/docs/messenger-platform/overview).\n- You configure the Dialogflow integration and Facebook app, so that they communicate with each other.\n- The Dialogflow integration sends messages to the end-user by using the [Facebook Messenger API](https://developers.facebook.com/docs/messenger-platform/reference/send-api/).\n- The Dialogflow integration receives messages from the end-user by acting as the [Facebook Messenger Webhook](https://developers.facebook.com/docs/messenger-platform/webhooks).\n\nSetup\n-----\n\nTo set up the integration:\n\n1. Follow the steps to create a Facebook app:\n [Facebook App Development](https://developers.facebook.com/docs/development).\n\n2. Set up the Facebook app to use the Facebook Messenger Platform.\n Follow steps in the\n [Setting Up Your Facebook App](https://developers.facebook.com/docs/messenger-platform/webhooks)\n documentation to accomplish the following:\n\n - Add the Messenger Platform to your Facebook app.\n - Subscribe your app to a Facebook page. You are provided with an access token at this step. Copy this value. This token is used to configure the integration from the Dialogflow Console.\n - Don't configure the webhook or test your integration yet.\n3. Configure the integration from the Dialogflow Console:\n\n 1. Go to the [Dialogflow ES console](https://dialogflow.cloud.google.com).\n 2. Click **Integrations** in the left sidebar menu.\n 3. Click **Facebook Messenger**.\n 4. A configuration dialog opens:\n\n \u003cbr /\u003e\n\n - **Show old callback URL**: If this toggle is shown, it defaults to off. This is a temporary option to accommodate a recent modification to the Facebook Messenger API. Do not change this toggle unless instructed by Dialogflow support. After all agents have been updated, this option is removed.\n - **Callback URL**: Copy this value. This is used to configure the Facebook Messenger Webhook.\n - **Verify Token**: You can enter any private token you need. Copy this value. This is used to configure the Facebook Messenger Webhook.\n - **Page Access Token**: Enter the access token you copied when creating the Facebook page.\n - **Start**: Click to start this integration service for your agent.\n4. Finish setup of the Facebook app and test it.\n Follow steps in the\n [Setting Up Your Facebook App](https://developers.facebook.com/docs/messenger-platform/webhooks)\n documentation to accomplish the following:\n\n - Configure the Facebook webhook for your app. Use the **Callback URL** and **Verify Token** values you copied above. Be sure to enable **messages** and **messaging_postbacks**.\n - Test your app.\n\nEvents\n------\n\nThe following [events](/dialogflow/docs/events-overview)\nare invoked by this integration:\n\nRich response messages\n----------------------\n\nThis integration translates some\n[rich response messages](/dialogflow/docs/intents-rich-messages)\nmessages to\n[Facebook Messenger Platform message types](https://developers.facebook.com/docs/messenger-platform/send-messages).\n\n### Image responses\n\n[Image responses](/dialogflow/docs/intents-rich-messages#image)\nare sent to Facebook Messenger as\n[Facebook Messenger file attachment messages](https://developers.facebook.com/docs/messenger-platform/reference/attachment-upload-api#attachment).\nThe `message.attachment.type` value is set to `image`.\nThe following formats are supported:\n\n- jpg\n- png\n- static gif\n- animated gif\n\n### Card responses\n\n[Card responses](/dialogflow/docs/intents-rich-messages#card)\nare sent to Facebook Messenger as\n[Facebook Messenger generic templates](https://developers.facebook.com/docs/messenger-platform/reference/templates/generic).\n\n### Quick reply responses\n\n[Quick reply responses](/dialogflow/docs/intents-rich-messages#quick)\nare sent to Facebook Messenger as\n[Facebook Messenger quick replies](https://developers.facebook.com/docs/messenger-platform/reference/buttons/quick-replies).\n\n### Custom payload responses\n\nTo send other types of Facebook Messenger messages,\nyou can use a\n[custom payload](/dialogflow/docs/intents-rich-messages#custom).\n\nThe general format of the custom payload looks like: \n\n```\n{\n \"facebook\": {\n message\n }\n}\n```\n\nIn place of `message`, provide the Facebook Messenger `message` object.\nFor details of the `message` object, see the\n[Facebook Messenger API reference](https://developers.facebook.com/docs/messenger-platform/reference/send-api/).\n\nFor example:\n\n- Send an audio link: \n\n ```\n {\n \"facebook\": {\n \"attachment\": {\n \"type\": \"audio\",\n \"payload\": {\n \"url\": \"https://example.com/audio/test.mp3\"\n }\n }\n }\n }\n \n ```\n- Send a playable video: \n\n ```\n {\n \"facebook\": {\n \"attachment\": {\n \"type\": \"video\",\n \"payload\": {\n \"url\": \"https://example.com/video.mp4\"\n }\n }\n }\n }\n \n ```\n- Send a file: \n\n ```\n {\n \"facebook\": {\n \"attachment\": {\n \"type\": \"file\",\n \"payload\": {\n \"url\": \"https://example.com/file.pdf\"\n }\n }\n }\n }\n \n ```"]]