Has anyone figured out a means to allow a user to export rows from a table to a CSV or XLS file using Zapier or Appflow or Webhooks in general? I was hopeful when Honeycode introduced the integrations but after studying what's available, the path forward is not clear to me. Any help is appreciated.
Hi @DaleJWardJr, today we do not have a direct way of exporting to a CSV or XLS file with Zapier or Appflow, but one possibility would be to leverage Zapier to automatically write to an online spreadsheet and then export from there when needed. An extra step perhaps, but might work..
Thank you @aj! Unfortunately, that won't help much. I desperately need to allow users to apply filters and then export table contents into a spreadsheet. It has become a compliance issue. If possible, I would allow certain users access to the tables to cut-in-paste but the current access levels don't facilitate this without granting those users the ability to edit the structure and content of those tables. That's too big of a risk. Beyond that, I assume it's possible to host and expose a webservice which in-turn consumes the QueryTableRows Service and converts the resulting JSON to CSV. Has anyone built this or have a similar example? If I did build such a service, would I be able to expose it as a link/button on a honeycode page?
Hi @DaleJWardJr, thanks for the additional details about the need. Yes, your idea of exposing a web service which would consume the QueryTableRows and convert the JSON results to CSV is possible. To break that process down:
- Have a Honeycode screen where user can configure filter criteria
- Have a button on that screen. This button will generate a unique ID and send that ID and filter criteria to lambda via a webhook block. It then writes a new row to a "download requests" table with blank for [URL], Sys_user for [user], and the unique ID for [Id].
- Have another screen that shows "pending download requests" personalized list from the "download requests" table that shows "Working on it..." when [URL] is blank.
- Have the Lambda create CSV using querytablerows and the filter it received, and write it to a S3. When done, it writes the URL to the "download requests" table that it looks up using the unique ID.
Hope this generates some ideas for you.
Hi @aj, Thanks so much! This is exactly the sort of design pattern for which I was looking! A few questions: In step 4, is it possible in a webhooks integration context to have the lambda code print the results on the response directly to the user clicking the button in Honeycode? I'm guessing there are just too many layers here to do this? Otherwise, I assume the download requests table is storing the URL to the CSV file we just wrote to S3? If I'm displaying that table to the user, will the S3 URL be resolvable (i.e. clickable) from within the Honeycode UI? Thanks Again!
Hi @DaleJWardJr, now this is getting interesting.
In step 4, is it possible in a webhooks integration context to have the lambda code print the results on the response directly to the user clicking the button in Honeycode? I’m guessing there are just too many layers here to do this?
Yes, this is possible, but would be more involved as you had suggested. In order to “print the results” back to the user you would ultimately need to write the filtered results back to a different table using StartTableDataImport along with the unique ID generated by step 2 for each row that is imported.
Otherwise, I assume the download requests table is storing the URL to the CSV file we just wrote to S3? If I’m displaying that table to the user, will the S3 URL be resolvable (i.e. clickable) from within the Honeycode UI?
Yes, the S3 URL would be resolvable and clickable from within the Honeycode UI. However, you’ll want to be mindful of the permissions set forth on the S3 bucket/file, so that only the user/groups of users would be able to access the file(s).