Error with Bundles and External Scripts in Project Templates

I have a Project Template that is utilized as part of an Rule that converts a task to a project using this template. The template contains a 2 Bundles and a separate Rule (ie. not in the Bundles) that has an External “Run script” action in it. While this rule would ideally be in one of the Bundles, I can’t add this as it appears Bundle rules do not support external actions.

The problem I am experiencing is that when the project is created, there are two errors I’m presented with.

  1. “An error occurred while adding this bundle to your project. Remove the bundle and try again.”

This happens 100% of the time in this conversion. I have no idea why, other than to assume this is a bug. I can confirm that removing the bundle and adding it again resolves this error, however this is highly disruptive and unintuitive for non-power users. This also impacts tasks nested under the Sections included in the Bundle, moving them outside of their pre-defined sections.

  1. “1 rule needs review”

This is the “Run script” rule. It appears the “Scripts by Asana” app needs to be re-authorized every time a project is created using this rule, which again is creating a lot of friction to use this project template effectively.

Any ideas to help overcome these issues?

cc: @Joanna_Czarnobilska

1 Like

Hey @MattClark_iDO
When it comes to Scripts and Script actions, I am afraid, I’m not your person. Moving this post to the Developers and API section for you! The clever minds there should be better help!

Hello @MattClark_iDO ,

I’ve learned of a bug that was causing this specific message: An error occurred while adding this bundle to your project. Remove the bundle and try again., which I can see was mitigated fairly recently. Is this still happening? If so, since you have two bundles being applied, it makes me wonder if there’s a chance they might be applying conflicting resources? If it doesn’t seem to be the case, could you open a detailed support case? I’ll try to reproduce this and formally raise as a bug.

Given that these bundles are included in some sort of template that you’re using, does it appear to be a feasible option to include those bundles’ resources in the unified template itself? This would bypass the bundle application process entirely, though it would also mean losing the benefit of easy bundle updates.

As for the “Run script” action issue, you are correct: the new project does not implicitly inherit auth permissions for external apps. This means the connection needs to be re-authorized in the context of the new project. I can admit this indeed appears to create friction for users who rely on template-driven workflows and there’s a room for potential improvements here.

2 Likes

Hi @Mikhail_Melikhov - thanks for your response. I’ve not had an opportunity to test this again, as I’ve modified the workflow to work around this issue. I believe this was resolved by removing the Run Script rule from the template (as I couldn’t have this be re-authorized every time a project was created), and that seemed to correct the problem.

So my assessment if you’re looking to recreate the issue is to have a bundle and a rule with a Run Script action in a project template. Thanks!