# 👂 Feedback needed: scripts in automations that shouldn't be scripts

**URL:** <https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560>\
**Category:** News & Announcements\
**Created:** [August 28, 2024, 8:05am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560 "2024-08-28T08:05:12Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [September 23, 2024, 11:39pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/42 "2024-09-23T23:39:29Z")

</div>

Sure - if some condition A, then return some filtered collection; else return empty.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 24, 2024, 5:41am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/43 "2024-09-24T05:41:59Z")

</div>

> [@Matt\_Blais](#):
>
> if some condition A, then return some filtered collection; else return empty.

This can (usually) be done via

`Collection.Filter(Condition A)`

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [September 25, 2024, 2:08am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/44 "2024-09-25T02:08:34Z")

</div>

I might be mis-remembering, but when you have a DB with an auto-linked relation to another DB’s Public Id, a script is required to auto-vivify one whenever the other is created.

My recollection is that a script was required was because I couldn’t access Public Id via a Formula.

---

<div class="post-metadata">

**Author:** ![Sergey\_Truhtanov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/sergey_truhtanov/32/13986_2.png) [@Sergey\_Truhtanov](https://community.fibery.io/u/Sergey_Truhtanov)\
**Post date:** [September 25, 2024, 9:07am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/45 "2024-09-25T09:07:16Z")

</div>

> [@Lee\_Denny](#):
>
> UUID in a formula or auto

And can you please describe your use case?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 25, 2024, 9:14am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/46 "2024-09-25T09:14:28Z")

</div>

> [@Matt\_Blais](#):
>
> when you have a DB with an auto-linked relation to another DB’s Public Id, a script is required to auto-vivify one whenever the other is created

I think this is not so much a formula issue, but more a side-effect of the fact that an auto-linked relation is read-only, so you can’t do the same things in automations that you can with a normal relation, e.g. add new entity

---

<div class="post-metadata">

**Author:** ![Lee\_Denny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/lee_denny/32/8158_2.png) [@Lee\_Denny](https://community.fibery.io/u/Lee_Denny)\
**Post date:** [September 25, 2024, 9:22am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/47 "2024-09-25T09:22:27Z")

</div>

Two quick ones;

To create URLs with parameters to pre-populate fields in Fibery forms.

To make it easier to use Zapier to interact with any single select, multi select or relational fields all of which require using the UUIDs.

So much of the way Fibery works with external software requires UUIDs but you make it basically impossible to access them inside your product!

---

<div class="post-metadata">

**Author:** ![interr0bangr](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/interr0bangr/32/8089_2.png) [@interr0bangr](https://community.fibery.io/u/interr0bangr)\
**Post date:** [September 25, 2024, 1:16pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/48 "2024-09-25T13:16:29Z")

</div>

I wish GraphQL was implemented universally across all databases in Fibery so it could be used in all scripts. Currently you can’t use it to query the Fibery/User database.

---

<div class="post-metadata">

**Author:** ![Oleg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/oleg/32/1887_2.png) [@Oleg](https://community.fibery.io/u/Oleg)\
**Post date:** [September 25, 2024, 1:33pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/49 "2024-09-25T13:33:20Z")

</div>

Hello, @interr0bangr

Please use Fibery API which is implemented to be used universally. Please find more information [here](https://the.fibery.io/@public/User_Guide/Guide/Fibery-API-Overview-279#Guide/REST-API-259)

---

<div class="post-metadata">

**Author:** ![interr0bangr](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/interr0bangr/32/8089_2.png) [@interr0bangr](https://community.fibery.io/u/interr0bangr)\
**Post date:** [September 25, 2024, 2:02pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/50 "2024-09-25T14:02:38Z")

</div>

Thank you. We do use that when needed, would just prefer not having to mix & match APIs if it was at all possible and use GraphQL for everything. 🙂

---

<div class="post-metadata">

**Author:** ![NicolSpies](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/nicolspies/32/4317_2.png) [@NicolSpies](https://community.fibery.io/u/NicolSpies)\
**Post date:** [September 25, 2024, 2:04pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/51 "2024-09-25T14:04:22Z")

</div>

Works great 😀 😀 😀  
Only found one problem that needed correction.  
The AI generated script referred to the start and end of date ranges as range.Start and range.End instead of range.start and range.end

---

<div class="post-metadata">

**Author:** ![Quinn\_JH](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/quinn_jh/32/5296_2.png) [@Quinn\_JH](https://community.fibery.io/u/Quinn_JH)\
**Post date:** [September 25, 2024, 3:55pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/52 "2024-09-25T15:55:13Z")

</div>

Lee,

I recall solving an automation problem checking that an entity was created for each product of two types by spitting this value into an additional field called ‘api-id’ to be easily accessible. I would select all and run this script:

```auto
const fibery = context.getService('fibery');
for (const entity of args.currentEntities) {
    await fibery.updateEntity(entity.type, entity.id, {
        'api-id': entity.id
    });
}

```

As others have said, entity UUID’s are not unique across databases, but was not an issue for my app. Definitely seemed like I was “doing the wrong thing” here but didn’t care as it got rid of the friction - and allowed using the id from within formulas.  
Maybe this is what you mean by “impossible to access”?

---

<div class="post-metadata">

**Author:** ![YvetteLans](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/yvettelans/32/6101_2.png) [@YvetteLans](https://community.fibery.io/u/YvetteLans)\
**Post date:** [September 27, 2024, 10:28am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/53 "2024-09-27T10:28:13Z")

</div>

We currently use scripts to copy files from one entity to another. Would be great if we can have a native solution for that as well 🤩

---

<div class="post-metadata">

**Author:** ![mdubakov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mdubakov/32/10_2.png) [@mdubakov](https://community.fibery.io/u/mdubakov)\
**Post date:** [September 27, 2024, 10:39am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/54 "2024-09-27T10:39:37Z")

</div>

> [@YvetteLans](#):
>
> We currently use scripts to copy files from one entity to another

First, we want re-design files component and transform it to Files Field. Then we will do other things like that on top

---

<div class="post-metadata">

**Author:** ![Lee\_Denny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/lee_denny/32/8158_2.png) [@Lee\_Denny](https://community.fibery.io/u/Lee_Denny)\
**Post date:** [September 27, 2024, 3:10pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/55 "2024-09-27T15:10:03Z")

</div>

Thanks for this idea, I dont see why UUID cant just be available in formulas without having to use this workaround though

---

<div class="post-metadata">

**Author:** ![Sarah\_Arminta](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/sarah_arminta/32/4915_2.png) [@Sarah\_Arminta](https://community.fibery.io/u/Sarah_Arminta)\
**Post date:** [September 28, 2024, 10:35pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/56 "2024-09-28T22:35:49Z")

</div>

I actually just tried the AI Script Assistant and it was very helpful! Thank you for making this!!

---

<div class="post-metadata">

**Author:** ![mdubakov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mdubakov/32/10_2.png) [@mdubakov](https://community.fibery.io/u/mdubakov)\
**Post date:** [September 29, 2024, 7:09am UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/57 "2024-09-29T07:09:57Z")

</div>

In the next release it will be available right near Script action in Automations.

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [September 30, 2024, 3:14pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/58 "2024-09-30T15:14:55Z")

</div>

If the script AI can create complex API queries, that will be an amazing time saver. 😀  
I have not played with it yet.

---

<div class="post-metadata">

**Author:** ![tycecycle](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@tycecycle](https://community.fibery.io/u/tycecycle)\
**Post date:** [September 30, 2024, 4:21pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/59 "2024-09-30T16:21:26Z")

</div>

+1 on prior steps. Would be great to just simply grab the results without scripting.

> [@helloitse](#):
>
> **Using the Outputs of Prior Script Steps**
> 
> ![](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/48/498_2.png) [Do automation actions return step results? Can we use them further down the automation stack?](https://community.fibery.io/t/do-automation-actions-return-step-results-can-we-use-them-further-down-the-automation-stack/4373/2) [Automations](https://community.fibery.io/c/ideas-features/automations/12)

---

<div class="post-metadata">

**Author:** ![Illusory](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/illusory/32/10403_2.png) [@Illusory](https://community.fibery.io/u/Illusory)\
**Post date:** [October 1, 2024, 6:15pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/60 "2024-10-01T18:15:51Z")

</div>

> [@interr0bangr](#):
>
> Formulas within automation filters! Would unlock so much more power and minimize many complex workarounds for things.

> [@interr0bangr](#):
>
> There’s no way to do auto-links with any other condition besides EQUALS, which means we often need to rely on scripts to link related entities for CONTAINS/IS ONE OF scenarios.

Agreed.

> [@interr0bangr](#):
>
> - There’s no way to do multiple/splitting paths (IF statements) in automations without a script.

100%. Or you must create multiple automation rules for small variations, which is a pain.

> [@interr0bangr](#):
>
> “ToNumber” function\*\* (the opposite of the existing “ToText” function)

This one is big as well. Really need this.

> [@helloitse](#):
>
> Call a webhook/URL

One of the biggest for us, as I’ve already stated. POST is a priority. GET is a plus.

Excited to see what is implemented. Apart from improving the overall user experience when dealing with automated functions, Fibery eliminating more “workarounds” by providing direct integration with Automations will encourage users of the revived Free Plan to upgrade to the Pro Plan for enhanced automated features and limits.

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [October 1, 2024, 8:40pm UTC](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560/61 "2024-10-01T20:40:43Z")

</div>

Not exactly answering the question posed, but this is related, as it is about a missing Automations capability:

**Ideally we could mark a Rule to execute for multiple matching entities Sequentially rather than in Parallel; i.e. the Rule must complete _all_ its actions for one entity before it begins executing any actions for another entity.**

My problem scenario: I have many subject entities that need to get linked by a Rule to an “aggregation entity” (by matching a date range), and if the appropriate aggregation entity does not exist for the required date range, then it gets created and linked.

This should be simple, but I can find no way to prevent a missing aggregation entity from being created multiple times, because the Rule appears to process multiple subjects in parallel (meaning Action 1 of the rule is executed “in parallel” for multiple entities before the remaining Actions have been completed).

It appears that when multiple entities match a Rule, up to 50 of them begin running the first Action(s) of the Rule before any of them have actually completed the entire Rule. So I have multiple entities deciding their aggregation entity does not exist, and they all proceed to create their own version of it, when only one should be created.

[Previous page](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560.md?page=2)

[Next page](https://community.fibery.io/t/feedback-needed-scripts-in-automations-that-shouldnt-be-scripts/6560.md?page=4)
