Use Zendesk Action Builder to automatically delete SweetHawk tasks, task lists and phased task lists in the Tasks & Subtickets app.
This guide covers three SweetHawk actions:
- Delete Task, for deleting an individual task.
- Delete Task List, for deleting an entire task list.
- Delete Phased Task List, for deleting a phased task list and all of its phases and tasks.
The complete action flow contains three steps: a Zendesk ticket trigger followed by a lookup step & the relevant SweetHawk delete task action.
Steps covered in this article:
- Before you begin
- Create the Action Flow trigger
- Choose a SweetHawk delete workflow
- Review and test the flow
Before you begin
Make sure the SweetHawk connector is connected to Zendesk Action Builder by following this guide:
Connect SweetHawk to Zendesk Action Builder
Create the Action Flow trigger
First, choose the ticket change that should initiate the action flow. If you’re new to Zendesk Action Builder or aren’t sure which trigger to choose, we recommend reviewing Zendesk’s guide, Creating action flows to automate processes across Zendesk and external systems, before continuing.
This example deletes a task, task list or phased task when a particular tag is added to a ticket. However, you can use another supported ticket event, such as a change to the ticket status, priority, form, or custom field.
- Create a new action flow.
- Add a trigger card.
- Under Zendesk, select Tickets.
- Select Routing.
- Select Ticket tags changed.
- Click Add condition.
- Configure the condition as follows:
-
Variable:
Tags (added) -
Operator:
Contains at least 1 of -
Value: Enter the tag that should complete the task, such as
delete_admin_task.
-
Variable:
The workflow will now run when that tag is added to a ticket.
Choose a SweetHawk delete workflow
After creating the trigger, choose the delete workflow that matches what you want to remove. Each workflow uses a dedicated Look up action to retrieve the item, followed by the corresponding Delete action.
This guide covers the following workflows:
You only need to add the action that matches your workflow.
Delete Task
Use Delete Task when you want to remove a single task from a ticket.
Look up the task
- Click the + beneath the trigger card to add the second step.
- Scroll to External actions.
- Select SweetHawk.
- Select Look up Task.
- Under Zendesk ticket ID, select Ticket ID from the trigger card.
- Under Task Name enter the name of the task that will be deleted. Matching ignores case.
The lookup action returns a Task ID, which is used by the delete action.
Delete the task
- Click the + beneath the lookup step.
- Scroll to External actions.
- Select SweetHawk.
- Select Delete Task.
- Under Zendesk ticket ID, select Ticket ID from the trigger card.
- Under Task ID, select task_id variable from the Look up Task step.
When the workflow runs, the selected task will be permanently deleted.
Delete Task List
Use Delete Task List when you want to remove an entire task list from a ticket.
Look up the task list
- Click the + beneath the trigger card.
- Scroll to External actions.
- Select SweetHawk.
- Select Look up Task List.
- Under Task list select the pre-defined task list that will be deleted.
- Under Additional fields, select Zendesk ticket ID and select Ticket ID from the trigger card
The lookup action returns a Task List ID, which is used by the delete action.
Delete the task list
- Click the + beneath the lookup step.
- Scroll to External actions.
- Select SweetHawk.
- Select Delete Task List.
- Under Zendesk ticket ID, select Ticket ID from the trigger card.
- Under Task list ID, select task_list_id variable from the Look up Task List step.
Note: Deleting a task list permanently removes the task list and all tasks it contains, regardless of whether they have been completed. Any linked sub-tickets are disconnected but are not deleted.
When the workflow runs, the selected task list will be permanently deleted.
Delete Phased Task List
Use Delete Phased Task List when you want to remove an entire phased task list from a ticket.
Look up the phased task list
- Click the + beneath the trigger card.
- Scroll to External actions.
- Select SweetHawk.
- Select Look up Phased Task List.
- Under Phased task list select the pre-defined phased task list that will be deleted.
- Under Additional fields, select Zendesk ticket ID and select Ticket ID from the trigger card
The lookup action returns a Phased Task ID, which is used by the delete action.
Delete the phased task list
- Click the + beneath the lookup step.
- Scroll to External actions.
- Select SweetHawk.
- Select Delete Phased Task List.
- Under Zendesk ticket ID, select Ticket ID from the trigger card.
- Under Phased task list ID, select phased_task_list_id from the Look up Phased Task List step.
Note: Deleting a phased task list permanently removes all phases and tasks, regardless of their completion status. Any linked sub-tickets are disconnected but are not deleted.
When the workflow runs, the selected phased task list will be permanently deleted.
Review and test the flow
Your completed flow should contain:
- A Zendesk ticket trigger.
- Two SweetHawk actions, lookup & delete.
Save the flow, then test it on a ticket containing the relevant task list or phased task list, before activating the action.
Once you are happy with the test, activate the action under the 3 dot menu on the top right.