"Get CSV" action to deliver user-friendly spreadsheet?

I have what feels like a simple use case that I’ve now spent a week over-thinking and over-engineering. Help!

The goal is to deliver a simple spreadsheet to a user that contains a filtered list of things. I have no problem getting the list into a repeating group, or passing the list to Zapier. But going from there to a CSV has me stumped.

Also, since I’m only trying to pass values for a single data type and its child fields, it feels like I should be able to simply use an API connector to grab rows from the database, set some column names in a CSV, and push the data.

Any ideas??

If you learn anything here, please let me know. I’ve cut a big feature of our app because of the CSV functionality not being up to snuff. In my experience, even when I got the CSV to export, I couldn’t control what got displayed and what didn’t, so the users saw a bunch of UUID gobbledygook.

2 Likes

I actually have a complex process running, but took 4 services to achieve (Bubble, Zapier, Google Sheets, Ultradox), and the end output is a Word doc, not a CSV! It’s data the customer desperately needs in spreadsheet format to manipulate further, but in case you’re interested:

  1. Bubble: Get data into a repeating group, then use Trigger a Zapier zap action to pass comma-separated list of texts to Zapier. Find and escape commas if your field value is a description (important later).

  2. Zapier: Set up a Zap using Zapier’s handy formatter to parse the text (splitting on commas), and pass this to a Google spreadsheet.

  3. Ultradox: this is a great service that lets you set up nicely formatted Google Docs templates, pass in variables from Google Sheets, and output a Word, PDF, HTML email, etc. Sadly, no simple CSV output.

As you can see, WAAAY over-engineered! Will keep you posted if others have better suggestions.

1 Like

I don’t know what your specific use case is, but here’s a few thoughts that may help:

I’m almost certain Bubble has a plugin that creates an excel like table that you can put data into (similar to Bubble’s admin of database fields where you see the raw data within a table, resize the width of the fields, etc.).

Additionally, it’s not too hard to create a CSV export in Bubble. The key is to create a separate table for the export. Load the data that you want exported to that table and then have it export (and delete the data afterwards so you can load new data to it for the next download).

Feel like there is a “simple” hack here using zapier + sheets or zapier + blockspring + sheets. Anyone else have a copy of the beta link for Bubble on Zapier? I just created a new account, but can’t seem to add Bubble from the general marketplace. I seem to recall needing a special invite, if anyone can forward to me =). @emmanuel

There is also a tool called sheetsu that turns Google Sheets into an API accessible csv.

@uproute here’s the link: https://zapier.com/developer/invite/19588/b63f861cc1102e8fbe076e14a7fc72b1/

Let me know if you have any luck, could use a simple hack!

May be a few ways to approach doing this. But looks like you may have gotten through the hardest part actually. Can’t you just add e-mail by zapier as step 7 and scrap the ultradox? You should have the ability to attach a file which can pull from step 6. I did this before and it sent an email with the attachment as .XLSX. I’m assuming this is as suitable for your needs as CSV? Let me know if that works for you.

that’s a great idea, didn’t realize Zapier had native “send an email” action with ability to send a Sheet as an XLS. Will give it a shot and report back.

I think part of the problem is that Bubble returns all of the fields for the data type, instead of being able to choose which ones are relevant to show in the report (e.g. a unique ID and home address may not but relevant to,a particular report but first name and phone number may be). You can’t get a list of just the first names and phone numbers using the download as CSV method.

How did you configure a Zapier step to send the whole Google sheet as XLSX? Step 6 for me is just a “Create row in sheet…” step, no obvious way in new step 7 to say “grab the Sheet that contains the row created in step 6”.

@uproute, I agree that this is a constraint and a problem. We haven’t tested our export feature with end users yet and I can imagine the “ID field”, “created date”, and “create by user ID” field is likely to confusing to some percentage of users. Don’t yet know whether it’s a deal breaker on our approach, but I’d appreciate a cleaner solution as well if someone comes up with one.

I was using the Google Sheets trigger “when a new spreadsheet is created” in zapier. I was hoping that it would list the spreadsheet ID in the data that came out of the “create a new row” step. If not, I think there is only one more step to get this across the line then. Use the API connector to create a new spreadsheet using the sheets API first.

So the basic outline would be a button that triggers a workflow that does that following:

  • API Call: POST Create A Spreadsheet POST https://sheets.googleapis.com/v4/spreadsheets?fields=spreadsheetId&key={YOUR_API_KEY}
  • CREATE A NEW THING in Bubble DB - REPORT (modify fields - these will be whatever you need for your parameters to complete the Zap). You will use the date returned from the prior API call step as your spreadsheet ID.
  • Trigger a Zap - pass the spreadsheet ID through as a text input which you will now pull form the newly created Report database record. This is in addition to the other records which you will want to pass through and show on the report.
  • Use Formatter by Zapier to parse based on commas (per your trick earlier)
  • Google sheets via Zapier - Create New Rows in the particular spreadsheet
  • Email by Zapier - attach the file ID that you received via the Bubble text input

Makes sense. Was hoping to avoid paying for another service (need a Google developer account to use sheets API). But, worth it depending on traction for the CSV feature. Will likely give it a whirl on the Google free trial.

The API fee should be pretty minimal I would imagine (maybe free?). Let me know when you get it up. I’m trying to train some new developers and would like to show them how this worked out.

This topic was automatically closed after 70 days. New replies are no longer allowed.