# Upload CSV datas API workflow

**URL:** <https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678>\
**Category:** APIs\
**Created:** [October 6, 2016, 8:04am UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678 "2016-10-06T08:04:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bfanti](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@Bfanti](https://forum.bubble.io/u/Bfanti)\
**Post date:** [October 6, 2016, 8:04am UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/1 "2016-10-06T08:04:34Z")

</div>

Hi all,

I need to upload a CSV file in my database, but the upload is too long with the classical way.

So the solution we suggest to me is to create an AP, write a script, and use the API workflow to do so, but I have no idea on how to create the API and write a script.

Anyone has an idea to help me please ?

Thank you in advance 🙂

Baptiste

---

<div class="post-metadata">

**Author:** ![propvideo](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/propvideo/32/5491_2.png) [@propvideo](https://forum.bubble.io/u/propvideo)\
**Post date:** [October 6, 2016, 11:20am UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/2 "2016-10-06T11:20:32Z")

</div>

Can you split the file? Is it a one off, this my be your best way. I had a file of 10,000 records would not upload, I split the CSV into 1000 records and it took no more than a few minutes.

With the API, do you have the URL end link available? What are you trying to accomplish?

---

<div class="post-metadata">

**Author:** ![Bfanti](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@Bfanti](https://forum.bubble.io/u/Bfanti)\
**Post date:** [October 6, 2016, 11:29am UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/3 "2016-10-06T11:29:12Z")

</div>

Hi,

My file is only 700 rows, but I don’t know why it does not work …

No, I haven’t any URL. I don’t know exactly how does it works … (I’m a nooby 🙂 )

That I need is an API which can extract the data of a CSV file, then I will be able to use a API workflow in Bubble to insert the rows in the database (I already know how to do that). I just need the API.

Can you help me to do this ?

Thanks,

---

<div class="post-metadata">

**Author:** ![propvideo](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/propvideo/32/5491_2.png) [@propvideo](https://forum.bubble.io/u/propvideo)\
**Post date:** [October 6, 2016, 11:38am UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/4 "2016-10-06T11:38:40Z")

</div>

Not quite sure, the CSV should work. Have you tried a test sample - maybe 10 records. Does it pick up mapping of fields - see screenshot

 ![](https://us1.discourse-cdn.com/bubble/original/2X/9/985ebff956d4df88d8cfc6311d8f374d707be1b8.png)

---

<div class="post-metadata">

**Author:** ![Bfanti](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@Bfanti](https://forum.bubble.io/u/Bfanti)\
**Post date:** [October 6, 2016, 11:45am UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/5 "2016-10-06T11:45:09Z")

</div>

Yes it works with only 10 records, but I waited for 2 hours for the whole file and it crashed. I will need in the futur to import several files, that’s why I would like an API to avoid splitting every file … What do you think ?

---

<div class="post-metadata">

**Author:** ![propvideo](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/propvideo/32/5491_2.png) [@propvideo](https://forum.bubble.io/u/propvideo)\
**Post date:** [October 6, 2016, 12:02pm UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/6 "2016-10-06T12:02:32Z")

</div>

This is the bit I don’t get - How do you intend to create a CSV to API. As in the CSV is not live data. I dont think bubble can do this - but someone else may correct me.

The original source of the CSV, do they have an API endpoint that you can take data from - i.e

[https://api.nytimes.com/svc/search/v2/articlesearch.json](https://api.nytimes.com/svc/search/v2/articlesearch.json)

---

<div class="post-metadata">

**Author:** ![Bfanti](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@Bfanti](https://forum.bubble.io/u/Bfanti)\
**Post date:** [October 6, 2016, 12:24pm UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/7 "2016-10-06T12:24:54Z")

</div>

I don’t event know … that’s why I am here, to get informations about that 🙂

---

<div class="post-metadata">

**Author:** ![propvideo](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/propvideo/32/5491_2.png) [@propvideo](https://forum.bubble.io/u/propvideo)\
**Post date:** [October 6, 2016, 1:19pm UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/8 "2016-10-06T13:19:23Z")

</div>

No worries - Ok lets start with your CSV - where did you get the data from?

---

<div class="post-metadata">

**Author:** ![Bfanti](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@Bfanti](https://forum.bubble.io/u/Bfanti)\
**Post date:** [October 6, 2016, 1:40pm UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/9 "2016-10-06T13:40:57Z")

</div>

All right ! My datas come from a software, and I need to integrate them in the DB.

---

<div class="post-metadata">

**Author:** ![propvideo](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/propvideo/32/5491_2.png) [@propvideo](https://forum.bubble.io/u/propvideo)\
**Post date:** [October 7, 2016, 10:21am UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/10 "2016-10-07T10:21:59Z")

</div>

Yes - ask your software provider for an API URL -

Then watch this video - [https://vimeo.com/162729137](https://vimeo.com/162729137)

---

<div class="post-metadata">

**Author:** ![Bfanti](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@Bfanti](https://forum.bubble.io/u/Bfanti)\
**Post date:** [October 10, 2016, 7:46am UTC](https://forum.bubble.io/t/upload-csv-datas-api-workflow/6678/11 "2016-10-10T07:46:39Z")

</div>

All right got it !

I’m gonna try and come back to you, thanks 😉
