# LF analog "createBatch" for JS script

**URL:** <https://community.fibery.io/t/lf-analog-createbatch-for-js-script/4881>\
**Category:** Misc\
**Created:** [August 1, 2023, 11:41am UTC](https://community.fibery.io/t/lf-analog-createbatch-for-js-script/4881 "2023-08-01T11:41:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TonyLH](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/tonylh/32/7196_2.png) [@TonyLH](https://community.fibery.io/u/TonyLH)\
**Post date:** [August 1, 2023, 11:41am UTC](https://community.fibery.io/t/lf-analog-createbatch-for-js-script/4881/1 "2023-08-01T11:41:46Z")

</div>

Hi!  
I’m trying to write an automation that updates or adds new records received via http.

I am using a loop and await fibery.createEntity.

But it takes a long time to add records one by one. and after 60 seconds the script stops without completion.

How can I add many records at once?

graphQL has “createBatch”, is there an analog for JS scripts?

---

<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:** [August 1, 2023, 11:45am UTC](https://community.fibery.io/t/lf-analog-createbatch-for-js-script/4881/2 "2023-08-01T11:45:31Z")

</div>

You can use the `executeSingleCommand` function in an script, and then everything is available via the normal API, including batch commands:

```auto
{
           "command": "fibery.command/batch",
           "args": {
             "commands": [
               {
...

```

See [api.fibery.io](http://api.fibery.io) for api info
