Looking to generate a new doc and have a template inserted into the new doc from a button. I know i can hit the API endpoints for docs, see folder IDs, etc but this seems like there isn’t a good way to do this. Would like to have a button ( I will add formula to grab a client name in a table to use as the doc title) generate a new doc and would like to have the template already in there.
I need this to create separate docs as a mini hub for clients (so they cannot see other docs) and reuse the template. Currently I can create a new doc, then drag the template in or use the “/” command to use the template, then have to delete the “Untitled” page. I can also create a new doc in the interface and select the folder, then the template but have no way to do this from a button. I can make it into a pack if I can get ahold of an API endpoint for the template.
Also wondering if I just need to put my template in a separate folder to just copy from there, since I can see the doc list but not any templates in the API or in any formula.
Hey @Kyle_Sturman ! Thanks so much for taking the time to reach out here in Community. Here’s a great Community post on this same topic: Create Doc Button
Can you please check out that post and let us know if that solves for your use case?
So I created a work around. The problem I was having is with not being able to access the templates programatically. So I ended up making a folder for them, then just copied that doc from in the folder to a new folder, with the new doc. Used the Coda Doc List pack and the copyDoc() formula from that pack (gives more options) inside a button for each new client. Put the button in a table then set some constraints so you can only click the button if the client’s name isn’t blank and if the new doc link column isn’t empty.
Awesome, @Kyle_Sturman ! That sounds like a great workaround . Thanks so much for sharing with the rest of the Community.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.