Amazon Connect and Facebook Messenger integration
I follow this https://aws.amazon.com/fr/blogs/contact-center/adding-digital-messaging-channels-to-your-amazon-connect-contact-center/ and this https://github.com/amazon-connect/amazon-connect-message-streaming-examples to be able to add a canal to my Amazon Connect instance. There have been a couple of times that the message entered into a Facebook page (FB Messenger) has triggered a call to AWS API Gateway. The logs show it to me. But, without my understanding why, 99.99% of the time, no call is made between Facebook and our API (AWS).
So I need help to troubleshoot my problem.
Thanks for helping me if you have already done this Connect and FB integration.
Hello. The problem is solved. The bug comes from my misunderstanding of how FB applications work and a lack in the documentation of the blog and the Github page. After having done all the procedure, it is necessary to create roles for test users in the FB application. A text mentions it on the app page, but I hadn't noticed it. Thank you again for your help.
Great, glad you could fix it.
The message streaming samples create three Lambdas for you. You can find them when browsing through the Lambda Service. When the names are by standard they should start with "ChatMessageStreamingExamp-...." and are divided in three functions:
If you do not receive he facebook messages in Amazon Connect you should check the logs of the inboundMessageFunction, if you cannot reply, check the outboundMessageFunction. In case you do not see anything or nothing good enough to go further, check the Lambda Functions Configuration. Under Environment variables you do see three settings:
- CONTACT_TABLE - this is the DynamoDB which keeps a record of the contacts
- DEBUD_LOG - this sets the logging behaviour. By default this is false and you can change it to "true" to get more log outputs. Hence you fixed your issue, make sure to set it back to false to ensure you do not create not required logs.
- FB_SECRET - this keeps the Secrets Manager ARN where the Function get the Facebook secrets to communicate with the Facebook APIs. Make sure that this is correct by checking the Secret Manager ARN.
Things you may want to check:
- ensure the correct secrets are stored in the Secrets Manager
- ensure the correct Secrets Manager ARN is in all the Lambda functions
- ensure your Lambda functions do have access to that secrets
First, thank you for your response. Here is more information. The problem is that nothing happens on the AWS side when someone enters a message in the Facebook page (via FB Messenger). I can confirm that as soon as we use tools like Postman, Powerautomate or even the test tool on the FB Dev page, we see the API call arrive and then the Lambda Inbound function trigger. So it seems obvious to me that there is a problem on the FB side. I followed the procedure to be a valid DEV for this app from FB side. (You're a verified admin on this app.).
Do you have a way to troubleshoot what is happening on the FB side?
FYI, I deleted everything from the app in FB Dev to redo it and I have the same problem. I also tried with another FB page without success. Thank you again for your help.
from the description it sounds that either the trigger is not being sent off or the call to the API Endpoint is not arriving.
For both you can double check the settings on the Facebook Developer page for your site in question.
- Access Key of the page being setup properly
- Verify that the Webhook for that Page has been set and it's activated for messages in the hook
- Verify the Callback URL for the webhook including the Auth token to be match. Also test the callback URL with a tool like Postman an see if you reach the Lambda function through Cloudwatch Logs
If that appears all fine and a manual trigger using Postman work I'd suggest to reach out to the Facebook support to gather some logs from that side.
facebook 2.9 api expires in 4 monthsasked 3 years ago
Amazon Connect and Salesforce screen popasked 7 months ago
use amazon connect to set a specific date (April 12, 2022) to receive callsasked 3 months ago
Websocket $connect route: headers and querystring empty on http integrationAccepted Answerasked 3 years ago
One phone number for Amazon Connect AND PinpointAccepted Answerasked 6 months ago
Connecting Amazon Connect with Salesforceasked 6 months ago
Amazon LEX chat bot integration with Workplace from Meta/Facebookasked 23 days ago
Amazon Connect and Facebook Messenger integrationAccepted Answerasked 3 months ago
in Amazon Connect, could we have FACEBOOK, EMAIL. SMS, ... as channels in the Real-time Metrics dashboardAccepted Answerasked 2 months ago
Cognito Facebook Login: bad id_token issuerasked 8 months ago