Hello everyone, excuse me, I am exploring a way of...
# ask-community
l
Hello everyone, excuse me, I am exploring a way of triggering a second workflow after a first flow run finishes with an automation, but the thing is that in the first flow I get some data that I want to pass to the second workflow as a parameter. Do you know if this can be done and how do I need to configure it?
1
w
Hey Luis, you can pass data from triggering events into the run deployment actions. Here is a screenshot from a blog that shows the direction you want to go in.
l
Ok, thanks! I see the example of the webhook and how the automation can access the event payload with Jinja syntax. IS there some documentation in how to set flow run A payload so it can be accessed in the automation description? Since in my case I was thinking of using a flow run completion as trigger.
w
Yeah so you cant altar the flow run completed event, but what you can do is use this simple emit_event utility on completion to pass in a payload, then trigger the automation on the observation of this custom event. https://docs.prefect.io/latest/api-ref/prefect/events/?h=emit#prefect.events.emit_event
🙌 1
l
Ok, got it. Thanks!