---
agentTools:
  projectIndex: https://developers.pipefy.com/llms.txt
---

# Delete Automation

Delete an existing automation by ID

## Before You Begin

* Use the [GraphQL Playground](https://app.pipefy.com/graphiql).
* Authenticate with a [Service Account token](https://developers.pipefy.com/reference/service-accounts).

## Prerequisites

* You must have admin permission on the automation's repository to delete it.
* You need the automation ID to delete. See [Retrieve automations](https://developers.pipefy.com/reference/retrieve-automations) to find automation IDs.

## Delete an Automation

### Basic example (delete automation by ID)

#### Inputs

* **id**: The automation ID to delete. Get this from [Retrieve automations](https://developers.pipefy.com/reference/retrieve-automations).

```graphql
mutation {
  deleteAutomation(input: {id: "21"}) {
    success
  }
}
```

Response:

```json
{
  "data": {
    "deleteAutomation": {
      "success": true,
    }
  }
}
```

#### Response explained

* **success**: Boolean indicating whether the deletion was successful.

## Tips

* **Verify before deleting**: Use [Retrieve automations](https://developers.pipefy.com/reference/retrieve-automations) to confirm the automation ID and ensure you have the correct automation.
* **Check permissions**: Ensure you have admin access to the automation's repository before attempting deletion.
* **Permanent action**: Deletion is irreversible. Consider deactivating the automation first using [Update automation](https://developers.pipefy.com/reference/automation-update) if you might need to restore it later.
* **Error handling**: Always check the `success` field in the response to handle potential errors gracefully.

## See also

* Retrieve automations: [Retrieve automations](https://developers.pipefy.com/reference/retrieve-automations)
* Create automation: [Create automation](https://developers.pipefy.com/reference/automation-creation)
* Update automation: [Update automation](https://developers.pipefy.com/reference/automation-update)