Actions72
- Pages Actions
- Posts Actions
- Groups Actions
- Events Actions
- Insights Actions
- Marketing/Ads Actions
- Videos Actions
- Messaging Actions
- Shop/Catalog Actions
- Lead Ads Actions
- Webhooks Actions
Insights → Get Post Insights
AI-generatedOverview
The node provides enhanced integration with the Facebook Graph API, allowing users to retrieve various insights and analytics data related to Facebook posts. Specifically, the "Get Post Insights" operation fetches metrics about a particular Facebook post, such as impressions, reach, engagements, and video views.
This node is beneficial for social media managers, marketers, and analysts who want to automate the retrieval of performance data for Facebook posts within their workflows. For example, it can be used to monitor how well a post is performing over time or to gather data for reporting dashboards.
Practical examples:
- Automatically fetching engagement metrics for a newly published post to trigger follow-up marketing actions.
- Collecting video view statistics to analyze content effectiveness.
- Aggregating post reach and impression data for weekly performance reports.
Properties
| Name | Meaning |
|---|---|
| Metrics | The specific metrics to retrieve for the post insights. Options include: |
| - Page Impressions | |
| - Page Reach | |
| - Page Engaged Users | |
| - Post Impressions | |
| - Post Reach | |
| - Post Engagements | |
| - Video Views | |
| - Video Views Organic | |
| Period | The time period for which to retrieve insights. Options are: Day, Week, Days 28 (not used here) |
| Since | Start date for insights in ISO 8601 format (optional, not used in this operation) |
| Until | End date for insights in ISO 8601 format (optional, not used in this operation) |
| Post ID | The Facebook Post ID for which to get insights (required input parameter for this operation) |
Note: For the "Get Post Insights" operation, only the "Metrics" and "Post ID" parameters are actively used based on the code.
Output
The output is an array of JSON objects, each corresponding to one input item processed. Each JSON object contains the retrieved insights data from Facebook for the specified post and selected metrics.
The structure of the json output field depends on the Facebook Graph API response for the requested metrics but generally includes metric names and their values over time or aggregated counts.
No binary data output is produced by this operation.
Example output snippet (conceptual):
{
"post_impressions": 1234,
"post_reach": 1000,
"post_engagements": 150,
"video_views": 500
}
Dependencies
- Requires a valid API key credential for the external N8N Tools API service used for validation.
- Requires Facebook API credentials (OAuth2 or API token) configured in n8n to authenticate requests to Facebook Graph API.
- The node uses an internal helper class to interact with Facebook's API endpoints.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that the API key credential for the external validation service is correctly set up and active.
- Facebook API errors: Errors returned from Facebook (e.g., invalid post ID, permission issues) will be surfaced. Ensure the Facebook credentials have sufficient permissions to access post insights.
- Empty or missing metrics: If no data is returned, check that the post ID is correct and that the post has available insights for the requested metrics.
- Continue on Fail: The node supports continuing execution on failure for individual items, allowing partial success in batch operations.