eng
Document Generation

Thousands of documents. One click.
BK
Bohdan Khrapak
|
Oleksandr Briagin
|
Welcome! This guide will walk you through setting up the Document Generation Pack for Coda. In just a few steps, you'll be able to automatically create customized Google Docs directly from your Coda tables.
filled-star

Pack features:

Dynamic Content Population: Automatically populate Google Docs templates with data from your Coda rows. Text, numbers, dates, and even lists are fully supported.
Organized Storage: Define exactly where your documents should be saved in Google Drive, creating dynamic folder paths (e.g., /Clients/[Client Name]/[Year]/).
Instant Access: A link to the newly created document is immediately saved back into your Coda table for easy access and reference.
Logical Naming: Set custom naming conventions for your generated files using data from your Coda doc.
Effortless Regeneration: A single button click can delete a previously generated document and create an updated version, keeping your Drive clean and preventing duplicate files.

1. Install the Document Generation pack

First things first, add the Pack to your Coda workspace.

2. Prepare a template

This is the master document that the Pack will copy and populate.
Create a Template: Create a new Google Doc or upload an existing document to your Google Drive.
Define Placeholders: Identify all the places in your template where you want to insert data from Coda. Mark these spots using double curly brackets, like <<Placeholder>>.
💡 Tips for Placeholders:
Be Descriptive: Use clear names that you'll easily recognize, like <<ClientName>> or <<InvoiceDate>>.
Keep it Simple: It's best to use Latin characters without spaces (CamelCase or snake_case works well).
Reuse Placeholders: You can use the same placeholder multiple times in your template (e.g., <<ClientName>> can appear in the header and the body), and the Pack will replace all instances.

error
Important Note for Word Documents If you upload a Microsoft Word file to Google Drive, you must save it in the native Google Docs format. To do this, open the uploaded file and click File → Save as Google Docs.
image.png
ingredients-list
You can use our .
Знімок екрана 2023-11-30 о 09.37.08.png

3. Create a database in Coda

Your Coda table is the source of truth for all the data that will populate your documents.
Create a table with columns that correspond to the placeholders in your template (e.g., a "Client Name" column for the <<ClientName>> placeholder).
Add a new column for a Button (this will trigger the generation) and another Text column to store the link to the generated document.
rocket
Quick Start: You can copy our pre-built sample document to get a feel for a perfect setup. You can then adapt this structure to fit your specific needs.

Copy doc

4. Configure the Generation button

This is where you connect Coda, your template, and your data.
In your Coda table, on your button column click option menu and select Edit column.
Search for and select the Document Generation pack, then choose the CreateDocument action.
The settings panel will appear. Configure the following options:

⚙️ Basic Settings

Account: Authenticate with the Google Account where your templates and documents are stored.
Mode:
Private: Each user generates documents using their own connected Google Account.
Shared: All users generate documents on behalf of the single Google Account you connect here.
Template: Provide the link to the Google Docs template you prepared in Step 2. You can do this by pointing to a column that contains the link.
Results Column: Specify the column where the link to the newly created document should be saved.

⚙️ Advanced Parameters (Click "Add more" to see these)

Parent Folder: (Optional) Set a main root folder in Google Drive where all generated documents will be stored. Provide the folder link or ID.
Folder Path: (Optional) Define a dynamic subfolder structure. Use a Coda formula like Join() or Concatenate() to build a path. The / character tells the pack to create a new subfolder level.
Example Formula: Join("/", thisRow.Client, Year(thisRow.Date)) might create a path like ACME Corp/2025/.
File Name: (Optional) Set a dynamic name for your document. If left blank, it will use the template's name.
Example Formula: Concatenate(thisRow.[Invoice Number], " - ", thisRow.Client)
Doc to Delete: (Optional but Recommended) Point this to your Results Column. This enables the regeneration feature, ensuring that clicking the button again deletes the old file before creating a new one.

⚙️ Bind Template Placeholders to Coda Data

This is the final and most important step: telling the Pack which Coda data goes into which placeholder.
Click Additional options → Add more.
For each placeholder, add a new mapping:
Key: The text of your placeholder without the brackets (e.g., ClientName).
Value: The Coda data you want to insert. This is usually a reference to a column in your table (e.g., thisRow.[Client Name]).
⚠️ Case Sensitivity Matters! The Key you enter must exactly match the text inside your <<Placeholder>>. <<Name>> and <<name>> are treated as two different placeholders.
Знімок екрана 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.