Greetings again - I have another question about au...
# ask-community
m
Greetings again - I have another question about automations and the API mutations for it. For automations related to state changes, you have a mutation called "create_flow_run_state_changed_hook" in which you provide a list of flow_group_ids to assign the hook to an action. It seems sla automations are handled differently. For these, I have to create flow group sla per flow (you can't provide a list of flows) using the "create_flow_group_sla" mutation. Is this understanding correct? What do I call to assign this sla to an action?
I think I figured it out. I'm supposed to call: create_flow_sla_failed_hook
I think
z
Hey @Mark McDonald -- the way this works in the backend is a bit complex so it can handle scale. Basically: • Creating an SLA for a flow group will schedule a check that the flow has changed starts after entering a running or scheduled state. • When an SLA fails, an 'Event' is created. • This event can be hooked to an action via the
create_flow_sla_failed_hook
m
got it - thanks Michael
z
We don't really have a great place for this sort of API documentation right now -- looking forward to some reorganization eventually so we can surface it publicly better
m
ya, tbh, this isn't very straightforward and the lack of documentation is making it a bit challenging