is it possible to create Automations using the Gra...
# ask-community
c
is it possible to create Automations using the GraphQL API? This seems to suggest there is; however it seems like you can only create actions, and not Automations. The docs don't return anything for
automation
1
k
Hi @Constantino Schillebeeckx I think if you look in the interactive api for "sla" you'll find where you can set up automations
c
hmmm are there broader docs for SLA? I'm not sure how an automation for a failed flow would fit under an SLA concept.
k
Ah yes I'm not seeing anything for Automations inside the interactive graphql. When I create an automation inside the UI and inspect the network calls I do see a mutation calling CreateFlowRunStateChangedHook with this as the example mutation
Copy code
mutation CreateFlowRunStateChangedHook($input: create_flow_run_state_changed_hook_input!) {
  create_flow_run_state_changed_hook(input: $input) {
    id
    __typename
  }
}
with these variables
Copy code
{
  "input": {
    "flow_group_ids": [
      "xxx"
    ],
    "action_id": "1fe6ece3-b683-4758-b801-38fd8e9be8e7",
    "states": [
      "Failed",
      "Timedout",
      "Triggerfailed"
    ]
  }
}
c
that looks like the ticket
🎉 1