n8ntools-facebook

Enhanced Facebook node for N8N with comprehensive Graph API integration

Package Information

Released: 13 mo ago
Downloads: 7 weekly / 71 monthly
Latest Version: 1.0.2

Documentation

N8N Tools - Facebook Enhanced

A comprehensive Facebook Graph API integration node for N8N workflows, providing access to all major Facebook features including Pages, Posts, Groups, Events, Insights, and User data.

Features

📄 Pages Management

  • Get pages list and information
  • Create posts, photos, and videos
  • Manage page events
  • Access page insights and analytics

📝 Posts Management

  • Get post details and comments
  • Create, like, and share posts
  • Manage post interactions
  • Access post insights

👥 Groups Management

  • Get groups and members
  • Create group posts and events
  • Manage group interactions
  • Access group data

📅 Events Management

  • Create and manage events
  • Get event attendees and responses
  • Update and delete events
  • Access event insights

📊 Insights & Analytics

  • Page insights and metrics
  • Post performance analytics
  • Video engagement metrics
  • Event attendance analytics

👤 User Management

  • Get user information
  • Access user friends and photos
  • Manage user data

Installation

  1. Install the package:
npm install n8n-nodes-n8ntools-facebook-enhanced
  1. Add the node to your N8N instance:
    • Go to Settings > Community Nodes
    • Click "Install a community node"
    • Enter: n8n-nodes-n8ntools-facebook-enhanced

Configuration

Credentials

The node supports two types of credentials:

OAuth2 API (Recommended)

  • Client ID: Your Facebook App Client ID
  • Client Secret: Your Facebook App Client Secret
  • Access Token: OAuth2 Access Token
  • Scope: Required permissions (comma-separated)

API Key

  • Access Token: Facebook Graph API Access Token
  • App ID: Your Facebook App ID
  • App Secret: Your Facebook App Secret

Required Permissions

For full functionality, ensure your Facebook App has the following permissions:

  • public_profile - Basic profile information
  • email - User email address
  • pages_manage_posts - Manage page posts
  • pages_read_engagement - Read page engagement data
  • groups_access_member_info - Access group member information
  • pages_show_list - Show pages list
  • pages_manage_metadata - Manage page metadata
  • pages_read_user_content - Read user content on pages

Usage Examples

Get All Pages

{
  "resource": "pages",
  "operation": "getPages"
}

Create a Page Post

{
  "resource": "pages",
  "operation": "createPost",
  "pageId": "your-page-id",
  "message": "Hello from N8N!",
  "link": "https://example.com"
}

Get Page Insights

{
  "resource": "insights",
  "operation": "getPageInsights",
  "pageId": "your-page-id",
  "metrics": ["page_impressions", "page_reach"],
  "period": "day"
}

Create an Event

{
  "resource": "events",
  "operation": "createEvent",
  "eventName": "N8N Workshop",
  "startTime": "2024-02-01T10:00:00Z",
  "endTime": "2024-02-01T17:00:00Z",
  "description": "Learn N8N automation",
  "place": "Online"
}

Resources and Operations

Pages

  • getPages - Get all pages
  • getPageInfo - Get page information
  • getPagePosts - Get page posts
  • createPost - Create a post
  • createPhotoPost - Create a photo post
  • createVideoPost - Create a video post
  • getPageEvents - Get page events
  • createEvent - Create a page event

Posts

  • getPost - Get post details
  • getComments - Get post comments
  • createComment - Create a comment
  • getLikes - Get post likes
  • likePost - Like a post
  • unlikePost - Unlike a post
  • sharePost - Share a post
  • deletePost - Delete a post

Groups

  • getGroups - Get all groups
  • getGroupInfo - Get group information
  • getGroupMembers - Get group members
  • getGroupPosts - Get group posts
  • createGroupPost - Create a group post
  • getGroupEvents - Get group events
  • createGroupEvent - Create a group event

Events

  • getEvents - Get all events
  • getEventInfo - Get event information
  • getEventAttending - Get attending users
  • getEventMaybe - Get maybe users
  • getEventDeclined - Get declined users
  • createEvent - Create an event
  • updateEvent - Update an event
  • deleteEvent - Delete an event

Insights

  • getPageInsights - Get page insights
  • getPostInsights - Get post insights
  • getVideoInsights - Get video insights
  • getEventInsights - Get event insights

User

  • getUserInfo - Get user information
  • getUserFriends - Get user friends
  • getUserPhotos - Get user photos

Error Handling

The node includes comprehensive error handling:

  • API rate limiting (429 errors)
  • Authentication errors (401/403)
  • Invalid parameters (400 errors)
  • Network connectivity issues
  • Facebook API specific errors

Rate Limits

Facebook Graph API has rate limits that vary by endpoint and user type:

  • User Access Tokens: 200 calls per hour per user
  • App Access Tokens: 200 calls per hour per app
  • Page Access Tokens: 4800 calls per hour per page

Support

For issues, feature requests, or contributions:

License

MIT License - see LICENSE file for details.

Changelog

1.0.0

  • Initial release
  • Complete Facebook Graph API integration
  • Support for Pages, Posts, Groups, Events, Insights, and User operations
  • OAuth2 and API Key authentication
  • Comprehensive error handling
  • Full TypeScript support

Discussion