# 自分でルールのアクションを作れます！

**URL:** <https://forum.asana.com/t/topic/1064917>\
**Category:** アンバサダーのヒント\
**Created:** [24 May 2025 02:37 UTC](https://forum.asana.com/t/topic/1064917 "2025-05-24T02:37:46Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Tetsuo\_Kawakami](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/tetsuo_kawakami/32/84271_2.png) [@Tetsuo\_Kawakami](https://forum.asana.com/u/Tetsuo_Kawakami)\
**Post date:** [24 May 2025 02:37 UTC](https://forum.asana.com/t/topic/1064917/1 "2025-05-24T02:37:46Z")

</div>

enterprise以上のユーザーに限定されますが、APIを使って自分でアクションを作れるようになったようです。

> **[Script Actions](https://developers.asana.com/docs/script-actions)**
>
> Overview A script action is a type of rule action that can run a custom Node.js script to call the Asana API. Developers can use this feature to deeply automate Asana processes by using custom code and the API. Why use script actions Rules are a...

APIを使うので、対象ユーザーは限定されますが、asanaから新しいルールのリリースがされていなくても、できることがかなり増えると思います。

使用する言語はjavascriptのようです。  
私もまだ試せていないのですが、スクリプトの中で条件分岐をかけるはずなので、提供されていない条件を作ることも可能だと思われます。  
例えば、トリガーしたタスクのサブタスクの完了状態を調べて、サブタスクのうち一つでも未完了のものがあればと言った条件を作ることもできそうです。  
また、トリガーしたタスクの親タスクの状態を条件にすることもできるのではないでしょうか？  
その場合、ルールとしてはトリガーとアクションだけを作って、条件もアクションスクリプトの中に記述することになると思います。

パワーユーザーの方は、ぜひ自作スクリプトを投稿してください！

参考情報（英語になります。）  
How to➡️[How to write a Script Action script](https://developers.asana.com/docs/how-to-write-a-script-actions-script)  
例➡️[Script action examples](https://developers.asana.com/docs/script-actions-examples)  
asana forum➡️

---

_[View the full topic](https://forum.asana.com/t/topic/1064917)._
