By using AWS re:Post, you agree to the Terms of Use
/Amazon Connect and Facebook Messenger integration/

Amazon Connect and Facebook Messenger integration

0

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.

4 Answers
0
Accepted Answer

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.

answered 2 months ago
  • Great, glad you could fix it.

0

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:

  • healthCheckFunction
  • outboundMessageFunction
  • inboundMessageFunction

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
answered 3 months ago
0

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.

answered 2 months ago
0

Hi Luc,

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.

answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions