Taking thunkable app user input to Microsoft word template

Hello @domhnallohanlon

I saw this video on how to export text box data from a thunkable app to a PDF file which was really useful https://www.youtube.com/watch?v=4m8wBaL_6no

However I want to know if there is a way to do a similar process but to a Microsoft word document (or equivalent) with the text boxes in a cycle arrangement with arrows between them and reflected in the same format in the word document, rather than a simple table format.

I saw another post on another forum explaining it in this way which is essentially the same but may explain better:
I am currently working on an application that takes user inputs on the app to fill in a Microsoft Word template document. The template stays the same every time, but the information changes based on user input in the app.

Really appreciate your support.

Thanks,
James

What about using a Google Sheet and syncing the data from Thunkable to that, and then formatting the Google Sheet as needed?

2 Likes

Thanks @taitiang that is something I was wondering about but I really need a visual arrangement like the screenshot attached and I’m not sure that will be possible on google sheets. I’m not that familiar with it though but understood it would offer similar to an excel sheet. Is it more visually flexible? If so ill look into that option. Otherwise, any other suggestions? I have the model in the screenshot on the app which the user inputs their information into each box and then I’d like to have the capability to download it with their input to an editable word document

1 Like

That makes sense but I’m not sure you’ll be able to do that with Thunkable. The JSON to PDF extension in the video was for the Classic version of Thunkable, not the current version of Thunkable X.

I did find this: https://www.edocgen.com/examples/json-to-pdf.

So it might be possible to upload JSON data and have it create a Word document from a Word template.

2 Likes

The image you presented lends itself to spreadsheet but to do it in word document you can create a word template connected to spreadsheet or CSV file with the spreadsheet being populated from Thunkable.

I did something similar but using a different development platform. However the idea is the same. I write to the Excel sheet and the word template extracts data from the spreadsheet.

1 Like

See this

this looks incredible but really need a free option

@muneer this is sounding like the best solution. I found this website which I wonder could offer a solution; autofill a document template from a google sheet using google scripts. Any opinions on this in relation to thunkable? i.e. sending the data from the thunkable app to the google sheet and then to the google doc using google scripts?

\ 160x160 Autofill a DOCUMENT template from a Google sheet and email as a PDF using Google Scripts — dannyblaker.com

How to Autofill a template - Google sheets style! Danny Baker. Danny has a wealth of experience in the start-up and technology sectors spanning over 10 years, and is the founder and co-founder of numerous companies and initiatives, such as Unudge, & Geartooth.

2 Likes

I think this example is more relevant to what you are trying to accomplish and Thunkable can call API of Google Docs which would make the whole solution doable.

Mail Merge Example

:grin:

1 Like

Hi all,

Thanks for your responses so far. I have been able to get google sheets to send the data to a google docs template. But now I need to send the data from the thunkable app into the google sheet.

Currently the thunkable app saves the user input into local storage. Is there anyway to take it from local storage to the google sheet? I have read there are data list/grid options, however if I can get away without having to change the textbox layout of the app it would be incredibly useful. Would changing the input to go to local DB rather than local storage offer any advantages? If at all possible I’d like to avoid using any third party website or to use ones which are free with good security.

Thank you all

I may be missing something here but this all seems like a really complicated way to do something that’s already built in to Thunkable. If you add a Google Sheet as a data source in your project, you can read/write to that Google Sheet as needed using the built-in blocks for that. And while you can use a data viewer list/grid with Google Sheets, you don’t have to. You can just get/update/delete cell values as needed.

This goes into that process: https://docs.thunkable.com/data-viewer-grid#data-source

This looks great, thanks, definitely what I was hoping to do. Only problem is I can’t work out how to add a data source without adding a data viewer/grid. Or do I just add one to enable me to upload the data source and then set it to invisible. The tutorials im exploring all seem to refer to data viewer list/grid to add a data source

1 Like

I don’t think it makes you choose a data viewer when you add a data source. I just did it but forgot that aspect. So yeah, create a Google Sheet and then scroll down below the list of components in the top part of the Design tab to find Data Sources and click the + button. Create a new data source and select your existing Google Sheet.

Then just use the Data Sources components in the Blocks tabs. I make this sound really easy and, well, it is – it took me about 5 minutes to create the screenshot above, including creating the Google Sheet and linking it as a Data Source. But the first time you do it, I think you have to authenticate your Google account and do a couple extra steps. That link should explain it all but feel free to post more questions when you have them.

1 Like

Hi @tatiang,
The twist was to work with MS Word using Thunkable so the way out is to use Thunkable to update the Google sheet which is the input to a Word template.

That’s in short.

I posted the Mail Merge Example just to show that you can even trigger Google sheet and docs from within Thunkable using the new set of Google APIs

2 Likes

@muneer66 Oh, I think it’s impressive. I was more responding to a need to use Google APIs to update or retrieve data from Google Sheets. If that’s the only purpose, the built-in blocks seem easiest.

1 Like