Facebook Tool icon

Facebook Tool

Facebook operations tool for AI agents - create posts, get page info, manage content with enhanced logging

Facebook Tool

AI-generated

Overview

This node provides a comprehensive Facebook page management tool designed for AI agents. It enables creating and managing posts (text, photo, video, link), retrieving posts and comments, managing comments, sending messages, getting page and post insights, uploading media, and creating events. The node supports enhanced structured logging for AI agent visibility and control over allowed actions via presets or custom selections. It is useful for automating Facebook page operations, content creation, community management, customer support, and analytics gathering.

Use Case Examples

  1. An AI agent automatically creates and schedules posts with images and videos on a Facebook page.
  2. A community manager bot retrieves and moderates comments on posts, responding to user interactions.
  3. An analytics bot fetches page and post insights to generate performance reports.
  4. A customer support bot sends messages and manages comments to handle user inquiries.

Properties

Name Meaning
Tool Description Description of what this tool does for the AI agent, providing context for AI operations.
Page The Facebook Page selected for AI operations, required to specify the target page.
Action Preset Predefined sets of allowed Facebook actions for the AI agent, simplifying permission management.
Allowed Actions Specific Facebook actions the AI agent can perform when 'Custom Selection' preset is chosen.
Enable Enhanced Logging Enable detailed AI Agent logging with structured output visible in n8n logs.

Output

JSON

  • response
    • name - Name of the Facebook tool response object.
    • description - Description of the tool's purpose for the AI agent.
    • schema
      * type - Type of the response schema, always 'object'.
      * properties
      * action - The Facebook action to perform, restricted to allowed actions.
      * message - Text content for posts or messages.
      * imageUrl - URL of image for photo posts and image comments.
      * imageBinary - Base64 encoded image data for photo posts and image comments.
      * videoUrl - URL of video for video posts.
      * link - URL for link posts.
      * postId - Post ID for operations on specific posts.
      * commentId - Comment ID for comment operations.
      * recipientId - Recipient ID for sending messages.
      * limit - Number of items to retrieve, default is 25.

Dependencies

  • Facebook OAuth2 API credentials for authentication

Troubleshooting

  • Common issues include missing or invalid access tokens, insufficient page permissions, and unauthorized actions based on the selected preset or allowed actions.
  • Error messages often indicate missing required parameters such as 'message' for text posts or 'imageUrl' for photo posts, or invalid action requests.
  • To resolve errors, ensure the Facebook OAuth2 credentials are valid and connected, the page ID is correct, and the action is permitted by the selected preset or custom allowed actions.
  • Enhanced logging can help diagnose issues by providing detailed execution logs and error messages in n8n logs.

Links

Discussion