Skip to main content


Use the @trigger decorator to trigger a flow deployed on Argo Workflows based on an external event.

Read more in Triggering Flows Based on External Events.



from metaflow import trigger

Specifies the event(s) that this flow depends on.



@trigger(events=['foo', 'bar'])

Additionally, you can specify the parameter mappings to map event payload to Metaflow parameters for the flow.

@trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})


@trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
                 {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])

'parameters' can also be a list of strings and tuples like so:

@trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})

This is equivalent to:

@trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})

event: Union[str, dict], optional

Event dependency for this flow.

events: List[Union[str, dict]], optional

Events dependency for this flow.

options: dict, optional

Backend-specific configuration for tuning eventing behavior.