Accessing ALL Step 1 Results in Script?

You can use formulas to get the results of any of the entities that triggered the first step of an automation rule, but when I return the values of Step 1 in a script, it only seems to give me the ID of the entity that triggered the rule, not all entities that were in step 1.

For example, I can use the following in formulas to get info on the unique entities:

  • [Step 1 User]
  • [Step 1 unlinked Sprint]
  • [User who triggered Rule]

But if I use args.steps[1].result in a script, I only get the user data, not the sprint data:

  • Script: {“entities”:[{“id”:“7fb4e4cf-2245-7f8e-a6e0-2eada9d3a381”,“type”:“fibery/user”}]}

Is there a way to easily get the user and the sprint in a script?

Not easy to do it at the moment…

You can vote for it here: Add "Step 1 Linked/Unlinked Entity" in scripts

There’s a workaround something like this: How to create a comment in a thread view with Step 1 Linked entity - #8 by Chr1sG

It looks at markdown template and not scripting, but I think the idea can be extended to this problem. I’ve never tried it though.

Indeed this is an annoying place where no-code automations are more powerful than scripting.