Facebook Messenger Send icon

Facebook Messenger Send

Send messages via Facebook Messenger

Overview

This node allows sending various types of messages and actions through Facebook Messenger. It supports sending text, media (images, audio, video, files), templates (generic, button, media), marking messages as seen, and sending typing indicators to a recipient identified by their Page-Scoped ID or thread ID.

Common scenarios include:

  • Sending automated replies or notifications to users on Facebook Messenger.
  • Indicating to the user that the bot is typing to improve conversational experience.
  • Marking messages as seen to update message status.
  • Sending rich template messages with buttons and media for interactive conversations.

Example use cases:

  • A customer support bot sends a "typing on" indicator while processing a request.
  • An e-commerce chatbot sends a generic template showcasing product images and buttons.
  • A notification system sends a quick text message alerting users about updates.

Properties

Name Meaning
Recipient ID The Page-Scoped ID (PSID) or thread ID of the recipient to whom the message or action is sent.
Typing Indicator Options: "Typing On" (turn typing indicator on), "Typing Off" (turn typing indicator off).

Note: Only properties relevant to the Send Typing Indicator operation are listed here.

Output

The output contains a JSON object representing the response from the Facebook Graph API after sending the typing indicator. This typically includes confirmation data such as message IDs or status.

No binary data is output by this operation.

Example output structure:

{
  "recipient_id": "123456789",
  "sender_action": "typing_on"
}

Dependencies

  • Requires an API authentication token credential for Facebook Messenger API access.
  • The node makes HTTP POST requests to https://graph.facebook.com/v17.0/me/messages with the access token.
  • Proper permissions and setup in the Facebook App and Page are necessary to send messages and sender actions.

Troubleshooting

  • Invalid Recipient ID: Ensure the recipient ID is correct and corresponds to a valid user or thread.
  • Authentication Errors: Verify that the provided API token has the required permissions and is not expired.
  • API Rate Limits: Facebook may limit the number of messages/actions sent; handle errors accordingly.
  • Network Issues: Check connectivity to Facebook's API endpoint.
  • Error Messages: If the node returns an error JSON, it usually contains a descriptive message from Facebook's API. Use this message to diagnose issues like permission problems or invalid parameters.

Links and References

Discussion