1T - CSV Creator 3.0

Use the format as JSON-safe operator instead of double quotes. This will default to JSON safe values when no value is given as well as escape any JSON breaking characters in your data.

@rico.trevisan Like this:

Thank you @eli
But I am unable to actually see the results of reformatting the JSON because I am still getting the outage issue anytime I use the action Create a CSV from JSON (again, this does not happen with Create a Dynamic CSV file).

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!

It would be helpful if you could update the plugin page because that is what I followed to get my original, incorrect JSON formatting.

@april I will often build out my expression for creating the JSON in a text element on a test page so I can see the results. You can then copy that into something like JSON Lint and see if there are any errors. Probably the next step to trouble shoot here.

The actual error of a ‘temporary outage’ i haven’t seen before. That seems like a Bubble error.

And noted on the documentation. I see exactly what you are saying there. Will update.

Yup. Fixed that :pray: thks

Thanks. It has worked this time with your suggestion. Since it was working earlier too and breaking sometimes, I need. to see if it continues working. I hope it does.

Important point to remember for others who are reading this is that format as json safe should be done on individual fields and remove the double quotes around them. Not to do format as json-safe on the generated JSON.

Cant find this video, not working for me.

Im trying to ad headers to CSV from the create CSV from JSON action

@eli or @davidb or anyone else. I must be missing something obvious, but on the server side action, after “CSV Creator - New File from Base64” whether private or not I am stuck with a link to the file that doesn’t work when I try to download it because it has the following text prepended to the file url and then a " after the file url.

https://bubble.io/"// [file_url].csv "

image
NOTE: in file manager the file is there with the proper link

I would appreciate it if anyone could point me to what might be causing the file url to be messed up like this.

I don’t follow all the details of what you’re seeking to accomplish or have tried. Also, I don’t have experience using this plugin’s base64-related actions. Nonetheless, in case it’s helpful, here’s my implementation for using JSON to create a CSV file, a copy of whic is then attached to a thing, followed by the original CSV file being deleted.

  1. Send JSON to CSV Creator action from this plugin.


    (I annotated the property names because they’re not appearing correctly on their own.)

  2. When CSV Creator has created your file event from this plugin.
    image

  3. File Upload action from File Uploader Bubble API plugin, currently maintained by @Thimo (see also forum thread).

  4. Delete an uploaded file standard Bubble action.
    image

thanks that is very very helpful. Appreciated.

1 Like

The quotes is simply how Bubble returns the created file. Simplest solution is to add a find & replace action that finds a double quote and replaces it with nothing.

Thanks, @eli and @davidb. Resolve the file issue with your suggestions and then tossing out the ZQ download plugin that was acting up.

2 Likes

Awesome plugin @eli

Do you think that the many times requested solution of handling UTF-8 characters is soon going to be supported? I also have problems with German “Umlaute” and special characters like öäü or ß

Forking and maintaining the plugin could work but brings in some overhead I think could be avoided.

Thank you very much!
Cheers

@hi_bubble This is now live. Please update to version 3.8.

I’ve tested with the following JSON and its exporting all characters correctly. Cheers!

[
  {
    "name": "Françoise",
    "language": "Français"
  },
  {
    "name": "Björn",
    "language": "Svensk"
  },
  {
    "name": "Mário",
    "language": "Português"
  },
  {
    "name": "Müller",
    "language": "Deutsch"
  },
  {
    "name": "Søren",
    "language": "Dansk"
  },
  {
    "name": "Łukasz",
    "language": "Polski"
  },
  {
    "name": "Pǐng",
    "language": "中国"
  },
  {
    "name": "राजेश",
    "language": "हिन्दी"
  },
  {
    "name": "Ελένη",
    "language": "Ελληνικά"
  },
  {
    "name": "Фёдор",
    "language": "Русский"
  },
  {
    "name": "Núñez",
    "language": "Español"
  },
  {
    "name": "Çağrı",
    "language": "Türkçe"
  }
]

Hey there @eli

I’ve been trying to use CREATE CSV FROM JSON without success.

The user should be able to download a financial projection of sales of diferente (ROWS) products and services.

Whats odd is that the CSV won’t generate more than 3 columns .

Here is a screenshot of my workflow and JSON

This is the result of the CSV downloaded:


I’m getting month 1 and month 5 of my financial projection but not everysingle column for each month as I’ve requested in screenshot one.

And this what the JSON looks like when using the DEBUGGER step-by-step

The financial projection goes up to 12 months.

Any ideas?

I saw the video “Bubble - CSV Creator - How to avoid timeouts by building your JSON using backend workflows.” But don’t think is necessary for my use case.

The reason it’s only generating 3 columns is that you have the same key defined for months 2-5 which is simply a space. When that json is parsed into columns there’s only three results.

You’ll need to define each month with a unique key.

Thank you @eli! Sometimes one does not see the obvious things.
Now working well.

1 Like

Love this plugin. After struggling with CSV export solutions and coming up with hacky methods to make them work, I wish I would have found this years ago. Thank you

1 Like