Guides

eng
Document Generation

Генеруємо тисячі Google Docs з шаблона
BK
Bohdan Khrapak
|
Oleksandr Briagin
|

filled-star

Pack features:

Document editing. Documents are generated in Google Doc format.
Organized storage. You can specify the location path for storing generated documents on Google Drive.
Quick access to the document: A link to the generated document gets into the system on Coda
Logical naming: You can set the logic for naming the generated documents
Regeneration: With one click of a button, you can regenerate the document (delete the old file and create a new one). This prevents the accumulation of unnecessary documents.

1. Install the Document Generation pack

2. Prepare a template

Create or upload a template to Google Drive in Google Doc format
Define variables in the template and mark them in the format <<Variables>>
It is better to write the variable text in Latin and without spaces (you can use CamelCase).
You should name variables so that you understand what data is hiding behind it.
You can use one variable several times in the template.
Data formats that can be replaced: text (including numbered and unnumbered lists), numbers, dates.
You can use our .

error
If you upload Word to Google Drive, you need to reformat it. Press File → Save as Google Docs
image.png
Знімок екрана 2023-11-30 о 09.37.08.png

3. Create a database in Coda

You should create a table or several (depending on the amount and structure of data) from which you will take data and configure document generation.
You can use our databases by copying this document to yourself and adapting it to your needs.
Copy doc

4. Configure the Generation button

Create a button that will initiate generation, as well as a separate column where you want to store a link to the generated document.

⚙️ Settings

Account
Go through verification and give the pack access to Google Drive where your files and templates will be stored.
Mode
There are two approaches to determining the owner of the generated document.
Private - each system user will generate files on their own behalf (their own account).
Shared — all users will generate documents on behalf of the Account you tied in the previous step.
Template
Specify the link to the template you want to use to generate documents.
Results Column
Specify the column where the generated files will be stored
Click Add more, and add more parameters:
Parent folder
Link to the parent folder in Google Drive where your new documents will lie.
Folder path
This is the logic of ordering your documents on Google Drive.
You can use the Join or Concatenate formula. “/” indicates to the pack to go down a level deeper and create a subfolder.
Join("/", "First level folder","Second level folder", "Third level folder")
File name
The name of your generated documents.
Doc to delete
Specify the column where you store the link to the generated document.
If you press the Generate button again, the previous document will be deleted and a new one will be created, which prevents the accumulation of documents in the folder.

Bind your template variables to Coda data.

Click Additional options – Add more, and add new variables using Add.
Key (Variable in template) — Value (Data in Coda)
Letter case is important: <<Name>> and <<name>> are different variables.
Знімок екрана 2023-11-30 о 09.05.18.png
Знімок екрана 2023-11-30 о 09.23.19.png
cafe

Enjoy the result :)

If you have any technical difficulties or questions, you can write to
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.