1T - CSV Creator 3.0

@eli you are the man
I got the error and it was an error on json formating !

Thank for your precious help !

1 Like

Glad you solved it!

1 Like

HI @eli

I used this plugin to convert this JSON:

{
ā€œConversationā€: ā€œtitleā€,
ā€œmessagesā€: [
{ā€œroleā€: ā€œsalemā€, ā€œmessageā€: ā€œquestionā€},
{ā€œroleā€: ā€œassistantā€, ā€œmessageā€: ā€œanswerā€}
]
}

But I get this CSV:

Conversation,messages
title,ā€œ[object Object],[object Object]ā€

So why the list is not correct?

Hello @eli , could you please help me with the answers to my questions.

I thank you in advance for your response.

Greetingsā€¦

I am getting the error ā€œCSV Creator error: the parameter contents cannot be emptyā€ sometimes.

Wonder what is causing it. It is working fine mostly but sometimes it fails with this error.

Could it be because of file size? Or some malformed json? How to know?

My solution is to append a ...:defaulting to "" to the end of any field that could be empty. Would this work for you?

CleanShot 2024-05-14 at 10.20.44@2x

Any strategies to chunk the CSV creation?

For an app, users will likely try to create a CSV with 1000s of records of at a time. Iā€™m guessing Bubble will give me some grief when I try to do that. The backend process will probably timeout.

Are you suggesting that if a field can potentially be empty, we should use defaulting to even if the field has been enclosed with double quotes already?

This is how I have it.

Name field can be empty sometimes. So are you saying I should use defaulting to here? I wonder why would the double quotes around it wonā€™t suffice.

Give it a try. My hunch is that a field could also have a quote in it which would screw up everything.

Hi @eli I need your help to see what is this error all about?

In my test site it is working, but in my live site, this error. Do you think is potentially some data issue?

Hi @eli ! One question: is it possible to store the CSV (in, for example, a File type data object in my Bubble database), rather than letting the user download it?

The reason is weā€™re trying to send the CSV to another service in our stack.

Thank you!
Darin

UPDATE: I think this is the right way to do it? Could anyone confirm?

  1. Take our multiline input (which is what we want to turn into a CSV)

  2. Use Send JSON to CSVCreator, with following syntax (can anyone confirm this syntax is correct? Thank you!

  3. Then we can just store the CSVCreator as desired!

Is that right?

Yes. Use the ā€œA CSV Creator has created a fileā€ event to trigger a workflow that uses the ā€œFile uploadā€ action to save the file. Itā€™s likely helpful to also then save a reference to that file in a record for some relevant data type.

1 Like

Hey @Eli sorry I know its been asked many times but could you please link the setup tutorial, Iā€™ve tried the ones previously linked however they wonā€™t play.

Look forward to getting this plugin setup on my app!

Hi @eli , firts of all thanks for your work, I appreciate it, its amazing.

Now, i have used your plugin for some apps, but now I need to figure it out to create a CSV file, but with the pipe ā€œ|ā€ separador, instead of the comma. I know your plugin says that using comma is the default, but when i change the input for the pipe, the downloaded file it is not properly structured, and it is not properly managed by excel or google drive. Am i missing something? I will be working around more, but If you or any of you guys know something, i will appreciate your help.

UPDATE:

It seems like in order to see / manage a pipe delimited file in excel is neccessary to import it and spec some things about the file. Nothing related to the format or plugin, hope this helps to someone.

https://help.studentclearinghouse.org/reversetransfer/knowledge-base/converting-pipe-delimited-file-to-excel/

1 Like

Hi all,
Am I the only one who is experiencing an outage? I have no issue csv export with Create a Dynamic CSV file, but every time I switch the action to Create a CSV from JSON I get this issue:

image
Sorry, we are experiencing a temporary outage and were unable to complete your request. Weā€™re working to get it right, please try again in a while!

I need to export a nested list so Dynamic CSV file is not a sustainable option.

Or maybe someone can advise if Iā€™ve set up the JSON incorrectly?

I canā€™t view this video. Appearing like a GIF in loop. No sound. @eli kindly check.

@april, your JSON is not set up properly. For your nested lists you should have the search in between the square brackets [] with a format as text operator on the list as shown on the ā€˜listā€™ field in this example:
image

Inside that ā€˜format as textā€™ operator you will set it up like this

I would also highly recommend using format as JSON-safe on your values instead of putting them between double quotes. That will automatically format your values properly as well as add the double quotes.

Thanks for the update @joqr231210!

@darin Yep, thatā€™s correct! The file is already uploaded to your Bubble file storage so you should be able to simply save the url wherever you need it.

@francischin This is a JSON error likely caused by characters in your data that is breaking the JSON structure. Make sure youā€™re using the format as JSON-safe operator on your value to ensure they are formatted properly.