By default a generation considers every connected source in a project. A SourceFilter narrows that down per source – useful when you only care about one repo, one branch, or one priority of issues.
filters is an object keyed by source. Each source accepts up to four arrays, AND-combined:
{
"github": { "projects": ["acme/payments"], "branches": ["main"], "eventTypes": ["push"] },
"linear": { "priorities": ["high"] }
}| Field | Meaning |
|---|---|
projects | Resource ids – repos, channels, boards. |
branches | Git branch names (git sources only). |
eventTypes | Event types to keep (e.g. push, issue_created). |
priorities | Priority values (e.g. high, urgent). |
A source omitted from filters is left unconstrained. Within a source, the arrays combine with AND: a GitHub event must match a listed repo and a listed branch and a listed event type to be included.
Every field of a generation request is validated before any work is enqueued, so a malformed request can never quietly narrow the scope of a generation you are billed for. Flow Relay is strict where it can be certain and lenient where the value is provider-driven:
Hard-rejected with 400 (the response names the field and lists what is allowed):
- An unknown source in
sourcesor an unknown key infilters. - An unknown filter dimension (only
projects,eventTypes,branches,prioritiesexist). brancheson a non-git source, orprioritieson a source that has no priority concept.- Any unknown top-level field – the body must contain only the documented parameters.
- Malformed shape: a non-array where an array is expected, an empty or over-long string, an out-of-range number.
{
"error": "Invalid request: filters.slack.branches – Branch filtering is not supported for \"slack\". It applies to git sources only.",
"issues": [
{
"field": "filters.slack.branches",
"message": "Branch filtering is not supported for \"slack\". It applies to git sources only.",
"allowed": ["github", "gitlab", "bitbucket", "azure_devops"]
}
]
}Matched leniently – the eventTypes, priorities and projects values come straight from the external platforms (a git host emits pr_<action> / mr_<action> directly), so an allow-list would be perpetually incomplete and would reject legitimate values. A value that does not exist simply matches no events; it is not rejected. Use GET /handoffs/filters to discover the values that actually apply to a project.
Because the request is validated up front and an over-restrictive filter short-circuits to a "no activity" outcome before the model runs, a rejected or empty-matching request never spends credits.
Do not guess filter values – fetch the real selectable options for a project with the filters endpoint:
curl "https://www.flowrelay.it/api/v1/handoffs/filters?project_id=3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "Authorization: Bearer fr_your_api_key"{
"filters": {
"github": {
"projects": [{ "id": "acme/payments", "label": "acme/payments" }],
"branches": [{ "value": "main", "label": "main" }],
"eventTypes": [{ "value": "push", "label": "Push" }],
"priorities": []
}
}
}Use the id / value fields when building a SourceFilter. The filters endpoint only returns the sources actually connected to the project; the full closed vocabulary of every source is listed below.
Source vocabulary
The sources array and the keys of filters must be source ids from the table below – an unknown one is rejected with 400. branches applies to git sources only; priorities only to the sources that carry a priority – using either on a source that does not support it is a 400.
The eventTypes, priorities and projects values are provider-driven and matched leniently: a value that does not exist simply matches no events (it is not rejected). The lists below are the values Flow Relay recognizes for the picker; fetch GET /handoffs/filters for the exact set selectable on a given project.
Filter support per source
| Source id | projects filter | branches | priorities |
|---|---|---|---|
github | Repositories | yes | – |
slack | Channels | – | – |
discord | Channels | – | – |
linear | Teams | – | yes |
notion | Workspace | – | – |
jira | Projects | – | yes |
gitlab | Projects | yes | – |
bitbucket | Repositories | yes | – |
azure_devops | Repositories | yes | – |
figma | Files | – | – |
confluence | Spaces | – | – |
microsoft_outlook | Senders | – | – |
microsoft_teams | Chats | – | – |
sentry | Projects | – | yes |
datadog | Monitors | – | – |
pagerduty | Services | – | yes |
asana | Projects | – | – |
gmail | Senders | – | – |
buildkite | Pipelines | – | – |
circleci | Projects | – | – |
vercel | Projects | – | – |
Event types
eventTypes values are case-sensitive Flow Relay identifiers, not the raw provider event names.
| Source id | eventTypes values |
|---|---|
github | pushpr_openedpr_closedpr_reopenedpr_synchronizepr_editedpr_ready_for_reviewpr_converted_to_draftworkflow_successworkflow_failureworkflow_cancelleddeployment_successdeployment_failure |
slack | messageapp_mentionthread_replymessage_editedmessage_deletedreaction_addedreaction_removedpin_addedpin_removedfile_sharedmember_joinedmember_leftchannel_createdchannel_renamedchannel_archivedchannel_unarchived |
discord | message_createdmessage_updatedmessage_deletedreaction_addedreaction_removedchannel_createdchannel_updatedchannel_deletedthread_openedthread_updatedthread_deletedpins_updated |
linear | issue_createdissue_updatedissue_removedcomment_createdcomment_updatedcomment_removedproject_createdproject_updatedproject_removedproject_update_postedproject_update_editedcycle_createdcycle_updateddocument_createddocument_updatedlabel_createdreaction_addedreaction_removedinitiative_createdinitiative_updatedinitiative_update_posted |
notion | page_createdpage_updatedpage_deletedpage_movedpage_properties_updatedpage_lockedpage_unlockedpage_restoredcomment_createdcomment_updatedcomment_deleted |
jira | issue_createdissue_updatedissue_deletedcomment_createdcomment_updatedcomment_deletedproject_createdproject_updatedproject_deletedsprint_createdsprint_startedsprint_closedsprint_updatedsprint_deletedversion_createdversion_updatedversion_releasedversion_deletedworklog_createdworklog_updated |
gitlab | pushmr_openmr_closemr_mergemr_reopenmr_updatemr_approvedissue_openissue_closeissue_reopenissue_updatecomment_createdcomment_updatedpipeline_successpipeline_failedpipeline_canceled |
bitbucket | pushpr_openedpr_updatedpr_mergedpr_declinedpr_approvedpr_commentpipeline_successpipeline_failedpipeline_stopped |
azure_devops | git.pushgit.pullrequest.createdgit.pullrequest.updatedgit.pullrequest.merged |
figma | comment_addedversion_publishedfile_updatedfile_delete |
confluence | page_createdpage_updatedpage_movedpage_removedcomment_created |
microsoft_outlook | email_received |
microsoft_teams | teams_message |
sentry | issue_createdissue_resolvedissue_ignoredissue_assignedissue_archivederrorevent_alertmetric_alert |
datadog | alert_triggeredalert_recoveredalert_no_dataalert_warn |
pagerduty | incident_triggeredincident_acknowledgedincident_escalatedincident_resolvedincident_reassignedincident_annotatedincident_priority_updatedincident_reopenedincident_responder_added |
asana | task_createdtask_updatedtask_deletedtask_removedtask_restoredcomment_added |
gmail | email_received |
buildkite | build_passedbuild_failedbuild_canceled |
circleci | workflow_successworkflow_failedworkflow_canceled |
vercel | deployment_succeededdeployment_errordeployment_canceleddeployment_promoted |
Priorities
priorities values are lowercase.
| Source id | priorities values |
|---|---|
linear | urgenthighmediumlownone |
jira | highesthighmediumlowlowest |
sentry | fatalerrorwarninginfo |
pagerduty | highlow |
Only the main branch of one repo:
{ "filters": { "github": { "projects": ["acme/payments"], "branches": ["main"] } } }Only high-priority Jira issues:
{ "filters": { "jira": { "priorities": ["high"] } } }Filters apply identically to handoffs (POST /handoffs) and insights (POST /projects/{id}/insights/{kind}). When you omit sources and filters entirely, the project's saved scope preferences are used.
Selecting figma (in sources or filters) does more than filter events: the generation attaches visual context – rendered previews of your team's top frames plus an indexed scene graph (layout, text content, prototype flows and, on Figma Enterprise, design variables).
Two constraints apply:
- Global region only. Figma can be selected only on projects whose processing region is Global. On EU or self-hosted projects the API responds
400and the dashboard shows Figma as non-selectable. Figma events still flow in as text when you don't filter for them explicitly. - Visual surcharge. A generation that attaches frame renders costs 1 extra credit on top of the flow's flat price. Text-only Figma activity carries no surcharge.
The filters endpoint returns a figma availability block alongside the options:
{
"filters": { "...": {} },
"figma": {
"selectable": true,
"region": "default",
"scope": "personal",
"canManageResidency": true,
"residencyHref": "/projects/3fa85f64-5717-4562-b3fc-2c963f66afa6#data-residency"
}
}Check figma.selectable before offering Figma as a filter option in your own tooling.