# Create a new account number via API workflows

**URL:** <https://forum.bubble.io/t/create-a-new-account-number-via-api-workflows/136285>\
**Category:** APIs\
**Created:** [February 15, 2021, 4:31pm UTC](https://forum.bubble.io/t/create-a-new-account-number-via-api-workflows/136285 "2021-02-15T16:31:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanck](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ryanck](https://forum.bubble.io/u/ryanck)\
**Post date:** [February 15, 2021, 4:31pm UTC](https://forum.bubble.io/t/create-a-new-account-number-via-api-workflows/136285/1 "2021-02-15T16:31:56Z")

</div>

Hello,

I´m trying to create a new account number with 10 digits starting by 4…1, 4…2, etc. when a user imports a customer list via CSV.

I´ve tried to do it via schedule an API workflow on a list from a CSV list of 40 customers but the account number is being set by groups of 10 or so with the same account number and I want each customer to have a different account number starting by 1, 2, 3… sequentially. So it should be: customer 1 = 4…1, customer 2 = 4…2, customer 3 = 4…3, etc.

Here is the page wf:

 ![Captura de pantalla 2021-02-15 a las 17.34.55](https://us1.discourse-cdn.com/bubble/original/3X/6/a/6ae1a128851dc352653b83f8d214d892f0cec242.png)

Here´s the backend wf setup:  
 ![Captura de pantalla 2021-02-15 a las 17.31.24](https://us1.discourse-cdn.com/bubble/original/3X/f/a/fa3e202c0b0bee0298667d9f78f918566e2d5613.png)

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [February 15, 2021, 5:52pm UTC](https://forum.bubble.io/t/create-a-new-account-number-via-api-workflows/136285/2 "2021-02-15T17:52:13Z")

</div>

Hello!

When you send a list to have something done … that same “something” happens to each item of the entire list. This is why all your proveedores are getting the same “count+1”.

If you want something different done to each proveedor, then you need to build logic for this different “something” to happen to **each** single entry.

I suggest you consider using schedule api and not schedule api on a list and set everything up in a somewhat similar fashion to this:

![image](https://us1.discourse-cdn.com/bubble/original/3X/c/6/c6f7e0620022771a7f7ed7f0d3bbeaa252fba7ea.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/e/6e9b842a36cf8e1fcdc74ac96189eee56ccea1ed.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/4/0/401ebce53d520c267b2df64a8bdfb3d91986b619.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/5/8/589e1505248e0f808fccf5a994edd8947c65a4ed.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/e/5/e5329740662c80bc7393a4b9767cedd642e6fcd3.png)

The above is a “loop” with an extinguishable condition (aka as a recursive flow).

Hope this helps 👍🏻

---

<div class="post-metadata">

**Author:** ![ryanck](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ryanck](https://forum.bubble.io/u/ryanck)\
**Post date:** [February 15, 2021, 6:35pm UTC](https://forum.bubble.io/t/create-a-new-account-number-via-api-workflows/136285/3 "2021-02-15T18:35:23Z")

</div>

Hello @cmarchan,

Thank you for your reply man. In the meantime I was trying the following topic and it seems to be working: [How to achieve Unique, Sequential Numbers Reliably? - #57 by morgan](http://forum.bubble.io/t/how-to-achieve-unique-sequential-numbers-reliably/81589/57)

I think it´s more clean and easy at least for me, hehe.

Thank you so much for your time man 🙂.

Have a nice day.
