Load Script Action code from Templates

Is it possible to save a Rule which triggers a Script Action, and its associated script, in a Template?

Currently, when a project is created from my template I can see the rule with the Script Action action, but the script saved in the template is not there. Just the default script.

Script Actions are a great step towards providing flexibility in Rules, but they are almost worthless to me if the script itself cant be automatically provisioned from a template.

I think you can’t currently save a script in a template; is that true, @Bastien_Siebman?

Indeed because external actions aren’t available. BUT you can pre-multi-home tasks in another project (in the template) and this project can hold the rule. That’s the same hack for Bundles: a rule in a bundle can multi home a task in a project holding an external rule

1 Like

Thanks, that gets me a step closer. The problem now is that the project_gid provided to the script is that of the holding project rather than the triggering project. My use case relies on the GID for the triggering project. Any work arounds for that or do I need to script something to go find the specific project that I want? I haven’t tried it but im guessing a rule in the triggering project that changes the task name to the Project URL, and then part of the script in the holding project would be to grab the Project GID from the URL and perform whatever actions on that project instead of on project_gid

As a feature request, being able to include actual Script Action scripts in a template would be very useful.

Vote for this:

2 Likes

Hi Scott, I ran into a similar issue with this in regards to External Actions.
I’m working through how to get this all to work nicely, as previously, I was using the fact that you can duplicate a project to duplicate it’s external actions. This was great, but to update all the External Actions meant manually updating each project which is crazily time consuming.
In particular, I utilize @Bastien_Siebman’s teams’ iDo Outgoing POST request.

Not sure if this will fit into your workflow perfectly, but here’s a work-around I’m working through. You may need to use different tools/platforms to accomplish it within your org, but here’s the general idea.

  • We have a Google Form filled out to create each of our projects
  • This triggers a Zapier automation that creates the project based on fields on the GForm using Python
  • When the new project is created, I have a step in Zapier to extract the Project GID of the newly created project (Python)
  • I have a step to wait 60seconds here, that way all the tasks can be fully generated for the new project
  • Using the extract Project GID, I map this to all the tasks that are on the new project under a custom field called “Parent Project GID” in Zapier (Python)
  • I can then use this “Parent Project GID” field to pass the gid from the triggering task into my automations to ensure they run on the correct project
  • I’m now making it so that all the tasks on the Parent Project that get created, also get mapped to a new Automation board under identical section names.

Currently I’m still doing testing with a new Automation Board that holds all the tasks under sections with matching names to each standard Project Board, but maybe this gives you some ideas on how to tackle it.

Some limitations of this approach are that a single Asana project board can have a maximum of 400,000 tasks. Meaning if your projects have a multitude of tasks or if you a hundreds of projects, you do need to be cognizant of the task amounts.

I’m coming up with some logic to allow the Automation board to get cleared out as tasks reach total completion, and then logic to add them back from the Parent Project if they need to be put back into our pipeline.

To summarize:

  • New Projects get mapped to Automation Board
  • Automation board has same sections as any new Project
  • Automation board receives trigger from the triggering tasks, regardless if the trigger is from the Parent Project or the Automation board because you use the Parent Project GID to direct your automation
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.