I have nothing useful to add other than this would be really useful - it came up on my list of maybe-todo things, but haven't got to looking at it just yet.
I think Soren was meaning a web api controller that you can call from outside of Forms. Maybe pass in the form Id as a parameter, then lookup the records in the dB using record service.
I’ve created plenty of workflows, but these will fire on every submission, so you would potentially only get the one row per spreadsheet?
I could create a page in Umbraco which is hidden from nav etc, then as you say, add a form id as a parameter so that if required, I can create another page for another form.
I'll put my thinking cap on and see if I can do something with this.
I’m typing this on my phone but I think you want to create your controller and inherit from UmbracoApiController which would make it a Web Api method, you don’t then need to make ‘any’ real pages in Umbraco
Then wire up a scheduled task to run once a day, and you're in business
Would need some way to configure which data goes to which email address too - that could be a config node, a .config file, a custom dashboard etc. Heaps of options.
Cheers! I planned to start playing about with this last night but then got distracted and started working on another project!! Too many things on the go just now.
Export Form submissions to Excel via API?
Hi! Has anyone found a way to export Umbraco Forms data in Excel format via an API call?
What I'd like to do is once a day, run a task on the server which calls an endpoint and exports the data and saves it to a specific location.
Any thoughts?
I have nothing useful to add other than this would be really useful - it came up on my list of maybe-todo things, but haven't got to looking at it just yet.
Difficult when Forms is a black box...
A response on Twitter from Soren is:
I'm guessing this means, create a controller which a can be called. Maybe treat it as a workflow? https://our.umbraco.com/documentation/Add-ons/umbracoforms/developer/extending/adding-a-workflowtype
The api controller would be called once a day which would then create the excel spreadsheet.
Lots of unknown for me on this one.
I think Soren was meaning a web api controller that you can call from outside of Forms. Maybe pass in the form Id as a parameter, then lookup the records in the dB using record service.
I’ve created plenty of workflows, but these will fire on every submission, so you would potentially only get the one row per spreadsheet?
That makes a bit more sense to me. Thanks Ian.
I could create a page in Umbraco which is hidden from nav etc, then as you say, add a form id as a parameter so that if required, I can create another page for another form.
I'll put my thinking cap on and see if I can do something with this.
I’m typing this on my phone but I think you want to create your controller and inherit from UmbracoApiController which would make it a Web Api method, you don’t then need to make ‘any’ real pages in Umbraco
https://our.umbraco.com/documentation /Reference/Routing/WebApi/
All locally declared Umbraco api controllers will be routed under the url path of:
~/Umbraco/Api/[YourControllerName]/[MethodName]/[parameter]
E.g ~/Umbraco/Api/Forms/ExportRecords/[yourFormId]
Then wire up a scheduled task to run once a day, and you're in business
Would need some way to configure which data goes to which email address too - that could be a config node, a .config file, a custom dashboard etc. Heaps of options.
Cheers! I planned to start playing about with this last night but then got distracted and started working on another project!! Too many things on the go just now.
Hope to get on to it maybe later this week.
I like that - sounds like something I should learn anyway, whether Im using it on my current project. Thanks Ian.
is working on a reply...