
Meta GetInsights
CertifiedCollect Facebook post insights
Meta GetInsights
Collect Facebook post insights
Fetches Graph API insights (reach, impressions, reactions, etc.) for one or more posts. Defaults to lifetime reaction metrics; date_preset is ignored when since/until are provided.
type: io.kestra.plugin.meta.facebook.posts.GetInsightsExamples
Get default reaction insights for posts
id: facebook_get_post_insights
namespace: company.team
tasks:
- id: get_insights
type: io.kestra.plugin.meta.facebook.posts.GetInsights
pageId: "{{ secret('FACEBOOK_PAGE_ID') }}"
accessToken: "{{ secret('FACEBOOK_ACCESS_TOKEN') }}"
postIds:
- "123456789_987654321"
- "123456789_987654322"
Add custom metrics to default reactions
id: facebook_post_insights
namespace: company.team
tasks:
- id: get_insights_with_custom_metrics
type: io.kestra.plugin.meta.facebook.posts.GetInsights
pageId: "{{ secret('FACEBOOK_PAGE_ID') }}"
accessToken: "{{ secret('FACEBOOK_ACCESS_TOKEN') }}"
postIds:
- "123456789_987654321"
metrics:
- POST_REACTIONS_LIKE_TOTAL
- POST_REACTIONS_LOVE_TOTAL
- POST_REACTIONS_WOW_TOTAL
- POST_REACTIONS_HAHA_TOTAL
- POST_REACTIONS_SORRY_TOTAL
- POST_REACTIONS_ANGER_TOTAL
- POST_IMPRESSIONS
- POST_ENGAGED_USERS
period: "lifetime"
Get insights with date preset
id: facebook_post_insights_preset
namespace: company.team
tasks:
- id: get_insights_last_7_days
type: io.kestra.plugin.meta.facebook.posts.GetInsights
pageId: "{{ secret('FACEBOOK_PAGE_ID') }}"
accessToken: "{{ secret('FACEBOOK_ACCESS_TOKEN') }}"
postIds:
- "123456789_987654321"
datePreset: "last_7d"
period: "day"
Get insights with custom date range
id: facebook_post_insights_range
namespace: company.team
tasks:
- id: get_insights_custom_range
type: io.kestra.plugin.meta.facebook.posts.GetInsights
pageId: "{{ secret('FACEBOOK_PAGE_ID') }}"
accessToken: "{{ secret('FACEBOOK_ACCESS_TOKEN') }}"
postIds:
- "123456789_987654321"
since: "2025-10-01"
until: "2025-10-15"
period: "day"
Properties
accessToken *string
Access Token
Page access token with permissions such as pages_manage_posts and pages_read_engagement.
pageId *string
Facebook Page ID
ID of the Page the task operates on; must match the access token scope.
postIds *array
Post IDs
Post identifiers in pageId_postId format to retrieve insights for.
apiBaseUrl string
https://graph.facebook.comBase API URL
Base Graph API URL. Defaults to https://graph.facebook.com.
apiVersion string
v24.0API Version
Facebook Graph API version to call. Defaults to v24.0.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150datePreset string
TODAYTODAYYESTERDAYTHIS_MONTHLAST_MONTHTHIS_QUARTERMAXIMUMLAST_3DLAST_7DLAST_14DLAST_28DLAST_30DLAST_90DLAST_WEEK_MON_SUNLAST_WEEK_SUN_SATLAST_QUARTERLAST_YEARTHIS_WEEK_MON_TODAYTHIS_WEEK_SUN_TODAYTHIS_YEARDate preset
Preset date range (e.g., last_week, yesterday). Default is TODAY; ignored when since or until are set.
metrics array
["POST_REACTIONS_LIKE_TOTAL","POST_REACTIONS_LOVE_TOTAL","POST_REACTIONS_WOW_TOTAL","POST_REACTIONS_HAHA_TOTAL","POST_REACTIONS_SORRY_TOTAL","POST_REACTIONS_ANGER_TOTAL"]POST_REACTIONS_LIKE_TOTALPOST_REACTIONS_LOVE_TOTALPOST_REACTIONS_WOW_TOTALPOST_REACTIONS_HAHA_TOTALPOST_REACTIONS_SORRY_TOTALPOST_REACTIONS_ANGER_TOTALPOST_IMPRESSIONSPOST_ENGAGED_USERSPOST_CLICKSPOST_REACTIONS_BY_TYPE_TOTALMetrics
Metrics to request. Defaults to reaction totals; add metrics such as POST_IMPRESSIONS or POST_ENGAGED_USERS as needed.
period string
LIFETIMEDAYWEEKDAYS_28MONTHLIFETIMETOTAL_OVER_RANGEPeriod
Aggregation period for insights. Defaults to lifetime.
since string
2026-10-05Since
Lower bound (datetime string). Overrides date_preset when set. Defaults to today.
until string
2026-10-05Until
Upper bound (datetime string). Overrides date_preset when set. Defaults to today.