Asana "Custom Scripts" Snippets
Unlock the power of Asana rules with custom actions
While native Asana rules are powerful, our custom scripts offer additional options for your workflows. These snippets stay native to Asana and provide enhanced automation capabilities.
Need something specific? Reach out to bastien@ido-clarity.com for custom snippets.
How To Use Our Snippets
Follow these simple steps to implement custom scripts in your Asana workflows.
Our snippets are designed to work seamlessly with Asana’s native rule system.
1- Create an Asana native rule
Set up a new rule in your Asana project or workspace
2- Add an action
Select "Do this" in your rule configuration
3- Navigate to "External action"
Choose external action from the action types
4- Choose "Run script"
Select the run script option for custom automation
5- Paste any snippet below
Copy and paste the desired script from our collection
Create Rule
Custom Scripts Collection
Ready-to-use custom scripts for enhanced Asana workflows.
Copy, paste, and implement these snippets in your rules.
#1 – Duplicate
Duplicate an entire task including the assignee, attachments, dates, dependencies, followers, notes, parent, projects, subtasks and tags.
async function run() {
const triggeringTask = await
tasksApiInstance.getTask(task_gid);
await tasksApiInstance.duplicateTask({
data:{
name: triggeringTask.data.name + ' [duplicate]',
include: "assignee, attachments, dates, dependencies, followers, notes, parent, projects, subtasks, tags"
}
}, task_gid)
}
run();
#2 – Cancel
Turn a task into an approval and reject it to cancel.
async function run() {
await tasksApiInstance.updateTask({
data:{
resource_subtype: 'approval',
approval_status: 'rejected'
}
}, task_gid)
}
run();
#3 – Mark as approval
Mark a task as approval
async function run() {
await tasksApiInstance.updateTask({
data:{
resource_subtype: 'approval'
}
}, task_gid)
}
run();
#4 – Mark as milestone
Mark as milestone
async function run() {
await tasksApiInstance.updateTask({
data:{
resource_subtype: 'milestone'
}
}, task_gid)
}
run();
#5 – Mark as task
Turn a milestone or approval task back into a regular task
async function run() {
await tasksApiInstance.updateTask({
data:{
resource_subtype: 'task'
}
}, task_gid)
}
run();
Free Premium Scripts
Advanced automation scripts available upon request. These scripts provide sophisticated workflow enhancements and custom logic.
- #6 – Block by all subtasks
- #7 – Append an emoji to a task name
- #8 – Complete all subtasks
- #9 – Notify about weekends
- #10 – Dependant task
- #11 – Project status update
- #12 – Delete all subtasks
- #13 – Remove task from collaborators
- #14 – Detect a word
- #15 – Generate a random number
- #16 – Copy fields into subtasks
Long snippets available on request
Scripts that are more than 50 lines long, you can email
bastien@ido-clarity.com to ask for a specific one: