<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator> <link href="https://www.docugenerate.com/feed.xml" rel="self" type="application/atom+xml"/> <link href="https://www.docugenerate.com/blog/" rel="alternate" type="text/html" hreflang="en"/> <updated>2026-11-13T13:50:50+00:00</updated> <id>https://www.docugenerate.com/feed.xml</id> <title type="html">DocuGenerate</title> <subtitle>Generate PDF documents from Word templates and JSON data. DocuGenerate helps you generate PDF documents like invoices, letters, contracts, agreements, certificates and more with our API and web app. Start Generating for Free. </subtitle> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <entry> <title type="html">3 Layouts for Creating Dynamic Avery Shipping Labels</title> <link href="https://www.docugenerate.com/blog/3-layouts-for-creating-dynamic-avery-shipping-labels/" rel="alternate" type="text/html" title="3 Layouts for Creating Dynamic Avery Shipping Labels"/> <published>2026-10-31T00:00:00+00:00</published> <updated>2026-10-31T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/3-layouts-for-creating-dynamic-avery-shipping-labels</id> <content type="html" xml:base="https://www.docugenerate.com/blog/3-layouts-for-creating-dynamic-avery-shipping-labels/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Address labels, shipping labels, and name badges are some of the most common documents printed in an office. The <a href="https://www.avery.com/" target="_blank" rel="nofollow noopener">Avery</a> label sheets are a popular choice, and for a long time Microsoft Word offered a step-by-step wizard to fill them. That wizard <a href="https://support.microsoft.com/en-us/office/avery-wizard-is-retired-4c1c1aba-fefe-4e66-ad14-5f3b910a85dc" target="_blank" rel="nofollow noopener">has been retired</a>, and the remaining options in Word still mean typing the addresses into the document or linking a data source every time you print a new batch.</p> <p>With <a href="https://www.docugenerate.com/">DocuGenerate</a>, the label sheet becomes a reusable Word template, and the addresses become data. You design the sheet once, upload it, and generate a print-ready PDF whenever you need a new batch of labels. In this article, we’ll compare three layouts for such a template:</p> <ol> <li>A <a href="#grid-template">fixed grid</a> where every label on the sheet has its own numbered merge tags.</li> <li>A <a href="#rows-template">table row with two labels</a>, repeated for each pair of addresses.</li> <li>A <a href="#list-template">single label repeated over a list</a>, flowing into a two-column page.</li> </ol> <p>For all three layouts, we’ll generate the labels from the web app by filling out a form, so you won’t need a spreadsheet or any code. Each template also comes with a JSON dataset that you can use instead of the form.</p> <h2 id="avery-5163">The Avery 5163 Label Sheet</h2> <p>All three templates target the <a href="https://www.avery.com/templates/5163" target="_blank" rel="nofollow noopener">Avery 5163</a> shipping labels, a US Letter sheet with 10 labels of 4” × 2” arranged in 2 columns and 5 rows. The printed content has to land inside the label boundaries, so the page margins and the gap between the two columns follow the measurements from the sheet’s template.</p> <p>Each label is designed as a shipping label. A blue band on the left holds a parcel icon and a “Priority” caption, and a light blue panel shows the address under a “Ship to” heading, next to a vertical barcode with the package’s tracking number. Each label uses four merge tags: the recipient’s <code class="language-plaintext highlighter-rouge">Name</code> in bold, the <code class="language-plaintext highlighter-rouge">Street</code> address, a <code class="language-plaintext highlighter-rouge">City</code> line that holds the city, state, and ZIP code, and the <code class="language-plaintext highlighter-rouge">Tracking</code> number.</p> <p>The design is drawn slightly inside the edges of each label, with a thin blue border around it. Printers rarely feed a sheet with perfect accuracy, and this small inset keeps the colored areas on the label even if the print shifts slightly. If you use a different Avery product, the same techniques apply with the measurements of your sheet.</p> <h3 id="barcode">Adding a Barcode</h3> <p>Most shipping labels carry a scannable code, so each label shows the tracking number as a <a href="https://www.docugenerate.com/help/articles/how-to-add-qr-codes-and-barcodes/#adding-barcodes">barcode</a>, generated with the <code class="language-plaintext highlighter-rouge">barcode</code> filter:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[%Tracking | barcode:'auto':140 | set:'rotate':'R']
</code></pre></div></div> <p>The barcode is fixed at 140 pixels in height, with the width adjusted automatically, and the <code class="language-plaintext highlighter-rouge">rotate</code> option turns it 90 degrees clockwise so it runs along the right edge of the label. A barcode also prints its value in human-readable text by default.</p> <p>The <code class="language-plaintext highlighter-rouge">barcode</code> filter is part of the <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/">enhanced syntax</a>, so you need to <a href="https://www.docugenerate.com/help/articles/how-do-i-enable-the-enhanced-syntax/">enable it</a> for the template. Open the template, go to <strong>Settings</strong>, check the <strong>Enable enhanced syntax</strong> checkbox, and click <strong>Save</strong>. The enhanced syntax doesn’t allow spaces in merge tags, which is why all the tag names in these templates are single words.</p> <h2 id="grid-template">Layout 1: A Grid with Numbered Merge Tags</h2> <p>The first layout is the most direct translation of a label sheet into a template. The page contains a single table with 5 rows and 3 columns: two columns for the labels and a narrow column in the middle that acts as the gap. Every row has an exact height of 2”, so each cell sits on top of one physical label. The outer table has no borders, and each label cell contains a smaller three-column table for the band, the address panel, and the barcode.</p> <p>Since every label is its own cell, each one needs its own set of <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a>. The tags are numbered from 1 to 10, from left to right and from top to bottom: <code class="language-plaintext highlighter-rouge">[Name1]</code>, <code class="language-plaintext highlighter-rouge">[Street1]</code>, <code class="language-plaintext highlighter-rouge">[City1]</code>, and the <code class="language-plaintext highlighter-rouge">Tracking1</code> barcode for the first label, <code class="language-plaintext highlighter-rouge">[Name2]</code>, <code class="language-plaintext highlighter-rouge">[Street2]</code>, <code class="language-plaintext highlighter-rouge">[City2]</code>, and the <code class="language-plaintext highlighter-rouge">Tracking2</code> barcode for the second label in the right column, and so on until the <code class="language-plaintext highlighter-rouge">Tracking10</code> barcode in the bottom right corner. You can download the <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels Grid.docx">Shipping Labels Grid.docx</a> file and upload it to your account.</p> <h3 id="grid-form">Filling Out the Form</h3> <p>To generate the labels, open the template and click the <strong>New Document</strong> button. For the <strong>Data source</strong>, select <a href="https://www.docugenerate.com/help/articles/generate-documents-by-filling-out-a-form/">Fill out a form</a> and click <strong>Continue</strong>. The form displays an input field for each merge tag in the template. With the grid template, this means 40 input fields, grouped label by label in the same order as in the document.</p> <p><img src="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/grid-form-items.png" alt="Form with input fields for each label in the grid template"/></p> <p>None of the fields are required, but keep in mind that a label without an address still prints its blue band and headings, so it’s best to fill out all 10 labels. Once you’re done, click <strong>Continue</strong>, select <strong>PDF</strong> as the <a href="https://www.docugenerate.com/help/articles/select-the-merge-export-format/">export format</a> in the merge options, and generate the document.</p> <h3 id="grid-json">Using JSON Data</h3> <p>If you’d rather not type all the values, you can use the <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels Grid.json" target="_blank">Shipping Labels Grid.json</a> dataset instead. Click <strong>New Document</strong>, select <a href="https://www.docugenerate.com/help/articles/generate-documents-from-json-data/">JSON data</a> as the <strong>Data source</strong>, and paste the content of the file. The dataset is an array with a single item, because all the labels of the sheet belong to the same document.</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
  </span><span class="p">{</span><span class="w">
    </span><span class="nl">"Name1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Emily Carter"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"118 West Street"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Annapolis, MD 21401"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0001"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Daniel Brooks"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"42 Harbor View Road"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Portland, ME 04101"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0002"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Sofia Martinez"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"905 Sunset Boulevard"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Austin, TX 78704"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0003"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name4"</span><span class="p">:</span><span class="w"> </span><span class="s2">"James Whitfield"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street4"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2210 Maple Avenue"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City4"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Evanston, IL 60201"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking4"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0004"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name5"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Priya Nair"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street5"</span><span class="p">:</span><span class="w"> </span><span class="s2">"77 Cedar Lane"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City5"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Raleigh, NC 27601"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking5"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0005"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name6"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Michael O'Connor"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street6"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1450 Pine Street"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City6"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Seattle, WA 98101"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking6"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0006"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name7"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hannah Lee"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street7"</span><span class="p">:</span><span class="w"> </span><span class="s2">"36 Orchard Drive"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City7"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Boulder, CO 80302"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking7"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0007"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name8"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Robert Nguyen"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street8"</span><span class="p">:</span><span class="w"> </span><span class="s2">"580 Lakeshore Drive"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City8"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Madison, WI 53703"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking8"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0008"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name9"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Grace Thompson"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street9"</span><span class="p">:</span><span class="w"> </span><span class="s2">"19 Willow Court"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City9"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Savannah, GA 31401"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking9"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0009"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Name10"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Lucas Bennett"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street10"</span><span class="p">:</span><span class="w"> </span><span class="s2">"301 Market Street"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City10"</span><span class="p">:</span><span class="w"> </span><span class="s2">"San Francisco, CA 94105"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tracking10"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0010"</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div> <p>After clicking <strong>Continue with one item</strong>, the rest of the process is the same as with the form. Every item you add to the array produces one more document, so with the grid template, two items give you two sheets of labels, which you can <a href="https://www.docugenerate.com/help/articles/combine-the-generated-documents-into-a-single-file/">combine into a single file</a> for printing.</p> <h3 id="grid-result">The Generated Labels</h3> <p>The generated <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels Grid.pdf" target="_blank">Shipping Labels Grid.pdf</a> contains the 10 addresses, each one positioned inside its label:</p> <object data="/assets/posts/038-avery-shipping-labels/Shipping Labels Grid.pdf" type="application/pdf" class="inline-pdf-blog"></object> <p>The grid is simple to build, since what you see in Word is exactly what gets printed. Its main limitation is that one document always produces a single sheet of 10 labels, and every additional sheet needs another set of 40 values.</p> <h2 id="rows-template">Layout 2: Two Labels per Table Row</h2> <p>The second layout keeps the table from the <a href="#grid-template">grid</a>, but only its first row. The row still has two label cells separated by the gap column, and the merge tags use a <code class="language-plaintext highlighter-rouge">_1</code> suffix for the left label and a <code class="language-plaintext highlighter-rouge">_2</code> suffix for the right one: <code class="language-plaintext highlighter-rouge">[Name_1]</code>, <code class="language-plaintext highlighter-rouge">[Street_1]</code>, <code class="language-plaintext highlighter-rouge">[City_1]</code>, and the <code class="language-plaintext highlighter-rouge">Tracking_1</code> barcode, then <code class="language-plaintext highlighter-rouge">[Name_2]</code>, <code class="language-plaintext highlighter-rouge">[Street_2]</code>, <code class="language-plaintext highlighter-rouge">[City_2]</code>, and the <code class="language-plaintext highlighter-rouge">Tracking_2</code> barcode. Instead of numbering every label on the sheet, the template repeats this row for each item of a list named <code class="language-plaintext highlighter-rouge">Rows</code>, and each item holds the addresses for one pair of labels.</p> <p>The loop uses DocuGenerate’s syntax for <a href="https://www.docugenerate.com/help/articles/how-to-add-tables-to-a-template/">repeating table rows</a>, which requires the opening tag and the closing tag to be in different cells of the same row. The position of the tags inside the cells doesn’t matter for a row loop, so placing them under the labels, instead of before the left one, keeps both labels at the same height in their cells. You can download the <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels Rows.docx">Shipping Labels Rows.docx</a> file and upload it to your account.</p> <h3 id="rows-form">Adding Rows to the Form</h3> <p>Generating the labels starts the same way as for the <a href="#grid-form">grid template</a>: click <strong>New Document</strong>, choose <strong>Fill out a form</strong>, and click <strong>Continue</strong>. This time, the form shows the <code class="language-plaintext highlighter-rouge">Rows</code> property with a <strong>+</strong> button next to it. Each click on <strong>+</strong> adds a new item with 8 input fields, 4 for the left label and 4 for the right label. To remove an item, click the <strong>Delete</strong> icon next to it.</p> <p><img src="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/rows-form-items.png" alt="Adding rows of labels to the form for the rows template"/></p> <p>For this example, we’ve added 6 rows with 12 addresses. Click <strong>Continue</strong>, select <strong>PDF</strong> as the export format, and generate the document.</p> <h3 id="rows-json">Using JSON Data</h3> <p>You can also paste the <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels Rows.json" target="_blank">Shipping Labels Rows.json</a> dataset as <strong>JSON data</strong>. Its single item contains a <code class="language-plaintext highlighter-rouge">Rows</code> array with one object for the two labels of each row:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
  </span><span class="p">{</span><span class="w">
    </span><span class="nl">"Rows"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Emily Carter"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"118 West Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Annapolis, MD 21401"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0001"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Name_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Daniel Brooks"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"42 Harbor View Road"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Portland, ME 04101"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0002"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Sofia Martinez"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"905 Sunset Boulevard"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Austin, TX 78704"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0003"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Name_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"James Whitfield"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2210 Maple Avenue"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Evanston, IL 60201"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0004"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Priya Nair"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"77 Cedar Lane"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Raleigh, NC 27601"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0005"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Name_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Michael O'Connor"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1450 Pine Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Seattle, WA 98101"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0006"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hannah Lee"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"36 Orchard Drive"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Boulder, CO 80302"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0007"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Name_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Robert Nguyen"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"580 Lakeshore Drive"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Madison, WI 53703"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0008"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Grace Thompson"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"19 Willow Court"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Savannah, GA 31401"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0009"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Name_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Lucas Bennett"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"301 Market Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"San Francisco, CA 94105"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0010"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Olivia Park"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"64 Riverside Avenue"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hartford, CT 06103"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_1"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0011"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Name_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Ethan Russo"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"812 Elm Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Columbus, OH 43215"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking_2"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0012"</span><span class="w">
      </span><span class="p">}</span><span class="w">
    </span><span class="p">]</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div> <p>After clicking <strong>Continue with one item</strong>, the rest of the process is the same as with the form.</p> <h3 id="rows-result">The Generated Labels</h3> <p>The generated <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels Rows.pdf" target="_blank">Shipping Labels Rows.pdf</a> contains the first 5 rows on its first page, with the labels filled row by row, so it looks exactly like the <a href="#grid-result">grid result</a>. The sixth row continues at the top of the second page.</p> <object data="/assets/posts/038-avery-shipping-labels/Shipping Labels Rows.pdf" type="application/pdf" class="inline-pdf-blog"></object> <p>Unlike the grid, the template only describes two labels, and the number of labels is decided by the data. The trade-off is in the data itself, which has to be grouped in pairs. If the number of addresses is odd, the last row has an empty right label that still prints its blue band and headings.</p> <h2 id="list-template">Layout 3: A Single Label in Two Columns</h2> <p>The third layout goes one step further. The template describes a single label, and DocuGenerate repeats it for each item in a list. The template only has four merge tags, <code class="language-plaintext highlighter-rouge">Name</code>, <code class="language-plaintext highlighter-rouge">Street</code>, <code class="language-plaintext highlighter-rouge">City</code>, and <code class="language-plaintext highlighter-rouge">Tracking</code>, inside a loop named <code class="language-plaintext highlighter-rouge">Labels</code>, using the <a href="https://www.docugenerate.com/help/articles/how-to-add-lists-to-a-template/">list syntax</a> with an opening <code class="language-plaintext highlighter-rouge">[#Labels]</code> tag and a closing <code class="language-plaintext highlighter-rouge">[/Labels]</code> tag.</p> <p>To place the labels side by side, the page is split into two columns using Word’s <a href="https://support.microsoft.com/en-us/office/create-newsletter-columns-3a00e688-253d-456e-9481-661fdd5b724b" target="_blank" rel="nofollow noopener">Columns</a> feature. Each column is as wide as a label, and the spacing between them matches the gap on the sheet. The labels fill the left column first, then continue at the top of the right column, and move on to a new page once both columns are full.</p> <p>The template takes care of the layout details, so a label is never split between two columns and the right column starts at exactly the same height as the left one. The <code class="language-plaintext highlighter-rouge">[#Labels]</code> and <code class="language-plaintext highlighter-rouge">[/Labels]</code> tags sit in their own paragraphs before and after the table, so the whole label is repeated. You can download the <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels List.docx">Shipping Labels List.docx</a> file and upload it to your account.</p> <h3 id="list-form">Adding Items to the Form</h3> <p>In the form, the <code class="language-plaintext highlighter-rouge">Labels</code> property has a <strong>+</strong> button next to it, like the <code class="language-plaintext highlighter-rouge">Rows</code> property in the <a href="#rows-form">previous layout</a>. Each click on <strong>+</strong> adds a new item with its own <code class="language-plaintext highlighter-rouge">Name</code>, <code class="language-plaintext highlighter-rouge">Street</code>, <code class="language-plaintext highlighter-rouge">City</code>, and <code class="language-plaintext highlighter-rouge">Tracking</code> input fields.</p> <p><img src="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/list-form-items.png" alt="Adding label items to the form for the list template"/></p> <p>For this example, we’ve added 13 addresses, which is more than a single sheet can hold. Once all the items are entered, click <strong>Continue</strong>, select <strong>PDF</strong> as the export format, and generate the document.</p> <h3 id="list-json">Using JSON Data</h3> <p>You can also paste the <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels List.json" target="_blank">Shipping Labels List.json</a> dataset as <strong>JSON data</strong>. Its single item contains a <code class="language-plaintext highlighter-rouge">Labels</code> array with one object per label:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
  </span><span class="p">{</span><span class="w">
    </span><span class="nl">"Labels"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Emily Carter"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"118 West Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Annapolis, MD 21401"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0001"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Daniel Brooks"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"42 Harbor View Road"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Portland, ME 04101"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0002"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Sofia Martinez"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"905 Sunset Boulevard"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Austin, TX 78704"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0003"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"James Whitfield"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2210 Maple Avenue"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Evanston, IL 60201"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0004"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Priya Nair"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"77 Cedar Lane"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Raleigh, NC 27601"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0005"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Michael O'Connor"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1450 Pine Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Seattle, WA 98101"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0006"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hannah Lee"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"36 Orchard Drive"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Boulder, CO 80302"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0007"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Robert Nguyen"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"580 Lakeshore Drive"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Madison, WI 53703"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0008"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Grace Thompson"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"19 Willow Court"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Savannah, GA 31401"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0009"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Lucas Bennett"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"301 Market Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"San Francisco, CA 94105"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0010"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Olivia Park"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"64 Riverside Avenue"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hartford, CT 06103"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0011"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Ethan Russo"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"812 Elm Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Columbus, OH 43215"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0012"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Ava Sullivan"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Street"</span><span class="p">:</span><span class="w"> </span><span class="s2">"27 Beacon Street"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Boston, MA 02108"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Tracking"</span><span class="p">:</span><span class="w"> </span><span class="s2">"DG-1026-0013"</span><span class="w">
      </span><span class="p">}</span><span class="w">
    </span><span class="p">]</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div> <p>After clicking <strong>Continue with one item</strong>, the rest of the process is the same as with the form.</p> <h3 id="list-result">The Generated Labels</h3> <p>The first page of the generated <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels List.pdf" target="_blank">Shipping Labels List.pdf</a> contains the first 10 labels, 5 in each column, with both columns aligned at the top of the sheet. The remaining 3 labels flow to the top of the left column on the second page. You can see both pages in the document below:</p> <object data="/assets/posts/038-avery-shipping-labels/Shipping Labels List.pdf" type="application/pdf" class="inline-pdf-blog"></object> <p>Notice that the labels are filled column by column, and not row by row as in the other two layouts, so Emily Carter and Daniel Brooks, the first two addresses, are both in the left column. For most mailing jobs the order doesn’t matter, but keep it in mind if your labels must follow a specific sequence.</p> <h2 id="choosing-layout">Choosing a Layout</h2> <p>All three templates print the same labels, and the right choice depends on how many labels you print and how your data is organized:</p> <table class="table table-bordered"> <thead> <tr> <th>Feature</th> <th>Layout 1: Grid</th> <th>Layout 2: Rows</th> <th>Layout 3: List</th> </tr> </thead> <tbody> <tr> <td>Merge tags in the template</td> <td>40 numbered tags</td> <td>8 tags inside a <code class="language-plaintext highlighter-rouge">Rows</code> loop</td> <td>4 tags inside a <code class="language-plaintext highlighter-rouge">Labels</code> loop</td> </tr> <tr> <td>Labels per document</td> <td>Fixed, exactly one sheet</td> <td>Any number, in pairs</td> <td>Any number</td> </tr> <tr> <td>Data structure</td> <td>One field per label</td> <td>A list of address pairs</td> <td>A list of addresses</td> </tr> <tr> <td>Fill order</td> <td>Row by row</td> <td>Row by row</td> <td>Column by column</td> </tr> <tr> <td>Template complexity</td> <td>Simple table</td> <td>Table with a row loop</td> <td>Columns and a list loop</td> </tr> </tbody> </table> <p>The grid fits a single sheet of labels, with every position visible in the template. The rows layout handles any number of labels in reading order. The list layout is the most flexible when the addresses come from another system, because a list of addresses maps naturally to an array in the data.</p> <h2 id="conclusion">Conclusion</h2> <p>In this article, we built three Word templates for the Avery 5163 label sheet and generated print-ready PDFs from the DocuGenerate web app. The <a href="#grid-template">grid layout</a> maps every label to its own numbered merge tags, the <a href="#rows-template">rows layout</a> repeats a table row with two labels for each pair of addresses, and the <a href="#list-template">list layout</a> repeats a single label that flows into two columns. Fixed row heights keep the labels aligned with the sheet in all three cases.</p> <p>The same techniques work for any label product, from return address labels to name badges. Start from the measurements of your sheet, choose the layout that matches your data, and you’ll only have to design the labels once. The template stays in your account, so every new batch only takes a few minutes, whether you fill out the form or paste a JSON dataset. Before printing a full batch, print the first page on plain paper and hold it against a label sheet to check that everything lines up.</p> <h2 id="resources">Resources</h2> <ul> <li>The <a href="https://www.avery.com/templates/5163" target="_blank" rel="nofollow noopener">Avery 5163</a> template page with the label sheet’s specifications.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels Grid.docx">Shipping Labels Grid.docx</a> template with numbered merge tags.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels Rows.docx">Shipping Labels Rows.docx</a> template with two labels per row.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/Shipping Labels List.docx">Shipping Labels List.docx</a> template with a single repeated label.</li> <li>Help Center article on how to <a href="https://www.docugenerate.com/help/articles/how-to-add-qr-codes-and-barcodes/">add QR codes and barcodes</a> to a template.</li> <li>Help Center articles on generating documents by <a href="https://www.docugenerate.com/help/articles/generate-documents-by-filling-out-a-form/">filling out a form</a>.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Labels"/> <category term="Templates"/> <category term="Web App"/> <summary type="html"><![CDATA[Generate Avery shipping labels with DocuGenerate using a fixed grid, two labels per table row, or a single label flowing into two columns. Learn how each Word template layout fits the labels to the sheet and pick the one that suits your data.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/038-avery-shipping-labels/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Generate and Email Certificates of Participation with Pipedream</title> <link href="https://www.docugenerate.com/blog/generate-and-email-certificates-of-participation-with-pipedream/" rel="alternate" type="text/html" title="Generate and Email Certificates of Participation with Pipedream"/> <published>2026-09-28T00:00:00+00:00</published> <updated>2026-09-28T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/generate-and-email-certificates-of-participation-with-pipedream</id> <content type="html" xml:base="https://www.docugenerate.com/blog/generate-and-email-certificates-of-participation-with-pipedream/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Events, workshops, and training programs usually end the same way: every participant expects a certificate, and someone on the organizing team has to produce and send them. Filling in names by hand, exporting each certificate to PDF, and attaching it to an individual email is slow work that doesn’t scale past a handful of attendees, and a single typo in a name is enough to make a certificate unusable. In this tutorial, we’ll build an automated workflow with <a href="https://pipedream.com/" target="_blank" rel="nofollow noopener">Pipedream</a> and <a href="https://www.docugenerate.com/">DocuGenerate</a> that takes care of the whole process, from receiving the participant’s data to delivering the finished PDF to their inbox.</p> <p>The workflow has three steps. A webhook trigger receives the participant’s details as a JSON payload, the DocuGenerate <strong>Generate Document</strong> action merges that data into a Word template to produce a PDF certificate, and the Gmail <strong>Send Email</strong> action sends the certificate to the participant as an attachment. Because the entry point is a plain HTTP endpoint, the same workflow can be called from a registration platform, a form, a spreadsheet script, or your own backend. By the end of this guide, you’ll have a working workflow that you can copy into your own Pipedream account with a single click.</p> <h2 id="certificate-template">Setting Up the Certificate Template</h2> <p>Before building the workflow, we need a certificate template in DocuGenerate. For this tutorial, we’ll use the <a href="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/Certificate Of Participation.docx">Certificate Of Participation</a> Word template, a landscape certificate with an ornate gold border, a large script font for the recipient’s name, a wax seal in the center, and a signature block at the bottom right.</p> <p>Once you’ve <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">uploaded the template</a> to your DocuGenerate account, 6 <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> are detected automatically: <code class="language-plaintext highlighter-rouge">Full Name</code>, <code class="language-plaintext highlighter-rouge">Event Name</code>, <code class="language-plaintext highlighter-rouge">Organizer</code>, <code class="language-plaintext highlighter-rouge">Certificate ID</code>, <code class="language-plaintext highlighter-rouge">Signer Position</code>, and <code class="language-plaintext highlighter-rouge">Signer Name</code>. The <code class="language-plaintext highlighter-rouge">Full Name</code> tag is displayed prominently in the middle of the certificate, <code class="language-plaintext highlighter-rouge">Event Name</code> and <code class="language-plaintext highlighter-rouge">Organizer</code> appear in the recognition text below it, and <code class="language-plaintext highlighter-rouge">Organizer</code> is also printed inside the wax seal. The <code class="language-plaintext highlighter-rouge">Certificate ID</code> sits next to the issuing date, while <code class="language-plaintext highlighter-rouge">Signer Name</code> and <code class="language-plaintext highlighter-rouge">Signer Position</code> fill the signature block.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/certificate-template.png" alt="Certificate Of Participation template with 6 merge tags in DocuGenerate"/></p> <p>The issuing date next to the certificate ID doesn’t need a merge tag at all. It’s a <code class="language-plaintext highlighter-rouge">DATE</code> field inserted directly in Word, so it’s filled in with the current date every time a certificate is generated. Our blog post on <a href="https://www.docugenerate.com/blog/format-dates-in-templates-with-data-filters-and-automatic-fields/#todays-date">inserting today’s date in a template</a> explains how to add this kind of field in Word or LibreOffice and choose its display format.</p> <h2 id="webhook-trigger">Configuring the Webhook Trigger</h2> <p>With the template ready, we can create a new workflow in Pipedream. Every workflow starts with a trigger, which determines where the data comes from and when the workflow runs. The data could come from a spreadsheet, a database like Airtable or Notion, a form builder, or any other app Pipedream connects to. For this tutorial, we’ll use an <a href="https://pipedream.com/docs/workflows/building-workflows/triggers/#http" target="_blank" rel="nofollow noopener">HTTP trigger</a> that listens for incoming requests on a unique URL, since it’s the most flexible option and works with any system that can send an HTTP request.</p> <p>Click <strong>Add Trigger</strong> and select the <strong>New HTTP / Webhook Requests</strong> trigger. The default configuration is a good fit for this workflow, so you can leave the parameters as they are:</p> <ul> <li><strong>Event Data</strong>: <code class="language-plaintext highlighter-rouge">Full HTTP request</code>, which exposes the body, headers, and other request details to the following steps via the <code class="language-plaintext highlighter-rouge">steps</code> object.</li> <li><strong>HTTP Response</strong>: <code class="language-plaintext highlighter-rouge">Return HTTP 200 OK</code>, so the caller receives an immediate confirmation.</li> <li><strong>Domains</strong>: <code class="language-plaintext highlighter-rouge">pipedream.net</code>, the domain used for the generated trigger URL.</li> <li><strong>Authorization</strong>: <code class="language-plaintext highlighter-rouge">None</code>, meaning any request sent to the URL is accepted. We’ll come back to this in the <a href="#production">production section</a>.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/webhook-trigger-config.png" alt="Configuring the HTTP / Webhook trigger in Pipedream"/></p> <p>Click <strong>Save and continue</strong> to create the trigger. In the <strong>SELECT EVENT</strong> section, Pipedream displays the unique URL generated for this workflow, which in our case is <code class="language-plaintext highlighter-rouge">https://eorgxgd03g7mu1b.m.pipedream.net</code>. Any HTTP request sent to this URL will start the workflow.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/webhook-trigger-url.png" alt="The unique URL generated for the webhook trigger"/></p> <h3 id="test-event">Sending a Test Event</h3> <p>To configure the next steps, Pipedream needs a sample event so it can show the structure of the incoming data and offer it for autocompletion. Click <strong>Generate Test Event</strong>, open the <strong>Body</strong> tab, select <code class="language-plaintext highlighter-rouge">application/json</code> as the <strong>Content-Type</strong>, and enter the following payload in the <strong>Raw Request Body</strong> field:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"Signer Position"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Program Director"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Signer Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Margaret Ellison"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Certificate ID"</span><span class="p">:</span><span class="w"> </span><span class="s2">"FLN-2025-00143"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Organizer"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Future Learning Network"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Event Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"International Student Leadership Forum 2025"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Full Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Aisha Rahman"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Email"</span><span class="p">:</span><span class="w"> </span><span class="s2">"aisha.rahman@example.com"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div> <p>The first six keys match the merge tags in the certificate template exactly. The <code class="language-plaintext highlighter-rouge">Email</code> key isn’t used in the template, but we include it in the payload because the workflow needs to know where to <a href="#send-email">send the certificate</a> once it’s generated.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/webhook-test-request.png" alt="Sending a test HTTP request with the participant's data"/></p> <p>Click <strong>Send HTTP Request</strong> to submit the test event. The <strong>RESULTS</strong> section confirms that the request was received and shows how the data is exported under <code class="language-plaintext highlighter-rouge">steps.trigger.event</code>. The seven fields from our payload are available in the <code class="language-plaintext highlighter-rouge">body</code> object, alongside other request details like the <code class="language-plaintext highlighter-rouge">headers</code>, the <code class="language-plaintext highlighter-rouge">method</code>, and the <code class="language-plaintext highlighter-rouge">url</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/webhook-test-results.png" alt="Webhook trigger results showing the request body"/></p> <h2 id="generate-document">Generating the Certificate</h2> <p>Next, click the <strong>+</strong> button below the trigger, search for DocuGenerate, and select the <strong>Generate Document</strong> action from the <a href="https://pipedream.com/apps/docugenerate" target="_blank" rel="noopener">DocuGenerate App</a>. The first time you use it, you’ll need to connect your DocuGenerate account with your <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a>. The <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-pipedream/#install-docugenerate">integration guide</a> covers this setup in more detail.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/docugenerate_config.png" alt="Configuring the Generate Document action"/></p> <p>Configure the action with the following parameters:</p> <ul> <li><strong>DocuGenerate Account</strong>: The account connected with your API Key.</li> <li><strong>Template</strong>: The <strong>Certificate Of Participation</strong> template uploaded in the <a href="#certificate-template">template setup</a> step.</li> <li><strong>Name</strong>: <code class="language-plaintext highlighter-rouge">Certificate for {{steps.trigger.event.body["Full Name"]}}</code>, which gives each document a name based on the participant, such as <code class="language-plaintext highlighter-rouge">Certificate for Aisha Rahman</code>.</li> <li><strong>Format</strong>: <code class="language-plaintext highlighter-rouge">PDF (.pdf)</code>, so the certificate can be attached to an email and opened on any device.</li> <li><strong>Data</strong>: An object mapping each merge tag to the corresponding value from the trigger, as explained below.</li> </ul> <p>For the <strong>Data</strong> parameter, select the <strong>Construct an object</strong> option and add one row for each of the 6 merge tags. The key of each row is the merge tag name, and the value references the matching field in <code class="language-plaintext highlighter-rouge">steps.trigger.event.body</code>. Keys that contain spaces must use bracket notation, as in <code class="language-plaintext highlighter-rouge">{{steps.trigger.event.body["Full Name"]}}</code>, while single-word keys like <code class="language-plaintext highlighter-rouge">Organizer</code> can use the shorter dot notation, <code class="language-plaintext highlighter-rouge">{{steps.trigger.event.body.Organizer}}</code>. The <code class="language-plaintext highlighter-rouge">Email</code> field is left out, since the template doesn’t use it.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/docugenerate_data.png" alt="Constructing the Data object from the webhook body"/></p> <p>Click <strong>Test</strong> to run the action with the test event. The <strong>RESULTS</strong> section confirms that the document was generated, and the exported <code class="language-plaintext highlighter-rouge">$return_value</code> contains the details of the new document:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"$summary"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Successfully generated the document S1AG7iucebUnYdv9RY73"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"$return_value"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
    </span><span class="nl">"created"</span><span class="p">:</span><span class="w"> </span><span class="mi">1790522684107</span><span class="p">,</span><span class="w">
    </span><span class="nl">"template_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"bjBXM4QZeg88Hf7ULwgl"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Certificate for Aisha Rahman"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"format"</span><span class="p">:</span><span class="w"> </span><span class="s2">".pdf"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"data_length"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
    </span><span class="nl">"filename"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Certificate for Aisha Rahman.pdf"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"document_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://firebasestorage.googleapis.com/v0/b/storage.us.docugenerate.com/o/documents%2FS1AG7iucebUnYdv9RY73%2FCertificate%20for%20Aisha%20Rahman.pdf?alt=media&amp;token=81c6ffdb-282d-4a89-a2b9-e96542f6aee2"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"S1AG7iucebUnYdv9RY73"</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div> <p>The two fields we’ll need in the next step are <code class="language-plaintext highlighter-rouge">filename</code>, the name of the generated file, and <code class="language-plaintext highlighter-rouge">document_uri</code>, a URL pointing to the generated PDF.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/docugenerate_result.png" alt="Generate Document action results in Pipedream"/></p> <p>You can also verify the result in DocuGenerate. The <strong>Documents</strong> tab of the <strong>Certificate Of Participation</strong> template now lists a document named <strong>Certificate for Aisha Rahman</strong>, with every merge tag replaced by the values from the test event, including the organizer’s name inside the seal and the signer’s details in the signature block. You can download the <a href="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/Certificate for Aisha Rahman.pdf" target="_blank">generated certificate</a> to see the final PDF.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/docugenerate_pdf.png" alt="The generated certificate in DocuGenerate"/></p> <h2 id="send-email">Sending the Certificate by Email</h2> <p>The final step delivers the certificate to the participant. Click the <strong>+</strong> button below the <strong>Generate Document</strong> action and select the <a href="https://pipedream.com/apps/gmail/actions/send-email" target="_blank" rel="nofollow noopener">Send Email</a> action from the <a href="https://pipedream.com/apps/gmail" target="_blank" rel="nofollow noopener">Gmail</a> app, then connect the Gmail account the emails should be sent from. Pipedream supports many other email providers, but the Gmail action is complete and quick to set up, which makes it a good choice for this tutorial.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/gmail-config.png" alt="Configuring the Gmail Send Email action"/></p> <p>Configure the action with the following parameters:</p> <ul> <li><strong>To</strong>: <code class="language-plaintext highlighter-rouge">{{steps.trigger.event.body.Email}}</code>, the email address received in the webhook payload.</li> <li><strong>Subject</strong>: <code class="language-plaintext highlighter-rouge">Your certificate {{steps.trigger.event.body["Certificate ID"]}}</code>, which includes the certificate ID so the participant can reference it later.</li> <li><strong>Email Body</strong>: A short message personalized with the participant’s name, the event name, and the signer’s details (shown below).</li> <li><strong>Attachment Filenames</strong>: <code class="language-plaintext highlighter-rouge">{{steps.generate_document.$return_value.filename}}</code>, the filename returned by the <a href="#generate-document">Generate Document</a> action.</li> <li><strong>Attachments</strong>: <code class="language-plaintext highlighter-rouge">{{steps.generate_document.$return_value.document_uri}}</code>, the URL of the generated PDF.</li> </ul> <p>Here is the complete text used in the <strong>Email Body</strong> field:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Dear {{steps.trigger.event.body["Full Name"]}},

Thank you for taking part in {{steps.trigger.event.body["Event Name"]}}.

Please find your certificate of participation attached to this email.

We hope you enjoyed the experience and look forward to seeing you at future events.

Best regards,
{{steps.trigger.event.body["Signer Name"]}}
{{steps.trigger.event.body["Signer Position"]}}
</code></pre></div></div> <p>A convenient detail of the Gmail action is that the <strong>Attachments</strong> field accepts public URLs as well as file paths. This means the <code class="language-plaintext highlighter-rouge">document_uri</code> returned by DocuGenerate can be passed directly, without adding an intermediate step to download the PDF to temporary storage first. Click <strong>Test</strong> to send the email for the test event. The participant receives a message with the subject <strong>Your certificate FLN-2025-00143</strong>, the personalized body text, and the certificate attached as <code class="language-plaintext highlighter-rouge">Certificate for Aisha Rahman.pdf</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/gmail-email-received.png" alt="The email received with the certificate attached"/></p> <h2 id="testing">Testing the Workflow End to End</h2> <p>So far, each step has been tested individually using the sample event. To run the complete workflow the way it will run in practice, click <strong>Deploy</strong> so the trigger URL starts processing live requests. Then send a real HTTP request to the <a href="#webhook-trigger">trigger URL</a> from outside Pipedream. If you’re not sure how to do this from your own system, the <strong>See Code Examples</strong> button in the trigger’s <strong>SELECT EVENT</strong> section provides ready-made snippets in several languages, including cURL, JavaScript, Node, Python, PHP, Go, and Ruby.</p> <p>We’ll use the following cURL command, which sends the same participant data as the test event:</p> <div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl <span class="nt">-X</span> POST https://eorgxgd03g7mu1b.m.pipedream.net <span class="se">\</span>
  <span class="nt">-H</span> <span class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
  <span class="nt">-d</span> <span class="s1">'{
    "Signer Position": "Program Director",
    "Signer Name": "Margaret Ellison",
    "Certificate ID": "FLN-2025-00143",
    "Organizer": "Future Learning Network",
    "Event Name": "International Student Leadership Forum 2025",
    "Full Name": "Aisha Rahman",
    "Email": "aisha.rahman@example.com"
  }'</span>
</code></pre></div></div> <p>Within a few seconds of sending the request, the workflow runs through all three steps: the trigger receives the payload, DocuGenerate generates the certificate, and Gmail sends it to the participant’s inbox. Each run is recorded in the workflow’s event history in Pipedream, where you can inspect the inputs and exports of every step if something doesn’t look right. To generate certificates for a whole list of participants, send one request per participant with their own details.</p> <p>If you’d like to try this workflow yourself, you can use this <a href="https://pipedream.com/new?h=tch_lXfoja" target="_blank" rel="nofollow noopener">share link</a> to copy it into your own Pipedream account. Connected accounts are not included in <a href="https://pipedream.com/docs/workflows/sharing" target="_blank" rel="nofollow noopener">shared workflows</a>, so you’ll need to connect your own DocuGenerate and Gmail accounts and select your own copy of the certificate template.</p> <h2 id="production">Taking the Workflow to Production</h2> <p>The workflow we’ve built is complete, but a couple of adjustments are worth making before relying on it for a real event. The most important one is the trigger’s <strong>Authorization</strong> setting. With <code class="language-plaintext highlighter-rouge">None</code>, anyone who knows the trigger URL can generate a certificate and have it emailed to any address. Pipedream lets you <a href="https://pipedream.com/docs/workflows/building-workflows/triggers/#authorizing-http-requests" target="_blank" rel="nofollow noopener">authorize HTTP requests</a> with a custom token or OAuth, so that only requests from your own systems are accepted and all others are discarded.</p> <p>The second consideration is where the data comes from. Calling the webhook from a registration platform, a form builder, or your own backend works well when certificates should go out as soon as someone completes an event. If your participant list lives in a spreadsheet or a database instead, you can swap the HTTP trigger for a Pipedream trigger that fires on a new row in Google Sheets or a new record in a database. The <a href="#generate-document">Generate Document</a> and <a href="#send-email">Send Email</a> steps stay the same, and only the references to <code class="language-plaintext highlighter-rouge">steps.trigger.event.body</code> need to be updated to point at the new trigger’s data.</p> <h2 id="conclusion">Conclusion</h2> <p>In this tutorial, we built a Pipedream workflow that turns a single HTTP request into a personalized PDF certificate delivered by email. The webhook trigger receives the participant’s details, the DocuGenerate <strong>Generate Document</strong> action merges them into a Word template, and the Gmail <strong>Send Email</strong> action attaches the PDF directly from its URL, with no intermediate download step and no manual work once the workflow is deployed.</p> <p>The same pattern works for any document that needs to reach a recipient right after it’s created, such as course completion certificates, event tickets, registration confirmations, or receipts. Replace the template, adjust the payload to match its merge tags, and update the email text, and the rest of the workflow remains unchanged.</p> <h2 id="resources">Resources</h2> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/Certificate Of Participation.docx">Certificate Of Participation</a> Word template used in this tutorial.</li> <li>A <a href="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/Certificate for Aisha Rahman.pdf" target="_blank">sample generated PDF</a> showing the final output.</li> <li>The <a href="https://pipedream.com/new?h=tch_lXfoja" target="_blank" rel="nofollow noopener">Certificate of Participation Generator</a> link to copy this workflow in Pipedream.</li> <li>The DocuGenerate <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-pipedream/">integration guide</a> for Pipedream.</li> <li>The official <a href="https://pipedream.com/apps/docugenerate" target="_blank" rel="noopener">DocuGenerate App</a> for Pipedream.</li> <li>The <a href="https://pipedream.com/apps/gmail/actions/send-email" target="_blank" rel="nofollow noopener">Gmail Send Email</a> action on Pipedream.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Certificates"/> <category term="Pipedream"/> <category term="No-Code"/> <summary type="html"><![CDATA[Create a Pipedream workflow that receives participant data through a webhook, generates a personalized PDF certificate of participation with DocuGenerate, and emails it to the participant with Gmail, all within a few seconds of the request.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/cover-image-v3.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/037-pipedream-certificates/cover-image-v3.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Create Salary Increase Letters with n8n and DocuGenerate</title> <link href="https://www.docugenerate.com/blog/create-salary-increase-letters-with-n8n-and-docugenerate/" rel="alternate" type="text/html" title="Create Salary Increase Letters with n8n and DocuGenerate"/> <published>2026-08-18T00:00:00+00:00</published> <updated>2026-08-18T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/create-salary-increase-letters-with-n8n-and-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/create-salary-increase-letters-with-n8n-and-docugenerate/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Salary increase letters are one of those documents that need to go out to every affected employee at the same time, worded consistently, and free of copy-paste mistakes. When a review cycle covers dozens of employees, writing each letter by hand or manually merging a spreadsheet into a Word document quickly becomes a bottleneck for HR teams. In this tutorial, we’ll build an automated workflow using <a href="https://n8n.io/" target="_blank" rel="nofollow noopener">n8n</a> and <a href="https://www.docugenerate.com/">DocuGenerate</a> that turns a Google Sheets spreadsheet of salary review data into personalized PDF letters, with no manual document creation involved.</p> <p>The workflow watches a Google Drive folder for a new spreadsheet. As soon as one appears, it reads every row, and for each employee it merges that row’s data into a Word template, generates a PDF, and uploads the finished letter to a dedicated output folder in Drive. HR only has to prepare the spreadsheet with that cycle’s raises; the letters are generated and filed automatically. By the end of this guide, you’ll have a fully functional n8n workflow that you can import and adapt to your own salary review process.</p> <h2 id="template-setup">Setting Up the Salary Increase Letter Template</h2> <p>Before building the n8n workflow, we need a document template in DocuGenerate. We’ll use the <a href="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/Salary Increase Letter.docx">Salary Increase Letter</a> Word template, a short remuneration review letter that informs an employee of their raise, the new total pay, and who to contact with questions.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/docugenerate-template.png" alt="Salary Increase Letter template with merge tags"/></p> <p>Once you’ve <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">uploaded the template</a> to your DocuGenerate account, 13 merge tags are detected automatically: <code class="language-plaintext highlighter-rouge">Date</code>, <code class="language-plaintext highlighter-rouge">Employee First Name</code>, <code class="language-plaintext highlighter-rouge">Employee Last Name</code>, <code class="language-plaintext highlighter-rouge">Employee Address</code>, <code class="language-plaintext highlighter-rouge">Increase Amount</code>, <code class="language-plaintext highlighter-rouge">Remuneration Type</code>, <code class="language-plaintext highlighter-rouge">Total Sum</code>, <code class="language-plaintext highlighter-rouge">Increase Date</code>, <code class="language-plaintext highlighter-rouge">Contact Name</code>, <code class="language-plaintext highlighter-rouge">Contact Number</code>, <code class="language-plaintext highlighter-rouge">Company Name</code>, <code class="language-plaintext highlighter-rouge">Signatory Name</code>, and <code class="language-plaintext highlighter-rouge">Signatory Position</code>. These <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> cover both the employee-specific details of the raise and the fixed details of the company and signatory, all of which will come from the spreadsheet rows.</p> <h2 id="google-sheets-data">Preparing the Data in Google Sheets</h2> <p>The data for this workflow lives in Google Sheets. For this tutorial, we’re using the sample <a href="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/Salary Increase Data.xlsx">Salary Increase Data</a> Excel file, imported into a Google Sheets spreadsheet named <strong>Salary Increase August 2026</strong>. Each of the 10 rows represents one employee’s raise, with a column for every merge tag in the template: name, address, increase amount, remuneration type, total sum, and the increase date, alongside the shared contact and signatory details repeated on every row.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/drive-drive-salary-increase-letter-sheet.png" alt="Salary Increase August 2026 spreadsheet in Google Sheets"/></p> <p>This spreadsheet lives inside a <strong>Salary Increase Letter</strong> folder in Google Drive, which also holds the folders of letters generated for past review cycles. Each new cycle starts the same way: a new spreadsheet with that cycle’s data is added to this folder, which is exactly the event our workflow will watch for.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/drive-salary-increase-letter-folder.png" alt="Salary Increase Letter folder in Google Drive"/></p> <h2 id="workflow-overview">The n8n Workflow Overview</h2> <p>With the template and the data source ready, here’s what the complete workflow looks like in n8n. You can download the <a href="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/Salary Increase Letter Workflow.json" target="_blank">workflow JSON file</a> and import it directly into your n8n instance, then update the DocuGenerate template, the Google credentials, and the Drive folder ID to match your own setup.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-complete-workflow.png" alt="The complete n8n workflow"/></p> <p>The workflow begins with a trigger that watches the <strong>Salary Increase Letter</strong> folder for a new Google Sheets file. When one appears, it creates a matching output folder, reads every row from the sheet, and loops through the rows one at a time, generating a PDF letter for each employee and uploading it to the new folder. Let’s walk through each node.</p> <h2 id="google-drive-trigger">Watching for New Spreadsheets with the Google Drive Trigger</h2> <p>The <a href="https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.googledrivetrigger/" target="_blank" rel="nofollow noopener">Google Drive Trigger</a> node polls a specific Google Drive folder and starts the workflow when a matching change occurs.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-google-drive-trigger.png" alt="Google Drive Trigger configuration"/></p> <p>The node is set to poll <strong>Every X</strong> <code class="language-plaintext highlighter-rouge">30</code> <strong>Minutes</strong>, with <strong>Trigger On</strong> set to <strong>Changes Involving a Specific Folder</strong>. The <strong>Folder</strong> parameter accepts the target folder in three ways: <strong>From list</strong>, <strong>By URL</strong>, or <strong>By ID</strong>; here it’s set to <strong>By ID</strong> with the ID of the <strong>Salary Increase Letter</strong> folder.</p> <p>You can find a folder’s ID in its Google Drive URL, it’s the string of characters after <code class="language-plaintext highlighter-rouge">/folders/</code>. For example, the ID for the URL <code class="language-plaintext highlighter-rouge">https://drive.google.com/drive/folders/1dcLLzfZaH38hDd0acfUru2ISOoTsbGPI</code> is <code class="language-plaintext highlighter-rouge">1dcLLzfZaH38hDd0acfUru2ISOoTsbGPI</code>.</p> <p>Finally, <strong>Watch For</strong> is set to <strong>File Created</strong>, and the <strong>File Type</strong> option under <strong>Options</strong> is restricted to <strong>Google Spreadsheets</strong>, so the trigger only fires when a new spreadsheet is added to the folder.</p> <h2 id="create-folder">Creating an Output Folder</h2> <p>Once a new spreadsheet is detected, the workflow needs somewhere to put the generated letters. The <a href="https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/" target="_blank" rel="nofollow noopener">Google Drive</a> node’s <strong>Create</strong> operation on the <strong>Folder</strong> resource handles this.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-create-folder.png" alt="Create folder node configuration"/></p> <p>The <strong>Folder Name</strong> parameter uses the expression <code class="language-plaintext highlighter-rouge">{{ $('Google Drive Trigger').item.json.name }}</code>, which resolves to <code class="language-plaintext highlighter-rouge">Salary Increase August 2026</code>, the name of the spreadsheet that triggered the workflow. The <strong>Parent Folder</strong> is set to the same folder ID used in the <a href="#google-drive-trigger">trigger</a>, so the new output folder is created as a sibling of the source spreadsheet inside <strong>Salary Increase Letter</strong>. Naming the folder after its source spreadsheet keeps each review cycle’s letters grouped with the data that produced them.</p> <h2 id="get-rows-in-sheet">Reading the Employee Data</h2> <p>With the destination folder ready, the <a href="https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/" target="_blank" rel="nofollow noopener">Google Sheets</a> node’s <strong>Get Row(s)</strong> operation on the <strong>Sheet Within Document</strong> resource reads the employee data.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-get-rows-in-sheet.png" alt="Get row(s) in sheet node configuration"/></p> <p>The <strong>Document</strong> is set to <strong>Salary Increase August 2026</strong> and the <strong>Sheet</strong> to <strong>Salary Increase Data</strong>, both picked from the <strong>From list</strong> dropdowns. The node returns all 10 rows as separate items, each containing the full set of fields we saw in the <a href="#google-sheets-data">spreadsheet</a>: employee details, raise figures, and the shared contact and signatory information.</p> <h2 id="loop-over-items">Looping Through Each Employee</h2> <p>To generate one letter per employee, the workflow needs to process the 10 rows one at a time. The <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/" target="_blank" rel="nofollow noopener">Loop Over Items</a> node handles this with a batch size of 1.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-loop-over-items.png" alt="Loop Over Items node configuration"/></p> <p>Each pass through the loop carries a single employee’s row, such as the first one for James Mitchell with a 4% increase bringing his annual salary to $87,500, into the nodes that follow. The loop continues until all 10 rows have been processed, generating and saving one letter before moving on to the next.</p> <h2 id="generate-document">Generating the Letter</h2> <p>The <strong>Generate document</strong> node uses the <a href="https://n8n.io/integrations/docugenerate/" target="_blank" rel="noopener">DocuGenerate integration</a> for n8n to merge each row’s data with the Word template. To use this node, install DocuGenerate in your n8n instance and <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-n8n/#install-docugenerate">configure it</a> with your <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-generate-document.png" alt="Generate document node configuration"/></p> <p>The node is configured with the following parameters:</p> <ul> <li><strong>Template Name or ID</strong>: The <strong>Salary Increase Letter</strong> template <a href="#template-setup">uploaded earlier</a>.</li> <li><strong>Name</strong>: An expression, <code class="language-plaintext highlighter-rouge">Letter for {{ $json['Employee First Name'] }} {{ $json['Employee Last Name'] }}</code>, which produces a name like <code class="language-plaintext highlighter-rouge">Letter for James Mitchell</code> for the first row.</li> <li><strong>Format</strong>: Set to <code class="language-plaintext highlighter-rouge">PDF (.pdf)</code>.</li> <li><strong>Data</strong>: Set to <code class="language-plaintext highlighter-rouge">{{ $json }}</code>, passing the entire current row, with all 13 merge tag values, straight to the API.</li> </ul> <p>For the first row, this produces the following response:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
  </span><span class="p">{</span><span class="w">
    </span><span class="nl">"created"</span><span class="p">:</span><span class="w"> </span><span class="mi">1774348731006</span><span class="p">,</span><span class="w">
    </span><span class="nl">"template_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ARnboMDE3zyzMrdTZJ2e"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Letter for James Mitchell"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"format"</span><span class="p">:</span><span class="w"> </span><span class="s2">".pdf"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"data_length"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
    </span><span class="nl">"filename"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Letter for James Mitchell.pdf"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"document_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://firebasestorage.googleapis.com/v0/b/storage.us.docugenerate.com/o/documents%2FA1blGMwZETC4hrP5Zr2C%2FLetter%20for%20James%20Mitchell.pdf?alt=media&amp;token=6383b541-f2b9-4c79-8161-063d287a5887"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"A1blGMwZETC4hrP5Zr2C"</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div> <p>You can see the generated document below, or download the <a href="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/Letter for James Mitchell.pdf">sample PDF</a> directly.</p> <object data="/assets/posts/036-n8n-salary-increase-letters/Letter for James Mitchell.pdf" type="application/pdf" class="inline-pdf-blog"></object> <h2 id="http-request">Downloading the Generated Letter</h2> <p>DocuGenerate returns a <code class="language-plaintext highlighter-rouge">document_uri</code> pointing to the generated PDF rather than the file itself, so the workflow needs to fetch it before it can be uploaded elsewhere. The <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/" target="_blank" rel="nofollow noopener">HTTP Request</a> node makes a <code class="language-plaintext highlighter-rouge">GET</code> request to that URL.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-http-request.png" alt="HTTP Request node configuration"/></p> <p>The <strong>URL</strong> parameter is set to <code class="language-plaintext highlighter-rouge">{{ $json.document_uri }}</code>, referencing the <a href="#generate-document">Generate document</a> node’s response. <strong>Authentication</strong> is left as <code class="language-plaintext highlighter-rouge">None</code>, since the document URI already includes an access token. The node’s output holds the file’s binary content in a <code class="language-plaintext highlighter-rouge">data</code> field, ready for the next step.</p> <h2 id="upload-file">Saving the Letter to Google Drive</h2> <p>The final node uploads the PDF to the output folder created at the <a href="#create-folder">start of the run</a>, using the Google Drive node’s <strong>Upload</strong> operation on the <strong>File</strong> resource.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-upload-file.png" alt="Upload file node configuration"/></p> <p>The <strong>Input Data Field Name</strong> is set to <code class="language-plaintext highlighter-rouge">data</code>, matching the binary field produced by the <a href="#http-request">HTTP Request</a> node. The <strong>File Name</strong> field is left empty, so the upload keeps the original filename carried in the binary data, <code class="language-plaintext highlighter-rouge">Letter for James Mitchell.pdf</code> for this row. The <strong>Parent Folder</strong> uses the expression <code class="language-plaintext highlighter-rouge">{{ $('Create folder').item.json.id }}</code>, so every letter lands in the folder created for this review cycle rather than loose in Drive.</p> <h2 id="running-the-workflow">Running the Workflow</h2> <p>With every node configured, adding a new spreadsheet to the <strong>Salary Increase Letter</strong> folder is all it takes to generate a full batch of letters. The animation below shows a full run: each node turns green with a checkmark as it completes, and the <a href="#loop-over-items">Loop Over Items</a> segment runs 10 times in a row, once for every employee in the spreadsheet.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/n8n-workflow-testing.gif" alt="n8n workflow running end to end"/></p> <p>Once the run finishes, all 10 letters are sitting in the output folder in Google Drive, each named after its recipient.</p> <p><img src="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/drive-generated-documents.png" alt="Generated letters in the Salary Increase August 2026 folder"/></p> <h2 id="conclusion">Conclusion</h2> <p>In this tutorial, we built an n8n workflow that turns a Google Sheets spreadsheet of salary review data into a folder of personalized PDF letters, with no manual document creation involved. The workflow watches a Drive folder for a new spreadsheet, creates a matching output folder, loops through every row, and generates and files a letter for each employee, all triggered by nothing more than adding a spreadsheet to the right folder.</p> <p>The same pattern applies to any HR document tied to a periodic review, from bonus letters to renewal notices. The trigger and data source could just as easily be a webhook from a Human Resources Information System (HRIS) or a query against a database instead of a Drive folder, while the generation and delivery steps stay the same.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/Salary Increase Letter.docx">Salary Increase Letter</a> Word template used in this tutorial.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/Salary Increase Data.xlsx">sample Excel file</a> with employee raise data.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/Salary Increase Letter Workflow.json" target="_blank">workflow JSON file</a> that you can import into your n8n instance.</li> <li>A <a href="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/Letter for James Mitchell.pdf" target="_blank">sample generated PDF</a> showing the final output.</li> <li>The DocuGenerate <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-n8n/">integration guide</a> for n8n.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Letters"/> <category term="n8n"/> <category term="No-Code"/> <summary type="html"><![CDATA[Build an n8n workflow that watches a Google Drive folder for a new salary review spreadsheet and automatically generates a personalized PDF salary increase letter for every employee listed in it. The finished letters are saved back to Google Drive.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/036-n8n-salary-increase-letters/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Generate Form W-9 PDFs with Power Automate and Smartsheet</title> <link href="https://www.docugenerate.com/blog/generate-form-w-9-pdfs-with-power-automate-and-smartsheet/" rel="alternate" type="text/html" title="Generate Form W-9 PDFs with Power Automate and Smartsheet"/> <published>2026-07-24T00:00:00+00:00</published> <updated>2026-07-24T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/generate-form-w-9-pdfs-with-power-automate-and-smartsheet</id> <content type="html" xml:base="https://www.docugenerate.com/blog/generate-form-w-9-pdfs-with-power-automate-and-smartsheet/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Form W-9, “Request for Taxpayer Identification Number and Certification,” is an IRS form that businesses in the United States use to collect the legal name, address, and taxpayer identification number of vendors, freelancers, and independent contractors before paying them. The information reported on a W-9 is later used to prepare 1099 forms at tax time, which makes accurate and consistently formatted W-9 records an important part of any vendor onboarding process. Companies that work with a steady stream of new contractors often end up managing this data in a spreadsheet or a tool like <a href="https://www.smartsheet.com/" target="_blank" rel="nofollow noopener">Smartsheet</a>, which makes it a natural candidate for automation.</p> <p>In this tutorial, we’ll build a <a href="https://www.microsoft.com/en-us/power-platform/products/power-automate" target="_blank" rel="nofollow noopener">Power Automate</a> flow that watches a Smartsheet sheet for new rows and automatically generates a filled-in W-9 PDF using <a href="https://www.docugenerate.com/">DocuGenerate</a>. Whenever a new vendor record is added to the sheet, whether by a team member entering it directly or by an import from another system, the flow merges that row’s data into a Word template and saves the finished PDF to Azure File Storage. The same pattern applies to any document that needs to be generated automatically from spreadsheet data, but a tax form is a good illustration because it involves a mix of individual and business filers, conditional fields, and a layout that must remain precise.</p> <h2 id="docugenerate-template">Preparing the DocuGenerate Template</h2> <p>The first step is to create a Word template in DocuGenerate that mirrors the official W-9 layout. We started from the <a href="https://www.irs.gov/forms-pubs/about-form-w-9" target="_blank" rel="nofollow noopener">IRS Form W-9</a> and replaced each fillable field with a <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tag</a>, then <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">uploaded it</a> as a new template named <strong>Form W-9</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/docugenerate-form-w-9-template.png" alt="Form W-9 template with merge tags in DocuGenerate"/></p> <p>The template contains 17 merge tags: <code class="language-plaintext highlighter-rouge">firstName</code>, <code class="language-plaintext highlighter-rouge">lastName</code>, <code class="language-plaintext highlighter-rouge">businessName</code>, <code class="language-plaintext highlighter-rouge">taxClassification</code>, <code class="language-plaintext highlighter-rouge">exemptPayeeCode</code>, <code class="language-plaintext highlighter-rouge">fatcaCode</code>, <code class="language-plaintext highlighter-rouge">streetAddress</code>, <code class="language-plaintext highlighter-rouge">requesterName</code>, <code class="language-plaintext highlighter-rouge">requesterAddress</code>, <code class="language-plaintext highlighter-rouge">city</code>, <code class="language-plaintext highlighter-rouge">state</code>, <code class="language-plaintext highlighter-rouge">zipCode</code>, <code class="language-plaintext highlighter-rouge">accountNumber</code>, <code class="language-plaintext highlighter-rouge">ssn</code>, <code class="language-plaintext highlighter-rouge">ein</code>, <code class="language-plaintext highlighter-rouge">signature</code>, and <code class="language-plaintext highlighter-rouge">signatureDate</code>. Most of these map directly to a labeled box on the form. <code class="language-plaintext highlighter-rouge">taxClassification</code> corresponds to the “Other” line in the federal tax classification section and holds a short description such as “C Corporation” or “Trust/estate,” while <code class="language-plaintext highlighter-rouge">ssn</code> and <code class="language-plaintext highlighter-rouge">ein</code> populate the two boxes in Part I depending on whether the filer is an individual or a business entity. You can download the <a href="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/Form W-9.docx">Word template</a> used in this tutorial and adapt it to your own layout.</p> <h2 id="smartsheet-data">Setting Up the Data Source in Smartsheet</h2> <p>With the template in place, the next step is to prepare the sheet that will act as the trigger for our flow. In Smartsheet, click <strong>Create</strong> &gt; <strong>Sheet</strong> &gt; <strong>Table</strong> to create a new sheet, then rename it to <strong>Form W-9</strong>. Rather than typing sample rows in by hand, we’ll import them from an Excel file by opening the sheet menu and selecting <strong>Import</strong>. Keep in mind that importing replaces any existing data in the sheet with the data from the source file.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/smartsheet-import-excel-data.png" alt="Importing Excel data into the Form W-9 sheet in Smartsheet"/></p> <p>You can download the <a href="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/Form W-9 Data.xlsx">sample Excel file</a> used for this import. It contains 10 rows matching the 18 columns that will map to the merge tags in the template: a <code class="language-plaintext highlighter-rouge">Record ID</code> column (<code class="language-plaintext highlighter-rouge">REC-001</code> through <code class="language-plaintext highlighter-rouge">REC-010</code>) followed by one column for each field on the form. The data mixes individuals and business entities to exercise the different branches of the form: six individuals or sole proprietors with an SSN and no EIN, and four entities (an LLC, a C Corp, a trust/estate, and a partnership) with an EIN and no SSN. One row also has the Exempt Payee Code and FATCA Code columns populated, since those only apply in specific cases.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/smartsheet-table-form-w9-data.png" alt="Form W-9 data imported into the Smartsheet table"/></p> <h2 id="flow-overview">Building the Power Automate Flow</h2> <p>With the template and the data source ready, we can build the flow itself. In Power Automate, click <strong>New flow</strong> &gt; <strong>Automated cloud flow</strong>. In the <strong>Build an automated cloud flow</strong> dialog, give the flow a name such as <code class="language-plaintext highlighter-rouge">Form W-9</code>, search for “Smartsheet” in the trigger list, and select <strong>When a new row is created</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/when-a-new-row-is-created-trigger.png" alt="Selecting the Smartsheet trigger when creating a new flow"/></p> <p>The flow we’ll build has three steps: a Smartsheet trigger that fires when a row is added, a DocuGenerate action that generates the PDF, and an Azure File Storage action that saves it. Let’s configure each one in turn.</p> <h3 id="smartsheet-trigger">Configuring the Smartsheet Trigger</h3> <p>The <strong>When a new row is created</strong> trigger needs a connection to your Smartsheet account, which Power Automate will prompt you to create the first time you use it. Once connected, set the <strong>Sheet Id</strong> parameter to the <strong>Form W-9</strong> sheet <a href="#smartsheet-data">we created earlier</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/configure-sheet-id-trigger.png" alt="Configuring the Sheet Id parameter on the Smartsheet trigger"/></p> <h3 id="generate-document">Adding the Generate Document Action</h3> <p>Next, click the <strong>+</strong> button below the trigger and search for “DocuGenerate” to see the list of available actions.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/docugenerate-add-action.png" alt="Searching for the DocuGenerate connector in Power Automate"/></p> <p>Select <strong>Generate Document</strong>. The first time you use a DocuGenerate action in your environment, you’ll be prompted to <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-power-apps/#add-the-custom-connector">create a connection</a> using your DocuGenerate <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a>. Once connected, set the <strong>Template</strong> field to the <strong>Form W-9</strong> template <a href="#docugenerate-template">created in DocuGenerate</a>.</p> <p>For the <strong>Data</strong> field, we need a JSON object containing the values for all 17 merge tags. Smartsheet’s trigger does not expose the row’s cells by column name, only as an array, so each value has to be referenced by its numeric index. Based on how the columns were ordered during the import, the mapping is: column 0 is Record ID, column 1 is SSN, column 2 is First Name, column 3 is Last Name, and so on through column 17, which is Signature Date. We built the JSON with the <code class="language-plaintext highlighter-rouge">concat</code> and <code class="language-plaintext highlighter-rouge">json</code> expressions:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>json(concat(
  '{"firstName": "', triggerBody()?.cells?[2]?.value,
  '", "lastName": "', triggerBody()?.cells?[3]?.value,
  '", "businessName": "', triggerBody()?.cells?[4]?.value,
  '", "taxClassification": "', triggerBody()?.cells?[5]?.value,
  '", "exemptPayeeCode": "', triggerBody()?.cells?[6]?.value,
  '", "fatcaCode": "', triggerBody()?.cells?[7]?.value,
  '", "streetAddress": "', triggerBody()?.cells?[8]?.value,
  '", "requesterName": "', triggerBody()?.cells?[9]?.value,
  '", "requesterAddress": "', triggerBody()?.cells?[10]?.value,
  '", "city": "', triggerBody()?.cells?[11]?.value,
  '", "state": "', triggerBody()?.cells?[12]?.value,
  '", "zipCode": "', triggerBody()?.cells?[13]?.value,
  '", "accountNumber": "', triggerBody()?.cells?[14]?.value,
  '", "ssn": "', triggerBody()?.cells?[1]?.value,
  '", "ein": "', triggerBody()?.cells?[15]?.value,
  '", "signature": "', triggerBody()?.cells?[16]?.value,
  '", "signatureDate": "', triggerBody()?.cells?[17]?.value,
  '"}'
))
</code></pre></div></div> <p>The <code class="language-plaintext highlighter-rouge">?</code> characters are null-conditional operators: <code class="language-plaintext highlighter-rouge">triggerBody()?.cells?[2]?.value</code> reads the <code class="language-plaintext highlighter-rouge">value</code> property of the cell at index 2, and returns <code class="language-plaintext highlighter-rouge">null</code> instead of throwing an error at any point where <code class="language-plaintext highlighter-rouge">cells</code> or that specific cell happens to be missing. This matters here because several columns, like <code class="language-plaintext highlighter-rouge">businessName</code> or <code class="language-plaintext highlighter-rouge">ssn</code>, are intentionally blank on many rows. The outer <code class="language-plaintext highlighter-rouge">concat</code> function stitches all these values into a single JSON string, and <code class="language-plaintext highlighter-rouge">json()</code> parses that string into the object the <strong>Data</strong> field expects.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/generate-document-action-data.png" alt="Configuring the Data field on the Generate Document action"/></p> <p>For the <strong>Name</strong> field, we used an expression that checks whether the Business Name column (index 4) is populated and picks the appropriate naming pattern, using the same index map as above:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>if(
  empty(triggerBody()?.cells?[4]?.value),
  concat('Form W-9 ', triggerBody()?.cells?[2]?.value, ' ', triggerBody()?.cells?[3]?.value),
  concat('Form W-9 ', triggerBody()?.cells?[4]?.value)
)
</code></pre></div></div> <p>This produces a name like “Form W-9 John Smith” for an individual filer, or “Form W-9 Bluepeak Software LLC” for a business filer. Finally, leave the <strong>Format</strong> field set to its default value of <strong>.pdf</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/generate-document-action-name.png" alt="Configuring the Name field on the Generate Document action"/></p> <h3 id="create-file">Saving the Document to Azure File Storage</h3> <p>Once the document is generated, there are many ways to deliver it: send it by email, add it to SharePoint or OneDrive, upload it to an S3 bucket, and so on. For this tutorial, we’ll save it to <a href="https://learn.microsoft.com/en-us/connectors/azurefile/" target="_blank" rel="nofollow noopener">Azure File Storage</a>. Click the <strong>+</strong> button below the <strong>Generate Document</strong> action, search for “Create file,” and select the action from <strong>Azure File Storage</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/add-create-file-action.png" alt="Adding the Create file action from Azure File Storage"/></p> <p>Create a connection by providing a <strong>Connection name</strong>, your <strong>Azure Storage account name or file endpoint</strong>, and your <strong>Azure Storage Account Access Key</strong>, both of which are available from your storage account in the Azure portal.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/create-file-config.png" alt="Creating a connection to Azure File Storage"/></p> <p>With the connection in place, configure the <strong>Create file</strong> action:</p> <ul> <li><strong>Folder path</strong>: <code class="language-plaintext highlighter-rouge">/form-w-9</code>, the destination folder in the storage account.</li> <li><strong>File name</strong>: <code class="language-plaintext highlighter-rouge">outputs('Generate_Document')?['body/filename']</code>, the filename of the generated PDF.</li> <li><strong>File content</strong>: <code class="language-plaintext highlighter-rouge">outputs('Generate_Document')?['body/document_uri']</code>, the generated PDF URL.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/create-file-params.png" alt="Configuring the Create file action parameters"/></p> <h2 id="testing">Testing the Flow</h2> <p>To test the flow, click <strong>Test</strong> on the flow page, select <strong>Manually</strong>, then click <strong>Test</strong> again. Power Automate will display a message asking you to add a row to the selected sheet to trigger the run.</p> <p><img src="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/test-flow-manually.png" alt="Testing the flow manually from Power Automate"/></p> <p>Add a new row to the <strong>Form W-9</strong> sheet in Smartsheet with a fresh set of vendor details. Once the flow runs, the generated document appears in the <strong>Documents</strong> panel of the <strong>Form W-9</strong> template in DocuGenerate, and the PDF is saved to the specified folder in Azure File Storage. You can see an example of the <a href="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/Form W-9 Jessica Martinez.pdf">generated PDF</a> below.</p> <object data="/assets/posts/035-power-automate-form-w9/Form W-9 Jessica Martinez.pdf" type="application/pdf" class="inline-pdf-blog"></object> <h2 id="conclusion">Conclusion</h2> <p>This tutorial covered the full path from a row in Smartsheet to a ready-to-file W-9 PDF, using a Power Automate flow with no custom code involved. The trigger detects new vendor records as they’re entered, the <strong>Generate Document</strong> action fills in the official form layout with that row’s data, and the <strong>Create file</strong> action delivers the result to Azure File Storage automatically.</p> <p>The same three-step pattern (trigger, generate, deliver) works for any recurring document your team produces from spreadsheet or table data, whether that’s onboarding paperwork, invoices, or compliance forms. Because the DocuGenerate actions are available across the whole Power Platform, you could just as easily trigger this flow from a Power Apps form or a SharePoint list instead of a Smartsheet row, while keeping the same <strong>Generate Document</strong> configuration.</p> <h2 id="resources">Resources</h2> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/Form W-9.docx">Form W-9</a> Word template used in this tutorial.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/Form W-9 Data.xlsx">sample Excel file</a> with vendor data for import into Smartsheet.</li> <li>A <a href="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/Form W-9 Jessica Martinez.pdf">sample generated PDF</a> showing the final output.</li> <li>The <a href="https://learn.microsoft.com/en-us/connectors/smartsheet/" target="_blank" rel="nofollow noopener">Smartsheet connector reference</a> for Power Automate.</li> <li>The <a href="https://learn.microsoft.com/en-us/connectors/azurefile/" target="_blank" rel="nofollow noopener">Azure File Storage connector reference</a> for Power Automate.</li> <li>The <a href="https://learn.microsoft.com/en-us/connectors/docugenerate/" target="_blank" rel="nofollow noopener">DocuGenerate connector reference</a> for Power Automate.</li> <li>The official <a href="https://www.irs.gov/forms-pubs/about-form-w-9" target="_blank" rel="nofollow noopener">IRS Form W-9</a> and instructions.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Tax Forms"/> <category term="Power Platform"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to automatically generate Form W-9 documents whenever a new row is added in Smartsheet. This tutorial builds a Power Automate flow that merges vendor and contractor data with a DocuGenerate template to produce the form.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/035-power-automate-form-w9/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Organize Your Templates in Folders for Easy Access</title> <link href="https://www.docugenerate.com/blog/organize-your-templates-in-folders-for-easy-access/" rel="alternate" type="text/html" title="Organize Your Templates in Folders for Easy Access"/> <published>2026-06-15T00:00:00+00:00</published> <updated>2026-06-15T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/organize-your-templates-in-folders-for-easy-access</id> <content type="html" xml:base="https://www.docugenerate.com/blog/organize-your-templates-in-folders-for-easy-access/"><![CDATA[<h2 id="what-are-folders">What are Template Folders?</h2> <p>Template Folders bring a familiar organizational model to DocuGenerate, allowing you to group related templates together in a hierarchical structure. Whether you’re managing a handful of templates or hundreds, folders provide a clean, intuitive way to find what you need and keep your template library organized as it grows.</p> <p>Until now, all templates in your DocuGenerate account were displayed in a single flat list, sorted by creation date. With this new feature, we’re introducing a folder system that follows the conventions you already know from file managers and email clients, with arbitrary nesting depth, intuitive reorganization, and full support across both the <a href="#web-app-folders">web app</a> and the <a href="#api-folders">API</a>.</p> <h2 id="why-folders-matter">Why Folder Organization Matters</h2> <p>For organizations that rely on a growing library of templates, the absence of organizational structure can become a real productivity drag over time. As your template library grows from a few dozen to hundreds of templates, locating the right one becomes harder, onboarding new team members slows down, and templates drift apart from any logical structure that once existed in someone’s head.</p> <p><strong>1. Faster Template Discovery</strong><br/> With folders, you no longer need to scroll through a long list of templates or rely on partial name matching to find the right one. A well-organized folder hierarchy mirrors how your team actually thinks about templates, whether by department, by client, by document type, or by project phase.</p> <p><strong>2. Clearer Mental Model for Teams</strong><br/> When templates are organized into folders, the structure itself communicates intent. A new team member looking at your template library can quickly grasp how documents are categorized in your organization, reducing the need for explanations or onboarding documentation.</p> <p><strong>3. Filterable Views</strong><br/> Folders aren’t just visual containers. Selecting a folder filters the templates view to show only the templates inside it, giving you a focused workspace when you’re working within a specific category. The current folder is reflected in the page URL, so you can bookmark or share a filtered view.</p> <h2 id="web-app-folders">How Template Folders Work in the Web App</h2> <p>Folders are accessible throughout the app via the folder icon in the navbar. Clicking it opens the folder menu, which displays your folder tree and lets you create, edit, or delete folders directly. On mobile devices, the folder menu is available from the main user menu.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/folder-menu-v2.png" alt="Folder menu in the navbar"/></p> <h3 id="creating-folders">Creating a Folder</h3> <p>To <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-folder/">create a new folder</a>, click the <strong>New Folder</strong> icon next to the <strong>Template Folders</strong> header in the folder menu. A dialog opens where you can enter the folder name and optionally select a parent folder if you want to create the folder inside an existing one.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/new-folder-dialog-v2.png" alt="New folder dialog"/></p> <p>To <a href="https://www.docugenerate.com/help/articles/how-do-i-create-nested-folders/">create a sub-folder</a> directly from an existing folder, you can also use the <strong>Add</strong> action in the folder’s <a href="#managing-folders">context menu</a>, which pre-fills the parent selection for you. Folder names support letters, numbers, and spaces. Each folder gets a unique URL derived from its name, as described in the <a href="#filtering-by-folder">filtering section</a> below.</p> <h3 id="assigning-templates">Assigning Templates to Folders</h3> <p>You can <a href="https://www.docugenerate.com/help/articles/how-do-i-assign-a-template-to-a-folder/">assign a template to a folder</a> either when creating a new template or by editing an existing template’s settings. The folder dropdown in the template settings shows the full tree of available folders, with indentation reflecting the parent-child relationships.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/template-settings-folder.png" alt="Folder selection in template settings"/></p> <p>Each template belongs to a single folder at a time. To move a template to a different folder, you change the folder selection in the template settings and save. To remove a template from any folder, you select <strong>None</strong> in the folder dropdown.</p> <h3 id="filtering-by-folder">Filtering Templates by Folder</h3> <p>Selecting a folder in the folder menu <a href="https://www.docugenerate.com/help/articles/how-do-i-filter-templates-by-folder/">filters the templates view</a> to show only the templates within that folder. The page URL updates to reflect the current filter. This means you can bookmark a folder view, share the URL with a teammate, or open multiple browser tabs each focused on a different folder.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/filtered-view.png" alt="Templates filtered by folder"/></p> <p>The folder breadcrumb appears in the navbar, showing the full path of the selected folder. To return to the default view with all the templates, click the <strong>Clear Folder</strong> icon next to the breadcrumb or select <strong>All Templates</strong> in the folder menu.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/nested-folders.png" alt="Nested folders filtered view"/></p> <p>The folder a template belongs to is visible in both <a href="https://www.docugenerate.com/help/articles/how-do-i-toggle-view-options/">Grid and List views</a> of the templates page. In the <strong>Grid</strong> view, the folder name appears under the template title alongside a small folder icon. In the <strong>List</strong> view, a dedicated <strong>Folder</strong> column shows the same information. Clicking the folder name in either view filters the templates list to that folder.</p> <h3 id="managing-folders">Editing, Moving, and Deleting Folders</h3> <p>Each folder in the folder menu has a context menu with three actions: <strong>Edit</strong> to <a href="https://www.docugenerate.com/help/articles/how-do-i-edit-a-folder/">rename the folder</a> or change its parent, <strong>Delete</strong> to <a href="https://www.docugenerate.com/help/articles/how-do-i-delete-a-folder/">remove the folder</a> and all its sub-folders, and <strong>Add</strong> to create a new sub-folder inside it.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/folder-context-menu-v2.png" alt="Folder context menu"/></p> <p>When you delete a folder, all of its sub-folders are also removed. Templates inside deleted folders are not themselves deleted, they simply become orphaned and return to the <strong>All Templates</strong> view. This means deleting a folder is always a safe operation from the perspective of your template content.</p> <p>Moving a folder under a different parent is supported, with one safety guard: a folder cannot be moved into itself or any of its own descendants. The folder dialog automatically disables those options when you’re editing an existing folder, so the constraint is enforced visually before you can even attempt an invalid move.</p> <h2 id="team-folders">Folders for Team Collaboration</h2> <p>For users with the <a href="https://www.docugenerate.com/help/articles/introduction-to-team-collaboration/">team collaboration</a> feature, folder organization extends naturally to shared templates. Team members see their team owner’s folders in a dedicated <strong>Shared</strong> section within the folder menu, separated from their own folders by a visual divider.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/shared-folders.png" alt="Folder menu with personal and shared folders"/></p> <p>The visibility model is intentional: team members can browse and filter by the team owner’s shared folders, but they cannot create, rename, or delete folders in the team owner’s hierarchy. This keeps the folder structure consistent across the team and gives the owner clear ownership of how templates are organized for everyone.</p> <p>When a team member is added or removed, the folder structure reflects this change immediately, without requiring any action on the member’s part. Similarly, when the owner makes changes to their folder structure, those changes propagate to every team member’s view as soon as they’re saved.</p> <h2 id="api-folders">Folder Support in the API</h2> <p>For users who manage templates through the <a href="https://api.docugenerate.com/" target="_blank">DocuGenerate API</a>, folder organization is accessible through the same endpoints you already use. The folder a template belongs to is represented as a <code class="language-plaintext highlighter-rouge">folder</code> parameter on the template, expressed as an array of folder names that traces the path from the root to the assigned folder. For example, a template inside a sub-folder named “Contracts” within a parent folder named “Legal” has its <code class="language-plaintext highlighter-rouge">folder</code> field set to <code class="language-plaintext highlighter-rouge">["Legal", "Contracts"]</code>.</p> <h3 id="api-create-template">Specifying a Folder When Creating a Template</h3> <p>When <a href="https://api.docugenerate.com/#/Template/createTemplate" target="_blank">creating a template</a> via the API, you can include the <code class="language-plaintext highlighter-rouge">folder</code> parameter in your request to assign the template to a specific folder. If the folder path doesn’t yet exist in your account, DocuGenerate creates it automatically, including any intermediate folders along the way.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/api-create-template-v2.png" alt="Folder parameter when creating a template"/></p> <p>This auto-creation behavior makes it easy to set up your folder structure programmatically as you create templates, without needing to pre-configure the hierarchy through the web app first.</p> <h3 id="api-update-template">Moving Templates Between Folders</h3> <p>To move an existing template to a different folder, you can use the <a href="https://api.docugenerate.com/#/Template/updateTemplate" target="_blank">update template</a> endpoint with a new value for the <code class="language-plaintext highlighter-rouge">folder</code> parameter. Setting it to an empty array (<code class="language-plaintext highlighter-rouge">[]</code>) removes the template from any folder, returning it to the orphaned state.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/api-update-template.png" alt="Folder parameter when updating a template"/></p> <p>As with template creation, if the new folder path doesn’t exist yet, DocuGenerate creates the missing folders automatically (provided you’re the template owner). Team members with write permission on a shared template can update the template’s contents and settings, but they cannot create new folders in the template owner’s hierarchy, mirroring the <a href="#team-folders">web app behavior</a>.</p> <h3 id="api-list-templates">Filtering Templates by Folder</h3> <p>The <a href="https://api.docugenerate.com/#/Template/getTemplates" target="_blank">list templates</a> endpoint accepts a <code class="language-plaintext highlighter-rouge">folder</code> query parameter that filters the response to a specific folder. The parameter takes the same form as for the <a href="#api-create-template">creating</a> or <a href="#api-update-template">updating</a> a template, expressed as an array of folder names that traces the path from the root to the assigned folder.</p> <p><img src="https://www.docugenerate.com/assets/posts/034-template-folders/api-query-template.png" alt="Folder parameter when querying the templates"/></p> <p>This filter follows the same logic as the <a href="#filtering-by-folder">web app filtering</a>: selecting a folder returns only templates directly assigned to it, not templates from any sub-folders. To gather templates from a folder and all of its sub-folders, you’d issue separate requests for each sub-folder.</p> <h2 id="use-case-scenarios">Use Case Scenarios</h2> <p>Let’s explore some real-world scenarios where template folders can provide significant value.</p> <h3 id="scenario-departments">Scenario 1: Department-based Organization</h3> <p>A <strong>mid-sized company</strong> uses DocuGenerate to manage templates across multiple departments: HR, Legal, Sales, and Finance. With dozens of templates in each department, finding the right one had become time-consuming, and new hires struggled to locate the templates relevant to their role.</p> <p>After organizing templates into top-level folders by department, with sub-folders for specific document types (offer letters, contracts, proposals, invoices), team members can navigate directly to their department’s folder and see only the templates relevant to them. Shareable folder URLs are added to each team’s onboarding documentation, giving new hires a direct link to the templates they’ll be using from day one.</p> <h3 id="scenario-clients">Scenario 2: Client-based Organization for an Agency</h3> <p>A <strong>marketing agency</strong> generates personalized contracts, proposals, and reports for dozens of clients, each with their own branding and terms. Before folders, the agency’s team relied on a naming convention like <code class="language-plaintext highlighter-rouge">[client-name]_[document-type]</code> to locate templates, but this created long, hard-to-scan template names and made it difficult to onboard new account managers.</p> <p>By creating a top-level folder per client and organizing document types as sub-folders, the agency’s account managers can now browse a clean, hierarchical view of all materials for any given client. When onboarding a new client, the account manager creates a new client folder and replicates the standard sub-folder structure inside it.</p> <h3 id="scenario-api">Scenario 3: Programmatic Folder Setup via API</h3> <p>A <strong>document automation team</strong> integrates DocuGenerate into their internal tooling, generating templates programmatically from a database of document patterns. Their internal system organizes patterns by region and document category, and they want their DocuGenerate account to mirror that structure exactly.</p> <p>Using the API, their integration sends the appropriate <code class="language-plaintext highlighter-rouge">folder</code> parameter when creating each template, automatically building out a folder hierarchy that matches their internal taxonomy. This keeps their DocuGenerate account synchronized with their source-of-truth without any manual folder management in the web app, even as their pattern catalog evolves.</p> <h2 id="best-practices">Best Practices for Folder Organization</h2> <p>To get the most out of template folders as your library grows, consider these practices that help keep your structure useful and maintainable over time:</p> <ol> <li> <p><strong>Start with broad categories and refine as needed.</strong> Resist the temptation to create deep folder hierarchies from day one. Begin with a few top-level folders that match the highest-level distinctions in your workflow, and add sub-folders only when a category accumulates enough templates to justify subdivision.</p> </li> <li> <p><strong>Match folders to how your team thinks, not how your data is structured.</strong> A folder structure works best when it reflects the mental model your team already uses. If everyone refers to “Q1 contracts” rather than “January through March contracts”, let the folder name match the spoken vocabulary, even if it diverges from your internal naming standards.</p> </li> <li> <p><strong>Use shareable folder URLs for onboarding.</strong> When new team members join, share direct links to the folders they’ll be working with most often. This shortens the learning curve significantly and ensures everyone is aware of the relevant templates from the start.</p> </li> <li> <p><strong>Re-evaluate periodically.</strong> Folder structures that made sense a year ago may not match how your team works today. Schedule a periodic review (quarterly or semi-annually) to consolidate underused folders, split folders that have grown too large, or restructure entirely if your workflow has changed substantially.</p> </li> </ol> <h2 id="conclusion">Conclusion</h2> <p>Template Folders are one of the most-requested additions to DocuGenerate, and we’re glad to finally deliver an organizational model that scales with your template library. Whether you’re managing a small handful of templates or hundreds across multiple departments and clients, folders give you the structure and flexibility to find what you need and share it with your team.</p> <p>As always, we welcome your feedback as you start organizing your templates with this new feature. We’re particularly interested in hearing about workflows where folders save your team meaningful time, as well as any rough edges you encounter in real-world use that we should consider for future improvements.</p> <h3 id="resources">Resources</h3> <ul> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-folder/">How do I create a folder?</a></li> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-assign-a-template-to-a-folder/">How do I assign a template to a folder?</a></li> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-filter-templates-by-folder/">How do I filter templates by folder?</a></li> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-create-nested-folders/">How do I create nested folders?</a></li> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-edit-a-folder/">How do I edit a folder?</a></li> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-delete-a-folder/">How do I delete a folder?</a></li> <li><a href="https://api.docugenerate.com/#/Template/createTemplate" target="_blank">Create template</a> API documentation.</li> <li><a href="https://api.docugenerate.com/#/Template/updateTemplate" target="_blank">Update template</a> API documentation.</li> <li><a href="https://api.docugenerate.com/#/Template/getTemplates" target="_blank">List templates</a> API documentation.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Product Update"/> <category term="Web App"/> <category term="Templates"/> <summary type="html"><![CDATA[Folders bring a familiar, hierarchical organization model to your DocuGenerate templates, making it easier to group related templates as your library grows. Find out how to create and manage folders to keep your workspace organized.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/034-template-folders/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/034-template-folders/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Format Dates in Templates with Data Filters and Automatic Fields</title> <link href="https://www.docugenerate.com/blog/format-dates-in-templates-with-data-filters-and-automatic-fields/" rel="alternate" type="text/html" title="Format Dates in Templates with Data Filters and Automatic Fields"/> <published>2026-05-31T00:00:00+00:00</published> <updated>2026-05-31T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/format-dates-in-templates-with-data-filters-and-automatic-fields</id> <content type="html" xml:base="https://www.docugenerate.com/blog/format-dates-in-templates-with-data-filters-and-automatic-fields/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Dates appear in nearly every business document. Contracts specify effective dates, invoices carry due dates, certificates bear issuance dates, and recommendation letters are dated to establish their relevance. How those dates are presented matters, because date format conventions vary significantly by country and region. In the United States, the standard format is <code class="language-plaintext highlighter-rouge">MM/DD/YYYY</code>, while most of Europe and much of the rest of the world uses <code class="language-plaintext highlighter-rouge">DD/MM/YYYY</code>. Without control over date formatting, a date like December 4, 2026 could appear as <code class="language-plaintext highlighter-rouge">12/04/2026</code> to a US reader or <code class="language-plaintext highlighter-rouge">04/12/2026</code> to a European one, with each reading it correctly only for their own convention.</p> <p>DocuGenerate gives you two distinct ways to control how dates appear in your generated documents, each suited to a different use case. The first is the <code class="language-plaintext highlighter-rouge">date</code> filter, which formats a date value supplied by your data set and renders it in whatever output format you specify. The second is inserting the current date directly into the document template using Word or LibreOffice, so the field is populated with today’s date automatically at generation time.</p> <p>This article walks through both approaches using the <a href="https://www.docugenerate.com/assets/posts/033-date-formatting/Recommendation Letter.docx">Recommendation Letter</a> template from our <a href="https://www.docugenerate.com/templates/#letters">Template Library</a>. For each approach, we’ll show how to produce both US and European date formats, so you have a concrete reference regardless of which convention your documents follow.</p> <h2 id="date-filter">Formatting Dates from Your Data Set</h2> <p>When your data set contains date values, DocuGenerate’s <a href="https://www.docugenerate.com/help/articles/how-to-format-data-with-filters/#format-dates">date filter</a> gives you full control over how those dates appear in the generated document. This is the right approach when the date is a meaningful piece of data tied to a specific event, such as the signing date of a contract or the date a letter is formally addressed.</p> <p>The filter is part of the <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/">enhanced syntax</a> feature set, so you need to <a href="https://www.docugenerate.com/help/articles/how-do-i-enable-the-enhanced-syntax/">enable it</a> before it takes effect. To do that, open the template, go to <strong>Settings</strong>, check the <strong>Enable enhanced syntax</strong> checkbox, and click <strong>Save</strong>.</p> <h3 id="data-preparation">Preparing the Data</h3> <p>The <code class="language-plaintext highlighter-rouge">date</code> filter expects the input value to be in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="nofollow noopener">ISO 8601</a> format, specifically <code class="language-plaintext highlighter-rouge">yyyy-MM-dd</code>. This is an internationally recognized standard for representing dates that avoids the ambiguity of regional conventions. If your data currently stores dates in another format, you will need to convert them to the ISO format before passing them to DocuGenerate. The filter is ignored for non-ISO formatted dates, and the input value will be displayed as-is in the generated document.</p> <h3 id="updating-template">Updating the Template</h3> <p>The <a href="https://www.docugenerate.com/assets/posts/033-date-formatting/Recommendation Letter.docx">original template</a> uses the default DocuGenerate syntax with square bracket delimiters. When enhanced syntax is enabled, the tag parser is stricter and does not tolerate extra whitespace inside merge tags, so tags like <code class="language-plaintext highlighter-rouge">[Job Title]</code> need to become <code class="language-plaintext highlighter-rouge">[Job_Title]</code>. The <a href="https://www.docugenerate.com/assets/posts/033-date-formatting/Recommendation Letter with Date Filter.docx">updated template</a> has already been edited to have whitespace-free tags and is ready for use with enhanced syntax.</p> <p><img src="https://www.docugenerate.com/assets/posts/033-date-formatting/recommendation-letter-date-filter-template.png" alt="Recommendation Letter template with date filter merge tag"/></p> <h3 id="applying-filter">Applying the Date Filter</h3> <p>With enhanced syntax enabled, you can format the date directly inside the merge tag using the following syntax:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Date | date:'date_format']
</code></pre></div></div> <p>The <code class="language-plaintext highlighter-rouge">date_format</code> string uses symbols from the <a href="https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table" target="_blank" rel="nofollow noopener">Unicode Technical Standard</a> for date and time patterns. The two most commonly needed formats for US and European conventions are:</p> <table class="table table-bordered"> <thead> <tr> <th>Merge Tag</th> <th>Result</th> <th>Convention</th> </tr> </thead> <tbody> <tr> <td><code>[Date &#124; date:'MM/dd/yyyy']</code></td> <td>12/04/2026</td> <td>US (Month/Day/Year)</td> </tr> <tr> <td><code>[Date &#124; date:'dd/MM/yyyy']</code></td> <td>04/12/2026</td> <td>European (Day/Month/Year)</td> </tr> <tr> <td><code>[Date &#124; date:'MMMM d, yyyy']</code></td> <td>December 4, 2026</td> <td>Written month name</td> </tr> <tr> <td><code>[Date &#124; date:'dd-MM-yyyy']</code></td> <td>04-12-2026</td> <td>European with dashes</td> </tr> </tbody> </table> <p>The filter also supports more expressive formats if you need to show the full month name, include the day of the week, or add time components. For a complete list of formatting options and examples, see the <a href="https://www.docugenerate.com/help/articles/how-to-format-data-with-filters/#format-dates">How to format data with filters</a> article from our Help Center.</p> <h2 id="todays-date">Inserting Today’s Date in the Template</h2> <p>For documents where the date should always reflect the current date at generation time, passing a date through the data set is unnecessary. A recommendation letter, a daily status report, or an ad-hoc certificate typically just needs today’s date, and it would be redundant to include it in every API request or spreadsheet row. For these cases, you can insert a date field directly into the Word template. When DocuGenerate processes the document, the field evaluates and outputs the current date automatically, without any date value in the data at all.</p> <h3 id="word-date">Adding Today’s Date in Microsoft Word</h3> <p>Microsoft Word lets you insert the current date through the <a href="https://support.microsoft.com/en-US/Word/insert-today-s-date-in-a-word-document" target="_blank" rel="nofollow noopener">Date &amp; Time</a> field. This opens a dialog with a list of date and time formats and a checkbox labeled <strong>Update automatically</strong>. Selecting this option converts the static date into a live field that updates whenever the document is opened or processed.</p> <p><img src="https://www.docugenerate.com/assets/posts/033-date-formatting/word-insert-date-time-dialog.png" alt="Inserting today's date and time field in Microsoft Word"/></p> <p>The available formats in Word are predetermined and tied to the system’s regional settings. You can change the language from the drop-down menu and the available formats list is updated to match the selected language.</p> <p>If you want more control over the date format, you can choose to <strong>Insert a Field</strong> instead, and select the <strong>Date and Time</strong> category and the <strong>Date</strong> field name. Click on <strong>Options</strong> to select from a list of pre-defined date formats, or enter the desired format in the <strong>Field code</strong> text input. To get the same result and have the date formatted for the <strong>French</strong> language, you’ll need to use the <code class="language-plaintext highlighter-rouge">DATE \@ "dd/MM/yyyy"</code> value in the field code. But this requires familiarity with Word’s field syntax and is not practical for most users.</p> <p><img src="https://www.docugenerate.com/assets/posts/033-date-formatting/word-insert-field-dialog.png" alt="Inserting today's date field in Microsoft Word"/></p> <p>For a template built using this approach, see the <a href="https://www.docugenerate.com/assets/posts/033-date-formatting/Recommendation Letter with Today's Date in Word.docx">Word-specific template</a>, where the <code class="language-plaintext highlighter-rouge">[Date]</code> merge tag has been replaced with Word’s automatic date field set to the European format.</p> <h3 id="libreoffice-date">Adding Today’s Date in LibreOffice</h3> <p>LibreOffice Writer provides a more flexible way to insert today’s date, with locale-aware formatting that covers a wide range of regional date conventions. To insert a date field, go to <strong>Insert</strong> &gt; <strong>Field</strong> &gt; <strong>Date (variable)</strong>, which adds a date field to your document using a default format. Right-click on the newly inserted date and select <strong>Edit Fields</strong>, which opens the Fields dialog.</p> <p>In this dialog, the <strong>Format</strong> column on the right displays a list of predefined formats for the default system language. These defaults cover common patterns, but to access formats for different locales, click the <strong>Additional formats</strong> option.</p> <p><img src="https://www.docugenerate.com/assets/posts/033-date-formatting/libreoffice-fields-dialog.png" alt="Inserting a date field in LibreOffice using the Fields dialog"/></p> <p>This opens a new dialog where LibreOffice’s date formatting capability becomes particularly useful. A <strong>Language</strong> dropdown on the right side of the dialog lets you select from hundreds of language and locale combinations. Once you pick a language, the <strong>Format</strong> list updates to show date patterns that are natural to that locale.</p> <p>For example, selecting <strong>French (France)</strong> makes patterns like <code class="language-plaintext highlighter-rouge">JJ/MM/AAAA</code> available, which is the French notation for <code class="language-plaintext highlighter-rouge">DD/MM/YYYY</code>. You can also type a custom format code directly into the <strong>Format Code</strong> field if none of the listed options matches what you need.</p> <p>For a template built this way, see the <a href="https://www.docugenerate.com/assets/posts/033-date-formatting/Recommendation Letter with Today's Date in LibreOffice.docx">LibreOffice-specific template</a>. This approach is particularly practical when you maintain multiple variants of the same template for different regions. Each version can use the same content but have the date field configured for the target locale, ensuring the output matches local expectations without modifying the data or the generation workflow.</p> <h2 id="choosing-approach">Choosing the Right Approach</h2> <p>The two approaches address different scenarios and can both apply within the same organization depending on the document type. The <a href="#date-filter">date filter</a> is the right choice when the date is a meaningful data field tied to a specific event. A contract’s signing date, an invoice’s due date, or a letter’s reference date all belong in the data, and the filter lets you render them in whatever regional convention the recipient expects. Since it takes a single ISO 8601 input and formats it on output, you can serve US and European audiences with the same data by simply changing the format string in the template.</p> <p>Inserting <a href="#todays-date">today’s date</a> directly in the template is the right choice when no date value exists in the data and the document simply needs to be stamped with the current date. This keeps the data set clean and the generation request simple. Teams that generate documents for multiple regions often maintain a set of locale-specific templates, each with the date field pre-configured for its target audience, and point each regional workflow at the appropriate template.</p> <h2 id="conclusion">Conclusion</h2> <p>Getting dates to display correctly in generated documents comes down to identifying where the date value comes from. If it comes from your data set, use DocuGenerate’s filter with a format string that matches your target convention. If the document should always reflect today’s date, insert a date field into the template using Word or LibreOffice, for more advanced locale control. Both approaches work with the same template format and fit naturally into DocuGenerate’s generation workflow without requiring any changes to how documents are generated or delivered.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/033-date-formatting/Recommendation Letter with Date Filter.docx">Recommendation Letter</a> template configured for the date filter.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/033-date-formatting/Recommendation Letter with Today's Date in Word.docx">Recommendation Letter</a> template using Word’s automatic date field.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/033-date-formatting/Recommendation Letter with Today's Date in LibreOffice.docx">Recommendation Letter</a> template using LibreOffice’s date field.</li> <li>DocuGenerate’s Help Center article on <a href="https://www.docugenerate.com/help/articles/how-to-format-data-with-filters/">how to format data with filters</a>.</li> <li>Microsoft’s documentation on <a href="https://support.microsoft.com/en-US/Word/insert-today-s-date-in-a-word-document" target="_blank" rel="nofollow noopener">inserting today’s date in a Word document</a>.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Letters"/> <category term="Microsoft Word"/> <category term="Expressions"/> <summary type="html"><![CDATA[Controlling how dates appear in generated documents is one of the most common formatting challenges, especially when producing documents for different regions. This article covers two different approaches, with examples for both US and European date formats.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/033-date-formatting/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/033-date-formatting/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Mail Merge using DocuGenerate Compared to Microsoft Word</title> <link href="https://www.docugenerate.com/blog/mail-merge-using-docugenerate-compared-to-microsoft-word/" rel="alternate" type="text/html" title="Mail Merge using DocuGenerate Compared to Microsoft Word"/> <published>2026-04-22T00:00:00+00:00</published> <updated>2026-04-22T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/mail-merge-using-docugenerate-compared-to-microsoft-word</id> <content type="html" xml:base="https://www.docugenerate.com/blog/mail-merge-using-docugenerate-compared-to-microsoft-word/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Mail merge is the process of combining a document template with a data source to produce multiple personalized documents in one operation. It is commonly used for contracts, offer letters, invoices, certificates, and any other document where the overall structure stays the same but specific fields change per recipient or record. <a href="https://www.microsoft.com/en-us/microsoft-365/word" target="_blank" rel="nofollow noopener">Microsoft Word</a> has included mail merge as a built-in feature for decades, making it a familiar starting point for many teams already working in the Microsoft 365 ecosystem. Dedicated document generation platforms like <a href="https://www.docugenerate.com/">DocuGenerate</a> approach the same problem differently: cloud-based processing, a REST API, and a set of template features that extend well beyond what Word supports natively.</p> <p>In this article, we evaluate both approaches using the same template and data file so the results are directly comparable. We walk through each workflow from start to finish, then examine how the two tools handle specific features including output formats, bulk generation, dynamic filenames, conditional content, images, and QR codes. The goal is not to pick a universal winner but to give you a clear picture of where each tool fits so you can choose the right one for your workflow.</p> <h2 id="sample-files">The Sample Files</h2> <p>To keep the comparison grounded, both workflows in this article use the same two files. The template is the <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contract.docx">Employment Contract.docx</a> Word document from our <a href="https://www.docugenerate.com/templates/#contracts">Template Library</a>. It contains merge fields for employee details, contract dates, compensation, and other standard contract terms.</p> <p><img src="https://www.docugenerate.com/assets/posts/032-word-mail-merge/employment-contract-template.png" alt="Employment Contract template with merge tags"/></p> <p>The data source is the matching <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contract.xlsx">Employment Contract.xlsx</a> spreadsheet, where each row represents one employee and the column headers correspond exactly to the merge field names in the template.</p> <p><img src="https://www.docugenerate.com/assets/posts/032-word-mail-merge/employment-contract-data.png" alt="Employment Contract data spreadsheet"/></p> <p>One thing to note is that the column names in the spreadsheet must match the merge tag names in the template exactly for either tool to work correctly. This is a requirement shared by both Word and DocuGenerate, and it applies regardless of which delimiter format is used.</p> <h2 id="word-mail-merge">Mail Merge in Microsoft Word</h2> <p>Word’s mail merge is accessible from the <a href="https://support.microsoft.com/en-us/office/use-mail-merge-for-bulk-email-letters-labels-and-envelopes-f488ed5b-b849-4c11-9cff-932c49474705" target="_blank" rel="nofollow noopener">Mailings tab</a>, which provides a structured workflow for connecting a template to a data source, inserting fields, previewing the output, and completing the merge. All of this happens locally within the Word application.</p> <h3 id="word-data-source">Connecting the Excel Data Source</h3> <p>To begin a mail merge, open the Employment Contract template in Word and navigate to <strong>Mailings</strong> &gt; <strong>Select Recipients</strong> &gt; <strong>Use an Existing List</strong>. Word will prompt you to select a file. After selecting <code class="language-plaintext highlighter-rouge">Employment Contract.xlsx</code>, a dialog appears asking you to <a href="https://support.microsoft.com/en-us/office/mail-merge-using-an-excel-spreadsheet-858c7d7f-5cc0-4ba1-9a7b-0a948fa3d7d3" target="_blank" rel="nofollow noopener">choose which sheet</a> to use as the data source, which is useful when your workbook contains multiple tabs.</p> <p><img src="https://www.docugenerate.com/assets/posts/032-word-mail-merge/word-select-recipients.png" alt="Selecting the Excel data source in Word"/></p> <p>With the data source connected, Word reads the column headers and makes them available as merge fields throughout the session. You can also open <strong>Edit Recipient List</strong> to filter records, sort them, or exclude specific rows before running the merge.</p> <p>One thing to be aware of: when saving the Word template after connecting it to an Excel file, it stores the path to that file inside the document. If the Excel file is later moved, renamed, or deleted, reopening the template will trigger an error saying <em>“Word cannot find its data source”</em>. It will then prompt you to locate the file again or remove the data source link entirely. This linking behavior means the template and data file need to stay in sync, which can become a maintenance concern when sharing templates across a team.</p> <h3 id="word-merge-fields">Inserting the Merge Fields</h3> <p>Once the data source is connected, you can place merge fields anywhere in the template using <strong>Mailings</strong> &gt; <strong>Insert Merge Field</strong>. Word wraps each field in its fixed <code class="language-plaintext highlighter-rouge">«Field_Name»</code> delimiter format, using guillemet characters that are inserted through the interface rather than typed directly. This delimiter format is not configurable: all Word mail merge fields use <code class="language-plaintext highlighter-rouge">«»</code> and cannot be changed to another character pair.</p> <p><img src="https://www.docugenerate.com/assets/posts/032-word-mail-merge/word-insert-merge-fields.gif" alt="Inserting Merge Fields in the Word template"/></p> <p>Note that Word replaces the spaces in the column names with underscores when creating the field names for the merge. So the column named <code class="language-plaintext highlighter-rouge">Contract Date</code> in the spreadsheet becomes <code class="language-plaintext highlighter-rouge">«Contract_Date»</code> in the merge field list. This works fine in Word, but it’s useful to keep that in mind if you want to use the same template in DocuGenerate, for example, because the column names in Excel will no longer match the merge tags exactly.</p> <h3 id="preview-results">Previewing the Results</h3> <p>The <strong>Preview Results</strong> button on the <strong>Mailings</strong> tab replaces each merge field with the corresponding value from the first row of data. Navigation arrows let you step through the remaining records to spot-check the output before committing to the full merge. This instant preview is one of Word’s most useful features for template development.</p> <p><img src="https://www.docugenerate.com/assets/posts/032-word-mail-merge/word-preview-results.gif" alt="Previewing merge results in Word"/></p> <h3 id="word-complete-merge">Completing the Merge</h3> <p>With the template verified, <strong>Finish &amp; Merge</strong> offers three options: edit the merged documents in a new Word file, send directly to a printer, or send as individual email messages via Outlook. Selecting <strong>Edit Individual Documents</strong> produces a single Word file where each merged record is separated by a page break.</p> <p><img src="https://www.docugenerate.com/assets/posts/032-word-mail-merge/word-finish-merge.png" alt="Completing the mail merge in Word"/></p> <p>You can download a copy of the <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contract Merged.docx">merged document</a> to see what the output looks like. To get a PDF, you need to save or export that file manually after it was generated.</p> <p>Word does not generate individual files per record as part of the merge process. The entire workflow is desktop-only: there is no API, no cloud processing, and no way to trigger a mail merge programmatically from another application.</p> <h2 id="docugenerate">Mail Merge in DocuGenerate</h2> <p>DocuGenerate is a cloud-based document generation platform that works from a <a href="https://www.docugenerate.com/document-generation/">web app</a> and a <a href="https://www.docugenerate.com/pdf-generation-api/">REST API</a>. The template remains a standard DOCX file, so you can design and edit it in Word as usual. The generation step happens in the cloud and produces the final document without requiring any local software beyond a browser or an HTTP client.</p> <h3 id="docugenerate-template">Setting Up the Template</h3> <p>To get started, upload the Employment Contract template from the <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">New Template</a> page in the web app. DocuGenerate reads the <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> from the document and uses them as the fields to populate at generation time.</p> <p>The merge tags can use square brackets <code class="language-plaintext highlighter-rouge">[]</code> as <a href="https://www.docugenerate.com/help/articles/what-are-tag-delimiters/">delimiters</a>, but it’s also possible to <a href="https://www.docugenerate.com/help/articles/how-do-i-update-the-tag-delimiters/">customize the delimiters</a> to any character pair you prefer, including the Word-style <code class="language-plaintext highlighter-rouge">«»</code> guillemets if you want to reuse an existing Word mail merge template without modifying it.</p> <p><img src="https://www.docugenerate.com/assets/posts/032-word-mail-merge/docugenerate-employment-contract-v2.png" alt="Employment Contract template in DocuGenerate"/></p> <h3 id="docugenerate-excel">Generating from Excel</h3> <p>To <a href="https://www.docugenerate.com/help/articles/generate-documents-from-an-excel-or-csv-file/">generate documents from Excel</a>, click <strong>New Document</strong> on the template, choose the <strong>Excel or CSV file</strong> option, and upload <code class="language-plaintext highlighter-rouge">Employment Contract.xlsx</code>. DocuGenerate detects the sheets in the workbook and lets you choose which one to use. As with Word, the column names in the spreadsheet must match the merge tag names in the template exactly for the generation to succeed.</p> <p>From the <strong>Data Items</strong> section, you can select which records to use for the merge by clicking on them. By default, all the records in the spreadsheet are used for generating the documents.</p> <p><img src="https://www.docugenerate.com/assets/posts/032-word-mail-merge/docugenerate-generate-from-excel.gif" alt="Employment Contracts generation in batch in DocuGenerate"/></p> <p>The <a href="https://www.docugenerate.com/help/articles/select-the-merge-export-format/">merge export format</a> can be a Word document, matching Word’s native output, or a PDF generated directly in the cloud. For multiple records, you can either <a href="https://www.docugenerate.com/help/articles/combine-the-generated-documents-into-a-single-file/">combine all documents</a> into a single file (see <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contracts.docx">Employment Contracts.docx</a> for an example) or download them as <a href="https://www.docugenerate.com/help/articles/generate-separate-documents-for-each-data-item/">separate files</a> grouped in a ZIP archive (see <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contracts.zip">Employment Contracts.zip</a>).</p> <h3 id="docugenerate-api">Generating via the API</h3> <p>DocuGenerate also exposes an API that lets you trigger document generation from any external system. When generating from an Excel file <a href="https://api.docugenerate.com/#/Document/generateDocument" target="_blank">via the API</a>, you pass the <code class="language-plaintext highlighter-rouge">file</code> as a parameter, and optionally the <code class="language-plaintext highlighter-rouge">sheet</code> parameter to specify which tab to use. While the web app supports row range selection, the API processes all rows in the selected sheet by default. This makes it possible to integrate document generation into automation workflows and back-end applications that need to produce documents automatically.</p> <h2 id="comparison">Feature Comparison</h2> <p>With both workflows covered, here is a closer look at how Word and DocuGenerate handle specific features that matter most in document generation workflows. You can click on each feature in the table below to jump directly to its details.</p> <table class="table table-bordered"> <thead> <tr> <th>Feature</th> <th>Word</th> <th>DocuGenerate</th> </tr> </thead> <tbody> <tr> <td><a href="#comparison-delimiters">Delimiters</a></td> <td>❌ Fixed</td> <td>✅ Customizable</td> </tr> <tr> <td><a href="#comparison-preview">Preview</a></td> <td>✅ Instant in-app preview</td> <td>❌ Requires generating a document</td> </tr> <tr> <td><a href="#comparison-output">PDF export</a></td> <td>❌ Only via manual save</td> <td>✅ Yes</td> </tr> <tr> <td><a href="#comparison-bulk">Bulk generation</a></td> <td>✅ Single merged Word file</td> <td>✅ Single combined file or individual files grouped in a ZIP</td> </tr> <tr> <td><a href="#comparison-filenames">Dynamic filenames</a></td> <td>❌ No</td> <td>✅ Yes, using merge tags</td> </tr> <tr> <td><a href="#comparison-api">API access</a></td> <td>❌ No</td> <td>✅ Yes</td> </tr> <tr> <td><a href="#comparison-email">Email delivery</a></td> <td>✅ Yes, via Outlook</td> <td>❌ No, possible via automation tools</td> </tr> <tr> <td><a href="#comparison-conditions">Conditions</a></td> <td>✅ Yes, via Rules</td> <td>✅ Yes, including enhanced expressions</td> </tr> <tr> <td><a href="#comparison-images">Images</a></td> <td>✅ Local files only</td> <td>✅ By URL or Base64, with size control</td> </tr> <tr> <td><a href="#comparison-qr">QR codes and barcodes</a></td> <td>✅ Yes, via field codes</td> <td>✅ Yes, with rendering options</td> </tr> <tr> <td><a href="#comparison-append">Append PDF</a></td> <td>❌ No</td> <td>✅ Yes</td> </tr> </tbody> </table> <h3 id="comparison-delimiters">Delimiters</h3> <p>Word requires the <code class="language-plaintext highlighter-rouge">«»</code> guillemet characters as merge field delimiters. These are inserted through the Word interface and cannot be typed or changed to another format. DocuGenerate lets you <a href="https://www.docugenerate.com/help/articles/how-do-i-update-the-tag-delimiters/">set any delimiters</a> in the template settings, making it easy to migrate an existing Word template or match a format your team already uses.</p> <h3 id="comparison-preview">Preview</h3> <p>Word’s <strong>Preview Results</strong> button shows the populated document instantly, which makes it easy to iterate on the template during development without generating a file every time. DocuGenerate does not have an equivalent in-app preview. To see the output, you generate a document. For templates under active development, this adds a small feedback loop compared to Word, though the generated file is typically available in a few seconds.</p> <h3 id="comparison-output">PDF export</h3> <p>Word’s mail merge produces a Word document as its primary output. Converting to PDF requires saving or exporting the file separately, and the process does not create individual PDF files per record automatically. DocuGenerate can <a href="https://www.docugenerate.com/help/articles/select-the-merge-export-format/">generate both</a> DOCX and PDF output directly.</p> <h3 id="comparison-bulk">Bulk Generation</h3> <p>Both tools support generating multiple documents from a spreadsheet in one pass. Word assembles all merged records into a single Word file with page breaks between records. DocuGenerate gives you more control: you can <a href="https://www.docugenerate.com/help/articles/combine-the-generated-documents-into-a-single-file/">combine all documents</a> into a single output file or produce individual files grouped in a ZIP archive.</p> <h3 id="comparison-filenames">Dynamic Filenames</h3> <p>Word does not support dynamic filenames for merged output. DocuGenerate lets you use merge tags in the <a href="https://www.docugenerate.com/help/articles/set-the-documents-name-and-file-name/">document name</a>, so each generated file can be named using values from the data row, such as the employee’s full name or contract start date. This makes the output immediately organized without any manual renaming after the merge.</p> <h3 id="comparison-api">API Access</h3> <p>Word mail merge has no API and cannot be triggered from outside the Word application. DocuGenerate provides a REST API that integrates with external systems, making it possible to generate documents programmatically as part of a back-end application, or an automation platform.</p> <h3 id="comparison-email">Email Delivery</h3> <p>Word supports sending merged documents as individual email messages directly through Outlook, which is useful for bulk outreach or internal communications. DocuGenerate does not have built-in email delivery, but it can be combined with email tools through automation platforms like <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-zapier/">Zapier</a>, <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-make/">Make</a>, <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-n8n/">n8n</a>, or <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-power-apps/">Power Automate</a> to achieve the same result as part of a larger workflow.</p> <h3 id="comparison-conditions">Conditions</h3> <p>Both tools support conditional content inside templates. Word provides <a href="https://support.microsoft.com/en-gb/office/set-the-rules-for-a-mail-merge-d546ee7e-ab7a-4d6d-b488-41f9e4bd1409" target="_blank" rel="nofollow noopener">Rules</a> such as <code class="language-plaintext highlighter-rouge">IF...THEN...ELSE</code>, available under <strong>Mailings</strong> &gt; <strong>Rules</strong>, which let you show or hide content based on field values. DocuGenerate uses a <a href="https://www.docugenerate.com/help/articles/how-to-add-conditions-to-a-template/">condition tag syntax</a> written directly in the template body. With <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/">enhanced syntax</a> enabled, DocuGenerate also supports logical expressions, comparisons, and arithmetic in conditions, which goes beyond the rule set available in Word.</p> <h3 id="comparison-images">Images</h3> <p>Word allows dynamic images in mail merge, but the images must be stored locally on the machine running the merge and configured through field codes, which makes the setup difficult to reproduce or automate. DocuGenerate supports images referenced by <a href="https://www.docugenerate.com/help/articles/how-to-add-images-to-a-template/">URL or Base64</a>, which works reliably in cloud-based workflows where images are hosted externally. You can also control image dimensions directly in the merge tag using the <code class="language-plaintext highlighter-rouge">size</code> filter, making layout control straightforward without touching the document structure.</p> <h3 id="comparison-qr">QR Codes and Barcodes</h3> <p>Word supports <a href="https://support.microsoft.com/en-us/office/field-codes-mergebarcode-812fc43f-cb53-4782-8f9f-290ed08d34f3" target="_blank" rel="nofollow noopener">barcodes and QR codes</a> via the <code class="language-plaintext highlighter-rouge">MergeBarCode</code> and <code class="language-plaintext highlighter-rouge">DisplayBarcode</code> field codes, though the syntax is not straightforward and visual customization options are limited. DocuGenerate has a dedicated <a href="https://www.docugenerate.com/help/articles/how-to-add-qr-codes-and-barcodes/">QR code and barcode</a> syntax that converts any field value into a QR code or barcode with configurable dimensions, colors, and formatting directly from the merge tag.</p> <h3 id="comparison-append">Append PDF</h3> <p>Word does not natively support appending additional PDF content to a merged output file. DocuGenerate lets you <a href="https://www.docugenerate.com/help/articles/merge-a-pdf-at-the-end-of-generated-documents/">append a static PDF file</a> at the end of each generated document, which is useful for contracts that need to include standard terms and conditions, legal notices, or fixed annexes as part of every output.</p> <h2 id="conclusion">Conclusion</h2> <p>For teams that work entirely within the Microsoft 365 desktop environment and need to produce merged documents without involving any external systems, Word’s built-in mail merge covers the basics well. It handles field substitution, conditional rules, and direct email delivery through Outlook, all without requiring a separate tool.</p> <p>DocuGenerate is a better fit when document generation needs to participate in a larger workflow. Its API makes it usable from automation platforms, back-end systems, and no-code tools, and features like PDF output, dynamic filenames, and PDF appending cover scenarios that Word mail merge cannot address natively. For teams already using Word to design templates, the transition is minimal because the templates have the same format.</p> <p>The choice between the two comes down to where the generation step sits in your process. If it is a one-off task performed on a desktop, Word is already available and sufficient. If it is a recurring, automated step in a business workflow, a dedicated tool like DocuGenerate provides the flexibility to connect document generation to your existing systems.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contract.docx">Employment Contract.docx</a> Word template used in this article.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contract.xlsx">Employment Contract.xlsx</a> sample data file.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contract Merged.docx">Employment Contract Merged.docx</a> merged output from Word.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/032-word-mail-merge/Employment Contracts.zip">Employment Contracts.zip</a> with dynamic filenames from DocuGenerate.</li> <li>Microsoft’s documentation on <a href="https://support.microsoft.com/en-us/office/use-mail-merge-for-bulk-email-letters-labels-and-envelopes-f488ed5b-b849-4c11-9cff-932c49474705" target="_blank" rel="nofollow noopener">mail merge for letters and bulk documents</a>.</li> <li>Microsoft’s guide on <a href="https://support.microsoft.com/en-us/office/mail-merge-using-an-excel-spreadsheet-858c7d7f-5cc0-4ba1-9a7b-0a948fa3d7d3" target="_blank" rel="nofollow noopener">using an Excel spreadsheet</a> as a mail merge data source.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Contracts"/> <category term="Microsoft Word"/> <category term="Mail Merge"/> <summary type="html"><![CDATA[Mail merge has been around for decades, and Microsoft Word still offers it as a built-in feature. But how does it compare to a dedicated document generation platform like DocuGenerate? Find out in this side-by-side analysis of both solutions.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/032-word-mail-merge/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/032-word-mail-merge/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Generate Property Listings with n8n and DocuGenerate</title> <link href="https://www.docugenerate.com/blog/generate-property-listings-with-n8n-and-docugenerate/" rel="alternate" type="text/html" title="Generate Property Listings with n8n and DocuGenerate"/> <published>2026-03-13T00:00:00+00:00</published> <updated>2026-03-13T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/generate-property-listings-with-n8n-and-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/generate-property-listings-with-n8n-and-docugenerate/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Real estate agencies and property management companies regularly produce listing documents for new properties, whether for print, email campaigns, or client portals. Assembling these documents manually, from gathering agent details and writing descriptions to sourcing photos and formatting everything consistently, takes time that could be spent elsewhere. In this tutorial, we’ll build an automated workflow using <a href="https://n8n.io/" target="_blank" rel="nofollow noopener">n8n</a>, <a href="https://www.anthropic.com/claude" target="_blank" rel="nofollow noopener">Claude</a>, and <a href="https://www.docugenerate.com/">DocuGenerate</a> that produces a polished, ready-to-share property listing PDF in a matter of seconds.</p> <p>The workflow uses the Anthropic node in n8n, which calls Claude to generate realistic listing data on demand, and merges it into a professionally designed Word template via DocuGenerate. The finished PDF is then downloaded and saved directly to a Dropbox folder. While this tutorial uses Claude to simulate data input, the same workflow can be connected to any real data source: a web form, a CRM, a property database, or a spreadsheet. The document generation and delivery steps remain identical regardless of where the data comes from, making this a solid foundation for real-world automation. By the end of this guide, you’ll have a fully functional n8n workflow that you can import and adapt to your own use case.</p> <h2 id="template-setup">Setting Up the Property Listing Template</h2> <p>Before building the n8n workflow, we need a document template in DocuGenerate. For this tutorial, we’ll use the <a href="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/Property Listing.docx">Property Listing</a> Word template, which features a clean real estate layout with a large hero image at the top, a row of three interior photos, key property details, a QR code linking to the listing page, and an agent card at the bottom.</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/property-listing-template.png" alt="Property Listing template with merge tags"/></p> <p>The template uses the following <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a>:</p> <ul> <li><code class="language-plaintext highlighter-rouge">agent_photo</code>, <code class="language-plaintext highlighter-rouge">agent_name</code>, <code class="language-plaintext highlighter-rouge">agent_email</code>, <code class="language-plaintext highlighter-rouge">agent_phone</code>, <code class="language-plaintext highlighter-rouge">agent_address</code>: Agent contact details displayed in the footer card.</li> <li><code class="language-plaintext highlighter-rouge">price</code>: Displayed prominently next to the heading.</li> <li><code class="language-plaintext highlighter-rouge">surface</code>, <code class="language-plaintext highlighter-rouge">bedrooms</code>, <code class="language-plaintext highlighter-rouge">bathrooms</code>, <code class="language-plaintext highlighter-rouge">kitchens</code>: Key property stats shown in the details row.</li> <li><code class="language-plaintext highlighter-rouge">description</code>: A short paragraph describing the property, displayed below the headline section.</li> <li><code class="language-plaintext highlighter-rouge">main_image</code>, <code class="language-plaintext highlighter-rouge">image1</code>, <code class="language-plaintext highlighter-rouge">image2</code>, <code class="language-plaintext highlighter-rouge">image3</code>: Property photos embedded in the layout.</li> <li><code class="language-plaintext highlighter-rouge">url</code>: Converted into a QR code displayed in the top-right corner of the document.</li> </ul> <p>Several features of this template are worth highlighting in more detail:</p> <ul> <li> <p><strong>Image sizing.</strong> The hero image uses the <code class="language-plaintext highlighter-rouge">[%main_image | size:'auto':600]</code> <a href="https://www.docugenerate.com/help/articles/how-to-add-images-to-a-template/#resizing-images">size syntax</a> to constrain its height to 600 pixels while preserving the aspect ratio. The three interior photos use <code class="language-plaintext highlighter-rouge">[%image1 | size:240:'auto']</code> to fix their width at 240 pixels, keeping all three images the same size and aligned in a row. Images can be passed as either a public URL or a base64-encoded data URI.</p> </li> <li> <p><strong>QR code.</strong> The <code class="language-plaintext highlighter-rouge">url</code> field is not displayed as plain text. Instead, the template uses the <code class="language-plaintext highlighter-rouge">[%url | qrcode:60:60 | set:'barcolor':'#2f7498']</code> syntax to render the value as a <a href="https://www.docugenerate.com/help/articles/how-to-add-qr-codes-and-barcodes/#adding-qr-codes">QR code</a> with custom dimensions and a brand color matching the document theme. Scanning the code in the generated PDF takes the reader directly to the property listing page online.</p> </li> <li> <p><strong>Pluralization.</strong> The stats row uses <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/#logical-and-mathematical-expressions">conditional syntax</a> to handle pluralization automatically. For example, the bedroom count is written as <code class="language-plaintext highlighter-rouge">[bedrooms] Bedroom[#bedrooms &gt; 1]s[/]</code> in the template, which outputs “1 Bedroom” or “3 Bedrooms” depending on the value of the <code class="language-plaintext highlighter-rouge">bedrooms</code> field. The same pattern applies to <code class="language-plaintext highlighter-rouge">bathrooms</code> and <code class="language-plaintext highlighter-rouge">kitchens</code>.</p> </li> </ul> <p>All three of these features rely on DocuGenerate’s <a href="https://www.docugenerate.com/help/articles/how-do-i-enable-the-enhanced-syntax/">enhanced syntax</a>, which must be enabled for the template before generating documents. You can turn it on in the template settings in the web app.</p> <h2 id="workflow-overview">The n8n Workflow Overview</h2> <p>In this workflow, we’ll use Claude to generate dummy listing data so the process can be demonstrated end-to-end without requiring a live database or external system. In a real deployment, the manual trigger and <strong>Message a model</strong> node would be replaced by a trigger and <a href="#real-world-data-sources">data source</a> that reflects your actual process.</p> <p>The complete workflow consists of several nodes connected in a linear sequence:</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/complete-workflow-v2.png" alt="The complete n8n workflow"/></p> <p>You can download the <a href="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/Property Listing Workflow.json" target="_blank">workflow JSON file</a> and import it directly into your n8n instance. You’ll need to update the DocuGenerate template ID, your API credentials, and the Dropbox destination path to match your own setup. Let’s go through each node in detail.</p> <h2 id="claude-node">Generating Listing Data with Claude</h2> <p>The first functional node is the <strong>Message a model</strong> node from the Anthropic integration, configured to use the <code class="language-plaintext highlighter-rouge">claude-sonnet-4-6</code> model. Its role in this workflow is to produce a realistic set of property listing values that can be passed to DocuGenerate. To use this node, you’ll need an Anthropic account and an API Key generated from the <a href="https://console.anthropic.com/" target="_blank" rel="nofollow noopener">Anthropic Console</a>, which you add as a credential in n8n when setting up the node for the first time.</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/anthropic-api-key.png" alt="API Key configuration for the Anthropic node" class="desktop-width-75"/></p> <p>The prompt includes the full JSON structure that the template expects, with most fields left empty for Claude to fill in. The <code class="language-plaintext highlighter-rouge">agent_photo</code> field is pre-filled with a URL pattern from <a href="https://randomuser.me/" target="_blank" rel="nofollow noopener">randomuser.me</a>, a free service that returns a realistic portrait photo for a given numeric ID. Claude is instructed to replace <code class="language-plaintext highlighter-rouge">&lt;AGENT_ID&gt;</code> with a random integer between 1 and 50, producing a different agent photo on each run.</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/message-a-model-node.png" alt="Message a model node configuration"/></p> <p>Here is the full prompt used in the node:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Can you generate dummy values for the following JSON? The &lt;AGENT_ID&gt; needs to be an integer from 1 to 50.
The description needs to be around 400 characters. The output needs to be just the updated JSON.

{
  "agent_photo": "https://randomuser.me/api/portraits/women/&lt;AGENT_ID&gt;.jpg",
  "agent_address": "",
  "agent_phone": "",
  "agent_email": "",
  "agent_name": "",
  "description": "",
  "kitchens": "",
  "bathrooms": "",
  "bedrooms": "",
  "surface": "",
  "price": "",
  "url": "https://www.docugenerate.com/blog/generate-property-listings-with-n8n-and-docugenerate/",
  "main_image": "https://images.pexels.com/photos/1571459/pexels-photo-1571459.jpeg",
  "image1": "https://images.pexels.com/photos/2062431/pexels-photo-2062431.jpeg?w=400",
  "image2": "https://images.pexels.com/photos/2089698/pexels-photo-2089698.jpeg?w=400",
  "image3": "https://images.pexels.com/photos/164595/pexels-photo-164595.jpeg?w=400"
}
</code></pre></div></div> <p>The four image fields are left as static <a href="https://www.pexels.com/" target="_blank" rel="nofollow noopener">Pexels</a> URLs for simplicity. In a real-world scenario, these would be actual photos of the property fetched from a media library, a CRM attachment, or a cloud storage bucket. The <code class="language-plaintext highlighter-rouge">url</code> field points to this blog post and will be rendered as a QR code in the final document.</p> <p>Claude returns the completed JSON wrapped in a markdown code block. The response from the <strong>Message a model</strong> node has the following structure:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
  </span><span class="p">{</span><span class="w">
    </span><span class="nl">"content"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"text"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"```json</span><span class="se">\n</span><span class="s2">{</span><span class="se">\n</span><span class="s2">  </span><span class="se">\"</span><span class="s2">agent_name</span><span class="se">\"</span><span class="s2">: </span><span class="se">\"</span><span class="s2">Sarah Mitchell</span><span class="se">\"</span><span class="s2">,</span><span class="se">\n</span><span class="s2">  </span><span class="se">\"</span><span class="s2">price</span><span class="se">\"</span><span class="s2">: </span><span class="se">\"</span><span class="s2">$485,000</span><span class="se">\"</span><span class="s2">,</span><span class="se">\n</span><span class="s2">  ...</span><span class="se">\n</span><span class="s2">}</span><span class="se">\n</span><span class="s2">```"</span><span class="w">
      </span><span class="p">}</span><span class="w">
    </span><span class="p">]</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div> <p>The actual listing data is nested inside <code class="language-plaintext highlighter-rouge">content[0].text</code> and wrapped in markdown fences, which means it cannot be used directly by the next node. That is what the Code node in the <a href="#code-node">following step</a> handles.</p> <h2 id="code-node">Parsing the Claude Response</h2> <p>The <strong>Code in JavaScript</strong> node extracts the JSON object from Claude’s response and exposes it as clean, structured data for the rest of the workflow. This step is necessary for two reasons: the <strong>Message a model</strong> node returns the full API response object rather than just the text content, and Claude tends to wrap its JSON output in markdown code fences even when instructed not to. Rather than relying on prompt engineering to fix this inconsistency, the Code node handles it reliably every time.</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/code-node.png" alt="Code in JavaScript node configuration"/></p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">text</span> <span class="o">=</span> <span class="nx">$input</span><span class="p">.</span><span class="nf">first</span><span class="p">().</span><span class="nx">json</span><span class="p">.</span><span class="nx">content</span><span class="p">[</span><span class="mi">0</span><span class="p">].</span><span class="nx">text</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">json</span> <span class="o">=</span> <span class="nx">text</span><span class="p">.</span><span class="nf">replace</span><span class="p">(</span><span class="sr">/```json</span><span class="se">\n?</span><span class="sr">/</span><span class="p">,</span> <span class="dl">''</span><span class="p">).</span><span class="nf">replace</span><span class="p">(</span><span class="sr">/</span><span class="se">\n?</span><span class="sr">```/</span><span class="p">,</span> <span class="dl">''</span><span class="p">).</span><span class="nf">trim</span><span class="p">();</span>
<span class="k">return</span> <span class="p">{</span> <span class="na">json</span><span class="p">:</span> <span class="nx">JSON</span><span class="p">.</span><span class="nf">parse</span><span class="p">(</span><span class="nx">json</span><span class="p">)</span> <span class="p">};</span>
</code></pre></div></div> <p>The first line reads the text value from Claude’s response. The second line strips the markdown code fences using two regular expressions. The third line parses the cleaned string into a JavaScript object and returns it as the node output. After this step, all the listing fields (<code class="language-plaintext highlighter-rouge">agent_name</code>, <code class="language-plaintext highlighter-rouge">price</code>, <code class="language-plaintext highlighter-rouge">bedrooms</code>, etc.) are available as top-level keys in the item’s JSON, ready to be passed directly to DocuGenerate.</p> <h2 id="generate-document">Generating the Document</h2> <p>The <strong>Generate document</strong> node uses the <a href="https://n8n.io/integrations/docugenerate/" target="_blank" rel="noopener">DocuGenerate integration</a> for n8n to merge the listing data with the Word template and produce a PDF. To use this node, install DocuGenerate in your n8n instance and <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-n8n/#install-docugenerate">configure it</a> with your <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/generate-document-node.png" alt="Generate document node configuration"/></p> <p>The node is configured with the following parameters:</p> <ul> <li><strong>Template Name or ID</strong>: The <strong>Property Listing</strong> template uploaded in the <a href="#template-setup">template setup</a> step.</li> <li><strong>Name</strong>: An n8n expression that generates a dynamic document name: <code class="language-plaintext highlighter-rouge">Property Listing for {{ $json.price }} ({{ $json.surface }})</code>. This produces a filename like <code class="language-plaintext highlighter-rouge">Property Listing for $485,000 (1,850 sq ft)</code> that makes each document easy to identify.</li> <li><strong>Format</strong>: Set to <code class="language-plaintext highlighter-rouge">PDF (.pdf)</code>.</li> <li><strong>Data</strong>: Set to <code class="language-plaintext highlighter-rouge">{{ $json }}</code>, which passes the entire output of the Code node as the data payload. Since the Code node already produces a flat JSON object with all the template fields at the top level, no additional mapping is needed.</li> </ul> <p>When the node runs successfully, the response contains, among others, a <code class="language-plaintext highlighter-rouge">document_uri</code> field with a URL pointing to the generated PDF, and a <code class="language-plaintext highlighter-rouge">filename</code> field with the document’s filename.</p> <h2 id="http-request">Downloading the Generated PDF</h2> <p>DocuGenerate returns a URL to the generated document rather than the binary file content directly. To upload the PDF to Dropbox in the next step, we first need to fetch the file from that URL. The <strong>HTTP Request</strong> node handles this by making a GET request to the <code class="language-plaintext highlighter-rouge">document_uri</code> returned by the <a href="#generate-document">Generate document</a> node.</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/http-request-node.png" alt="HTTP Request node configuration"/></p> <p>The <strong>URL</strong> parameter is set to <code class="language-plaintext highlighter-rouge">{{ $json.document_uri }}</code>, referencing the document URL from the previous step. The binary file data is then available to the Dropbox node for upload.</p> <h2 id="dropbox-upload">Saving the PDF to Dropbox</h2> <p>The final node uploads the generated PDF to a designated Dropbox folder using the <a href="https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.dropbox/" target="_blank" rel="nofollow noopener">Dropbox node</a> in n8n, giving the team immediate access to the new listing document.</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/dropbox-node.png" alt="Upload a file node configuration"/></p> <p>The node uses OAuth2 authentication connected to your Dropbox account. The <strong>File Path</strong> parameter is set to <code class="language-plaintext highlighter-rouge">/n8n/Property Listings/{{ $json.filename }}</code>, saving each document in the <code class="language-plaintext highlighter-rouge">/n8n/Property Listings/</code> folder using the filename returned by DocuGenerate. The <strong>Binary File</strong> option is enabled so the node reads the file content from the HTTP Request node’s output rather than a static path.</p> <p>Once the workflow completes, the generated PDF is available in Dropbox and looks like this. You can also download a <a href="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/Property Listing for $875,000 (2,450 sq ft).pdf" target="_blank">sample PDF</a> to see the final result.</p> <p><img src="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/sample-property-listing.png" alt="Sample generated property listing PDF"/></p> <h2 id="real-world-data-sources">Real-World Data Sources</h2> <p>The current workflow uses Claude as a convenient stand-in for a real data source, but in practice, property listing data rarely comes from an AI model. It typically lives in a form submission, a CRM record, a database row, or a spreadsheet. Since the document generation and delivery steps stay the same regardless of where the data originates, swapping out the Anthropic node for a different trigger and data source is all it takes to turn this tutorial workflow into a production-ready automation. Below are some common scenarios this workflow is well-suited for.</p> <h3 id="data-source-forms">Web Forms</h3> <p>Many agencies use online forms to collect property details from listing agents before preparing marketing materials. A form tool like Jotform, Typeform, or Tally can capture fields such as address, price, number of rooms, surface area, and a description directly from the agent. When a new submission arrives, the form platform can trigger the n8n workflow via a webhook, passing all collected data straight into the document generation step. This makes property listing creation a natural follow-up to the intake process, with no manual data transfer required.</p> <h3 id="data-source-crm">CRM Systems</h3> <p>Real estate businesses that manage their inventory in a CRM such as Salesforce, HubSpot, or Pipedrive can trigger document generation whenever a property record reaches a certain pipeline stage, for example when it is marked as “Ready to publish” or “New listing”. The workflow would pull the relevant fields from the CRM record, merge them into the template, and either save the PDF back to the record or deliver it to the assigned agent by email. This keeps the listing document in sync with the CRM data and eliminates duplicate data entry.</p> <h3 id="data-source-databases">Databases and Spreadsheets</h3> <p>Teams that manage their property inventory in a database such as PostgreSQL, Airtable, or Notion, or in a spreadsheet like Google Sheets or Excel, can query new or updated records on a schedule or in response to a row being added. n8n has native nodes for all of these platforms, making it straightforward to read a row, map the columns to the template fields, and generate a PDF for each property. This approach works particularly well for agencies that add multiple listings at once and want to generate all documents in a single automated run.</p> <h2 id="conclusion">Conclusion</h2> <p>In this tutorial, we built an n8n workflow that generates a property listing PDF automatically. The workflow uses Claude to simulate a realistic data input, parses the response into structured JSON, merges the data with a professionally designed Word template, and saves the resulting PDF to Dropbox. The template demonstrates several advanced DocuGenerate features including image sizing with filters, QR code generation, and automatic pluralization via conditional syntax.</p> <p>In a real deployment, the Anthropic node would be replaced by a connection to your actual data source, whether that is a web form, a CRM, a database, or a spreadsheet. The document generation and delivery steps remain the same, making this workflow straightforward to adapt to almost any property management setup.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/Property Listing.docx">Property Listing</a> Word template.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/Property Listing Workflow.json" target="_blank">workflow JSON file</a> that you can import into your n8n instance.</li> <li>A <a href="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/Property Listing for $875,000 (2,450 sq ft).pdf" target="_blank">sample generated PDF</a> showing the final output.</li> <li>The DocuGenerate <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-n8n/">integration guide</a> for n8n.</li> <li>Photos provided by <a href="https://www.pexels.com/" target="_blank" rel="nofollow noopener">Pexels</a> for the property images.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Property Listings"/> <category term="n8n"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to build an automated property listing workflow with n8n, Claude, and DocuGenerate. Use Claude to generate realistic listing data on demand, merge it into a professionally designed Word template, and save the resulting PDF directly to Dropbox.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/031-n8n-property-listings/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">How to Generate Business Letters in Coda with DocuGenerate</title> <link href="https://www.docugenerate.com/blog/how-to-generate-business-letters-in-coda-with-docugenerate/" rel="alternate" type="text/html" title="How to Generate Business Letters in Coda with DocuGenerate"/> <published>2026-02-25T00:00:00+00:00</published> <updated>2026-02-25T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/how-to-generate-business-letters-in-coda-with-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/how-to-generate-business-letters-in-coda-with-docugenerate/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Business letters are a staple of professional communication, whether you’re sending client proposals, formal notifications, or outreach campaigns. Writing each letter individually is repetitive and error-prone, and the problem compounds quickly when you have a long list of recipients. In this tutorial, we’ll show how to use <a href="https://coda.io/" target="_blank" rel="nofollow noopener">Coda</a> and <a href="https://www.docugenerate.com/">DocuGenerate</a> together to generate personalized PDF business letters directly from a table, with a single button click per row.</p> <p>Coda is a flexible workspace that combines documents and spreadsheets into a single platform, making it easy to build interactive tools with tables, buttons, and custom formulas. The <a href="https://www.docugenerate.com/integrations/coda/#pack">DocuGenerate Pack</a> extends Coda with document generation capabilities, letting you produce professional PDFs from Word templates without writing any code. Each row in a Coda table becomes a personalized document, populated with the values from that row’s columns.</p> <p>By the end of this guide, you’ll have a Coda document with a table of recipients and a <strong>Generate</strong> button that produces a personalized PDF business letter for each person. The generated files are saved directly into a <strong>PDF</strong> column in the table, ready to be downloaded or shared.</p> <h2 id="template-setup">Setting Up the Business Letter Template</h2> <p>Before working in Coda, we need a document template in DocuGenerate. We’ll use the <a href="https://www.docugenerate.com/assets/posts/030-coda-business-letters/Business Letter.docx">Business Letter</a> Word file from our <a href="https://www.docugenerate.com/templates/">Template Library</a>, which is a professionally formatted letter ready for immediate use.</p> <p>The template contains <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> for <code class="language-plaintext highlighter-rouge">Date</code>, <code class="language-plaintext highlighter-rouge">Name</code>, <code class="language-plaintext highlighter-rouge">Job Title</code>, <code class="language-plaintext highlighter-rouge">Company Name</code>, <code class="language-plaintext highlighter-rouge">Street Address</code>, <code class="language-plaintext highlighter-rouge">City</code>, <code class="language-plaintext highlighter-rouge">State</code>, <code class="language-plaintext highlighter-rouge">Zip Code</code>, <code class="language-plaintext highlighter-rouge">Email</code>, and <code class="language-plaintext highlighter-rouge">Phone</code>. These tags act as placeholders that get replaced with actual data when a document is generated.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/business-letter-template.png" alt="Business Letter template with merge tags"/></p> <p>Once you’ve downloaded the Word file, <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">upload it</a> to your DocuGenerate account to create a new template. The merge tags will be detected automatically, and you can preview the result on the template page before moving on.</p> <h2 id="import-data">Importing the Data into Coda</h2> <p>The Business Letter template in the Template Library comes with a matching <a href="https://www.docugenerate.com/assets/posts/030-coda-business-letters/Business Letter.xlsx">Excel dataset</a> that contains sample recipient data aligned with all the template’s merge tags. Each row represents one recipient, and each column maps directly to one of the merge tags in the letter.</p> <p>To bring this data into Coda, open the <code class="language-plaintext highlighter-rouge">Business Letter.xlsx</code> file in Excel or any spreadsheet application, select the entire table including the header row, and copy it. Then open your Coda document, click in an empty area of the page, and paste. Coda will recognize the tabular structure and create a new table from the clipboard data automatically, preserving all column names and values.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/business-letter-table-import.png" alt="Pasting the Business Letter dataset into a Coda table"/></p> <h2 id="add-columns">Adding the Generate and PDF Columns</h2> <p>With the data in place, we need to add two columns to the table: one for the generate button and one for storing the output file. Click the <strong>+</strong> icon at the end of the table header row to add the first new column.</p> <p>Select <strong>Button</strong> as the column type, then choose <strong>New</strong> to create a blank button configuration. Once the column appears, rename it to <strong>Generate</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/new-column-generate-button-v2.png" alt="Adding a Button column to the table"/></p> <p>Repeat the same process to add a second column. This time, select <strong>File</strong> as the column type and rename the column to <strong>PDF</strong>. This column will hold the generated PDF file for each row after the button is clicked.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/new-column-pdf-file-v2.png" alt="Adding a File column to the table"/></p> <p>The table should now display all the original data columns along with the two new ones at the end.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/business-letter-table-new-columns-v2.png" alt="Business Letter table with the Generate and PDF columns added"/></p> <h2 id="install-pack">Installing the DocuGenerate Pack</h2> <p>To connect the table to DocuGenerate, we need to add the <a href="https://coda.io/packs/docugenerate-47041" target="_blank" rel="noopener">DocuGenerate Pack</a> to the Coda document. Click <strong>Insert</strong> in the top-right corner of the Coda editor and search for <strong>DocuGenerate</strong> in the Packs search box.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/install-docugenerate-pack.png" alt="Searching for the DocuGenerate Pack in the Insert panel"/></p> <p>Select <strong>DocuGenerate</strong> from the results and click <strong>Add to doc for free</strong> to install the Pack.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/add-to-doc-for-free-button.png" alt="Adding the DocuGenerate Pack to the Coda document"/></p> <p>Once installed, the Pack’s building blocks will become available in your document: the <strong>Templates</strong> table, the <strong>Documents</strong> table, the <strong>Generate Document</strong> button action, and the <strong>DataStructure</strong> formula.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/docugenerate-pack-installed.png" alt="DocuGenerate Pack building blocks available in Coda"/></p> <p>To complete the setup, open the <strong>Settings</strong> tab next to <strong>Building blocks</strong>, click <strong>Select an account</strong>, and then <strong>Add a new account</strong>. Enter your <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key">API Key</a> from your DocuGenerate account in the <strong>API token</strong> field and click <strong>Continue</strong>. Your DocuGenerate account is now connected and the Pack is ready to use.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/docugenerate-select-account.png" alt="Connecting a DocuGenerate account in Coda Pack settings"/></p> <h2 id="configure-button">Configuring the Generate Document Button</h2> <p>With the Pack installed, we can configure the <strong>Generate</strong> column to call DocuGenerate when clicked. Click the column header menu for the <strong>Generate</strong> column and select <strong>Edit column</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/edit-column-generate-v2.png" alt="Opening the Edit column panel for the Generate column"/></p> <p>In the <strong>On click</strong> action section, scroll down to the <strong>Packs</strong> category at the bottom of the action list, find <strong>DocuGenerate</strong>, and select the <strong>Generate Document</strong> action.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/add-generate-document-action-v2.png" alt="Selecting the Generate Document action from the DocuGenerate Pack"/></p> <p>Click <strong>+ Connect an account</strong> and select the DocuGenerate account you configured in the <a href="#install-pack">previous section</a>. With the account connected, you can now fill in the action parameters.</p> <h3 id="template-selection">Template Selection</h3> <p>From the <strong>Template</strong> dropdown, select the <strong>Business Letter</strong> template you uploaded to DocuGenerate in the <a href="#template-setup">template setup</a> step.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/select-business-letter-template-v2.png" alt="Selecting the Business Letter template in the Generate Document action"/></p> <h3 id="document-name-and-format">Document Name and Format</h3> <p>For the <strong>Name</strong> field, you can leave it empty to use a default name, or set a dynamic value to make it easier to identify each file. Coda’s <a href="https://coda.io/formulas#Format" target="_blank" rel="nofollow noopener">Format formula</a> is a good fit here. For example, <code class="language-plaintext highlighter-rouge">=Format("Letter for {1}", thisRow.Name)</code> names each document after the recipient.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/generate-button-name-formula.gif" alt="Using the Format formula to set a dynamic document name"/></p> <p>Leave <strong>Format</strong> set to <code class="language-plaintext highlighter-rouge">.pdf</code> to produce PDF files, which is the most commonly used format for sharing documents.</p> <h3 id="dynamic-data">Dynamic Data Values</h3> <p>For the <strong>Data</strong> field, we need to provide a JSON object that maps the merge tag names in the template to the corresponding column values in the current row. Coda’s <a href="https://coda.io/resources/guides/intro-to-codas-formula-syntax" target="_blank" rel="nofollow noopener">Object formula</a> is the most direct way to build this mapping:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Object(
  "Name", thisRow.Name,
  "Job Title", thisRow.[Job Title],
  "Company Name", thisRow.[Company Name],
  "Street Address", thisRow.[Street Address],
  "City", thisRow.City,
  "State", thisRow.State,
  "Zip Code", thisRow.[Zip Code],
  "Email", thisRow.Email,
  "Phone", thisRow.Phone,
  "Date", thisRow.Date
)
</code></pre></div></div> <p>Each key in the <code class="language-plaintext highlighter-rouge">Object</code> call is a merge tag name from the template, and each value references the matching column in the current row using <code class="language-plaintext highlighter-rouge">thisRow</code>. Column names that contain spaces must be wrapped in square brackets, as shown with <code class="language-plaintext highlighter-rouge">thisRow.[Job Title]</code> and <code class="language-plaintext highlighter-rouge">thisRow.[Company Name]</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/data-object-formula.png" alt="Configuring the Data parameter with the Object formula"/></p> <p>For templates with more complex or nested data, the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-coda/#data-structure-formula">DataStructure formula</a> included with the DocuGenerate Pack is a useful alternative. It generates the expected JSON structure for any template automatically, with numbered placeholders that you can fill in using the <code class="language-plaintext highlighter-rouge">Format</code> formula.</p> <h3 id="result-pdf-column">Result PDF Column</h3> <p>Finally, set the <strong>Results column</strong> to the <strong>PDF</strong> column added earlier. This instructs Coda to store the generated file in that column after the button is clicked. You can also customize the button’s appearance in the <strong>Style</strong> section by setting a label, choosing a color, and picking an icon.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/configure-visual-ui-button.gif" alt="Customizing the button label, color, and icon"/></p> <h2 id="generate-documents">Generating the Documents</h2> <p>With the configuration complete, click the <strong>Generate</strong> button in any row to trigger document generation for that recipient. DocuGenerate will use the row’s data to fill in the merge tags in the template and return a PDF file. Coda then imports the file into its storage and displays it in the <strong>PDF</strong> column for that row. The entire process takes a few seconds, so expect a brief delay before the file appears.</p> <p>You can click <strong>Generate</strong> for multiple rows in quick succession without waiting for each document to finish. DocuGenerate processes the requests concurrently, so all documents are generated in parallel. The number of documents you can process at the same time depends on your plan’s <a href="https://www.docugenerate.com/help/articles/is-there-a-concurrent-documents-limit/">concurrent documents limit</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/030-coda-business-letters/generate-multiple-documents-v3.gif" alt="Generating multiple business letters from the Coda table"/></p> <h2 id="conclusion">Conclusion</h2> <p>In this tutorial, we built a Coda document that generates personalized PDF business letters from a table of recipient data using the DocuGenerate Pack. The workflow covers uploading a Word template to DocuGenerate, importing the recipient data into Coda, adding the <strong>Generate</strong> button and <strong>PDF</strong> columns, and wiring up the <strong>Generate Document</strong> action to map data from each row to the template’s merge tags. Once the setup is in place, generating a letter for any recipient takes a single button click.</p> <p>The same pattern applies to any document type you want to produce from tabular Coda data. Invoices, contracts, offer letters, and certificates all follow the same structure: a Word template with merge tags, a table with the corresponding data, and a button to trigger the process. You can extend this further by combining it with other Coda automations, such as generating documents automatically when a new row is added, or sending the generated files to recipients via email.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/030-coda-business-letters/Business Letter.docx">Business Letter</a> Word template and <a href="https://www.docugenerate.com/assets/posts/030-coda-business-letters/Business Letter.xlsx">Excel dataset</a> used in this tutorial.</li> <li>The <a href="https://coda.io/packs/docugenerate-47041" target="_blank" rel="nofollow noopener">DocuGenerate Pack on Coda</a> for adding document generation to your Coda docs.</li> <li>The <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-coda/">Coda integration guide</a> in the Help Center, including setup instructions and formula references.</li> <li>Official <a href="https://coda.io/formulas" target="_blank" rel="nofollow noopener">Coda formula reference</a> for formulas used in this tutorial.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Letters"/> <category term="Coda"/> <category term="No-Code"/> <summary type="html"><![CDATA[Generate personalized PDF business letters directly from a Coda table using the DocuGenerate Pack. This tutorial walks through importing table data, setting up a button to create documents, and saving generated files into a column with a single click per row.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/030-coda-business-letters/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/030-coda-business-letters/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Automate PDF Certificate Generation with FlowRunner</title> <link href="https://www.docugenerate.com/blog/automate-pdf-certificate-generation-with-flowrunner/" rel="alternate" type="text/html" title="Automate PDF Certificate Generation with FlowRunner"/> <published>2026-01-21T00:00:00+00:00</published> <updated>2026-01-21T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/automate-pdf-certificate-generation-with-flowrunner</id> <content type="html" xml:base="https://www.docugenerate.com/blog/automate-pdf-certificate-generation-with-flowrunner/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Certificates are a common output in many business processes, from training completion records to achievement awards and event participation confirmations. Manually creating individual certificates for each recipient is tedious and error-prone, especially when dealing with dozens or hundreds of records. In this tutorial, we’ll build an automated workflow using <a href="https://flowrunner.ai/" target="_blank" rel="nofollow noopener">FlowRunner</a> and <a href="https://www.docugenerate.com/">DocuGenerate</a> that generates PDF certificates every time a new record is added to a database table.</p> <p><a href="https://docs.flowrunner.ai/" target="_blank" rel="nofollow noopener">FlowRunner</a> is part of the <a href="https://backendless.com/" target="_blank" rel="nofollow noopener">Backendless</a> platform and makes it easy to create intelligent workflows with just a few clicks. It orchestrates automated workflows that combine AI agents, human decision-making, and system integrations. Both technical and non-technical users can build workflows. Non-technical users work through the visual interface while technical users can leverage custom code and advanced integrations.</p> <p>The workflow we’ll create listens for new records in a Backendless database table, generates a personalized PDF certificate using DocuGenerate, saves the generated file in the Backendless File Service, and updates the original database record with a link to the PDF file. By the end of this guide, you’ll have a fully functional certificate automation pipeline that you can adapt for any document type.</p> <h2 id="certificate-template">Setting Up the Certificate Template</h2> <p>Before building the FlowRunner workflow, we need to prepare the certificate template in DocuGenerate. To keep things simple, we’ll use the ready-made <a href="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/Certificate of Achievement.doc">Certificate of Achievement</a> from our <a href="https://www.docugenerate.com/templates/">Template Library</a>. This is a standard certificate layout with merge tags for <code class="language-plaintext highlighter-rouge">Company Name</code>, <code class="language-plaintext highlighter-rouge">Name</code>, <code class="language-plaintext highlighter-rouge">Course Name</code>, <code class="language-plaintext highlighter-rouge">Diploma Title</code>, and <code class="language-plaintext highlighter-rouge">Certificate Date</code>. You can customize the template by modifying the design, adjusting the layout, or adding other <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> to match your organization’s branding and requirements.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/certificate-template.png" alt="Certificate of Achievement template with merge tags"/></p> <p>Once you’ve downloaded the template file, <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">upload it</a> to your DocuGenerate account. After the upload is complete, take note of the <a href="https://www.docugenerate.com/help/articles/how-do-i-get-the-template-id/">template ID</a> displayed on the template page, as you’ll need it when configuring the document generation step in the workflow.</p> <h2 id="create-table">Creating the Participants Table</h2> <p>Next, we need a database table in Backendless to store the data used for generating certificates. Navigate to the <strong>Database</strong> section of your Backendless app and create a new table called <code class="language-plaintext highlighter-rouge">Participants</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/create-table-participants.png" alt="Creating the Participants table in Backendless" class="desktop-width-75"/></p> <p>Add the following columns to the table:</p> <ul> <li><code class="language-plaintext highlighter-rouge">Certificate Date</code> (DATETIME): The date to be printed on the certificate.</li> <li><code class="language-plaintext highlighter-rouge">Certificate URL</code> (STRING): Stores the URL of the generated certificate file. This column will be populated automatically by the workflow.</li> <li><code class="language-plaintext highlighter-rouge">Company Name</code> (STRING): The name of the company or organization issuing the certificate.</li> <li><code class="language-plaintext highlighter-rouge">Course Name</code> (STRING): The name of the course or program the participant completed.</li> <li><code class="language-plaintext highlighter-rouge">Diploma Title</code> (STRING): The title of the diploma or achievement being awarded.</li> <li><code class="language-plaintext highlighter-rouge">Name</code> (STRING): The participant’s full name.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/database-table-schema-v2.png" alt="Database table schema for the Participants table"/></p> <p>The <code class="language-plaintext highlighter-rouge">Certificate URL</code> column starts empty for each new record. The workflow will fill it in automatically with the URL of the generated PDF after the entire flow completes, providing a direct link back to the certificate from the database.</p> <h2 id="database-trigger">Configuring the Database Trigger</h2> <p>With the table in place, head over to the <strong>FlowRunner Designer</strong> page and create a new flow called “Certificate of Achievement Flow”. The first element we need is a trigger that starts the flow whenever a new participant record is created. In the <strong>Triggers</strong> panel, select the <strong>Record Created in Database</strong> trigger from the <strong>Data Service</strong> category.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/record-created-in-database.png" alt="Adding the Record Created in Database trigger"/></p> <p>The trigger configuration is straightforward. Select the <code class="language-plaintext highlighter-rouge">Participants</code> table in the <strong>Table or View</strong> dropdown and set <strong>Reference Trigger Data As</strong> to <code class="language-plaintext highlighter-rouge">Participant</code>. You can leave all other fields at their default values.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/configure-record-created.png" alt="Configuring the Record Created in Database trigger"/></p> <p>This means that every time a new row is inserted into the <code class="language-plaintext highlighter-rouge">Participants</code> table, the flow will execute and the record data will be accessible as the <code class="language-plaintext highlighter-rouge">Participant</code> object throughout the remaining steps.</p> <h2 id="generate-document">Generating the Document</h2> <p>With the trigger in place, we can add the document generation step. Find the <a href="https://flowrunner.ai/integrations/docugenerate" target="_blank" rel="nofollow noopener">DocuGenerate extension</a> and select the <strong>Generate Document</strong> action. This action will execute every time the trigger fires, generating a new certificate based on the participant’s data.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/generate-document-action.png" alt="Adding the Generate Document action from DocuGenerate"/></p> <p>Configure the action with the following parameters:</p> <ul> <li><strong>Template ID</strong>: The ID of the template you uploaded to DocuGenerate in the <a href="#certificate-template">earlier step</a>.</li> <li><strong>Name</strong>: Use the Expression input to create a dynamic name by concatenating the text <code class="language-plaintext highlighter-rouge">Certificate for </code> with the <code class="language-plaintext highlighter-rouge">Participant -&gt; Name</code> value.</li> <li><strong>Output Name</strong>: Leave empty, the generated file will use the document name.</li> <li><strong>Output Format</strong>: Set to <code class="language-plaintext highlighter-rouge">.pdf</code> to produce a PDF file.</li> <li><strong>Data</strong>: Use the Expression input to construct the JSON data object (explained below).</li> </ul> <p>Finally, set <strong>Reference Result Data As</strong> to <code class="language-plaintext highlighter-rouge">Document</code> and leave the remaining parameters unchanged.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/generate-document-config.png" alt="Generate Document action configuration"/></p> <p>The <strong>Data</strong> parameter requires a JSON array that maps each merge tag in the template to the corresponding value from the <code class="language-plaintext highlighter-rouge">Participant</code> record. FlowRunner’s Expression input lets you combine static text with dynamic block results to construct this JSON at runtime. You alternate between Text Inputs (for the JSON structure and key names) and Block Results (to reference the <code class="language-plaintext highlighter-rouge">Participant</code> object’s properties). The resulting expression produces a value equivalent to:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[{</span><span class="w">
  </span><span class="nl">"Company Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Participant -&gt; Company Name"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Participant -&gt; Name"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Course Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Participant -&gt; Course Name"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Diploma Title"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Participant -&gt; Diploma Title"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Certificate Date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Participant -&gt; Certificate Date"</span><span class="w">
</span><span class="p">}]</span><span class="w">
</span></code></pre></div></div> <p>The screenshot below shows the Expression input with all the text and reference blocks assembled. Each key in the JSON object corresponds to a merge tag in the certificate template, and each value is dynamically pulled from the participant’s database record.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/data-expression-input.png" alt="Expression input for constructing the Data parameter"/></p> <h2 id="save-file">Saving the File to Backendless</h2> <p>Now that the document generation step is configured, we can continue building the workflow by saving the generated PDF certificate to the Backendless File Service. In the <strong>Extensions</strong> panel, go to <strong>Backendless File Services</strong> and select the <strong>Add To File</strong> action. This action appends content to an existing file, and can also create a new file from a remote URL using the <strong>Content From URL</strong> field.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/add-to-file-action.png" alt="Adding the Add To File action"/></p> <p>Configure the action with the following body parameters:</p> <ul> <li><strong>Directory Path</strong>: Set to <code class="language-plaintext highlighter-rouge">certificates</code> to save all generated files in a dedicated folder.</li> <li><strong>File Name</strong>: Use the expression <code class="language-plaintext highlighter-rouge">Document -&gt; filename</code> to name the file based on the document generated in the <a href="#generate-document">previous step</a>.</li> <li><strong>Content From URL</strong>: Use <code class="language-plaintext highlighter-rouge">Document -&gt; document_uri</code> to download the generated PDF from DocuGenerate.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/add-to-file-config-v2.png" alt="Add To File action configuration"/></p> <p>Don’t forget to set <strong>Reference Result Data As</strong> to <code class="language-plaintext highlighter-rouge">File</code>. The <code class="language-plaintext highlighter-rouge">File</code> object will contain a <code class="language-plaintext highlighter-rouge">fileURL</code> property that we’ll use in the next step to store the file’s location back in the database.</p> <h2 id="update-record">Updating the Database Record</h2> <p>For the final step of the workflow, we need to update the original <code class="language-plaintext highlighter-rouge">Participants</code> record with the URL of the saved certificate. This creates a direct link between each participant’s database entry and their generated certificate, making it easy to retrieve or display the file later, whether from a web application, a report, or directly from the database table.</p> <p>In the <strong>Actions</strong> panel, go to <strong>Data Service</strong> and select the <a href="https://docs.flowrunner.ai/reference/save-record-action.html" target="_blank" rel="nofollow noopener">Save Record In Database</a> action. This action stores or updates data in your Backendless database when executed and can be placed at any point in the workflow to ensure timely data updates in response to specific events or actions.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/save-record-in-database-action.png" alt="Adding the Save Record In Database action"/></p> <p>To configure the action, select the <strong>Update record from flow</strong> option and choose <strong>Use data from</strong> the <code class="language-plaintext highlighter-rouge">Participant</code> object. In the <strong>Perform Changes</strong> section, select the <code class="language-plaintext highlighter-rouge">Certificate URL</code> property and enter the <code class="language-plaintext highlighter-rouge">File -&gt; fileURL</code> value. This writes the URL of the file we saved in the <a href="#save-file">previous step</a> back into the participant’s record. Optionally, you can set the <strong>Reference Result Data As</strong> to <code class="language-plaintext highlighter-rouge">Record</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/save-record-in-database-config-v2.png" alt="Save Record In Database action configuration"/></p> <h2 id="testing">Testing the Workflow</h2> <p>With all four steps in place, the workflow is complete and ready for an end-to-end test. The flow follows a clear sequence: a new database record triggers document generation, the generated PDF is saved to Backendless file storage, and the record is updated with the file URL.</p> <p>To <a href="https://docs.flowrunner.ai/flow-execution/overview.html" target="_blank" rel="nofollow noopener">start the flow</a>, click the <strong>Play</strong> button in the FlowRunner Designer. Note that once a flow is running, you cannot make changes to it, but you can stop it at any time and update the configuration if needed.</p> <p>There are multiple ways to test the workflow, and one of the easiest ways is to use the <strong>REST Console</strong> in the <code class="language-plaintext highlighter-rouge">Participants</code> table. For example, we can run a <strong>POST</strong> request with the following request body:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"Company Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Wikivu"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Brandtr Lusk"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Course Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Property-Casualty Insurers"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Diploma Title"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Food Chemist"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Certificate Date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"7/12/2024"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div> <p>The response body confirms that a new record has been created in the database. Within moments, the workflow executes and generates the certificate.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/test-rest-console.png" alt="Testing the flow with the REST Console"/></p> <p>As expected, the generated <a href="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/Certificate for Brandtr Lusk.pdf" target="_blank">PDF certificate</a> appears in the <code class="language-plaintext highlighter-rouge">certificates</code> folder in the <strong>File Service</strong>. As a future improvement, you could also delete the document from DocuGenerate after saving it to Backendless, keeping your DocuGenerate account tidy.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/file-service-certificates.png" alt="Certificate PDF saved in the Backendless File Service"/></p> <p>In the <code class="language-plaintext highlighter-rouge">Participants</code> table, the <code class="language-plaintext highlighter-rouge">Certificate URL</code> column now contains a link to the file stored in the Backendless file storage, confirming that the entire flow works correctly from trigger to completion.</p> <p><img src="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/database-table-updated.png" alt="Database table updated with the certificate URL"/></p> <p>If you’d like to try this workflow yourself, you can download the complete <a href="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/Certificate of Achievement Flow.json" target="_blank">flow definition</a> and import it into your FlowRunner instance. You’ll need to update the template ID and table references to match your own Backendless app configuration.</p> <h2 id="conclusion">Conclusion</h2> <p>In this tutorial, we built a complete certificate automation workflow using FlowRunner and DocuGenerate. The flow listens for new records in a Backendless database, generates a personalized PDF certificate for each participant, saves the file to the Backendless File Service, and updates the database record with a link to the generated document. The entire process runs automatically without any manual intervention once the flow is started.</p> <p>This workflow demonstrates one practical example of what you can build with FlowRunner and DocuGenerate. The same pattern applies to any scenario where you need to generate documents from database records, such as invoices, contracts, reports, or any other templated document. You could also extend this workflow by adding email notifications, conditional branching based on record data, or integrations with other services available in the Backendless ecosystem.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/Certificate of Achievement.doc">Certificate of Achievement</a> template used in this tutorial.</li> <li>The DocuGenerate <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-backendless/">integration guide</a> for Backendless.</li> <li>The complete <a href="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/Certificate of Achievement Flow.json" target="_blank">flow definition</a> that you can import and use.</li> <li>The <a href="https://flowrunner.ai/integrations/docugenerate" target="_blank" rel="nofollow noopener">DocuGenerate extension</a> on FlowRunner.</li> <li>Official <a href="https://docs.flowrunner.ai/" target="_blank" rel="nofollow noopener">FlowRunner documentation</a>.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Certificates"/> <category term="Backendless"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to build an automated certificate generation workflow with FlowRunner and DocuGenerate. Create a flow that generates PDF certificates from database records, saves them to file storage, and updates each record with a link to the generated file.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/cover-image-v2.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/029-flowrunner-certificates/cover-image-v2.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Generate Health Plan Proposals in Power Apps with DocuGenerate</title> <link href="https://www.docugenerate.com/blog/generate-health-plan-proposals-in-power-apps-with-docugenerate/" rel="alternate" type="text/html" title="Generate Health Plan Proposals in Power Apps with DocuGenerate"/> <published>2025-12-22T00:00:00+00:00</published> <updated>2025-12-22T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/generate-health-plan-proposals-in-power-apps-with-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/generate-health-plan-proposals-in-power-apps-with-docugenerate/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Employee onboarding often involves helping new hires navigate complex benefit options, particularly when it comes to selecting health insurance plans. Companies typically offer multiple health plans with varying coverage levels, premiums, and out-of-pocket costs, which can overwhelm new employees trying to make the best decision for their families. In this tutorial, we’ll take an existing <a href="https://www.microsoft.com/en-us/power-platform/products/power-apps" target="_blank" rel="nofollow noopener">Power Apps</a> Health Plan Selector app and enhance it with automated document generation capabilities using <a href="https://www.docugenerate.com/">DocuGenerate</a> and <a href="https://www.microsoft.com/en-us/power-platform/products/power-automate" target="_blank" rel="nofollow noopener">Power Automate</a>.</p> <p>The Health Plan Selector is a sample application that helps new employees explore company health plans through a series of guided questions. Based on the answers, the app recommends the most suitable plan. However, the original app simply sends the plan details via the user’s default email client. We’ll replace this basic functionality with an automated workflow that generates a professional PDF proposal and delivers it directly to the employee’s inbox without requiring any manual email composition.</p> <p>This approach creates a better experience for both HR teams and new employees. The automated workflow ensures consistency in how plan information is presented, creates a formal document that employees can review at their leisure and discuss with family members, and eliminates the manual steps involved in composing and sending these communications. Throughout this guide, we’ll walk through each step of the integration, from understanding the existing app structure to creating a complete document generation workflow.</p> <h2 id="template-app">Starting with the Health Plan Selector Template</h2> <p>Power Apps provides a variety of ready-to-use templates that serve as excellent starting points for building business applications. For this tutorial, we’ll use the Health Plan Selector template, which demonstrates many key Power Apps concepts including user input validation, conditional logic, multi-screen navigation, and data collection.</p> <p>To get started, open Power Apps and click on <strong>Start with an app template</strong>. This option allows you to select from a list of fully functional business app templates that you can use as-is or customize to suit your specific needs. Browse through the available templates until you find the Health Plan Selector app. This sample app is designed specifically for new employee onboarding scenarios, helping users explore company health plans and discover which option will work best for them and their families.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/start-with-a-template.png" alt="Starting with the Health Plan Selector template"/></p> <p>Once you select this template, Power Apps will create a new app in your environment based on the template structure. The app includes all the screens, controls, data collections, and logic needed for the health plan selection workflow. You’ll be able to explore and modify any aspect of the app to fit your organization’s specific health plan offerings and branding guidelines.</p> <h2 id="understanding-app">Understanding the Sample App</h2> <p>The Health Plan Selector app guides users through a multi-step questionnaire to determine the most appropriate health insurance plan. The app asks about coverage needs (individual, family, etc.), desired services (primary care, dental, vision, specialists), budget preferences (basic or premium), and other factors that influence plan selection. Based on these inputs, the app recommends specific plans and displays detailed information including monthly premiums, coverage limits, and out-of-pocket costs.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/health-plan-app-demo.gif" alt="Demo of the Health Plan Selector app workflow"/></p> <p>The app is built with multiple screens that represent different stages of the selection process. After creating the app from the template, you can view all screens in the <strong>Tree view</strong> panel, which shows screens like <code class="language-plaintext highlighter-rouge">HomeScreen</code>, <code class="language-plaintext highlighter-rouge">Step1_Screen</code>, <code class="language-plaintext highlighter-rouge">Step2_Screen</code>, <code class="language-plaintext highlighter-rouge">Step3_Screen</code>, <code class="language-plaintext highlighter-rouge">Step4_Screen</code>, <code class="language-plaintext highlighter-rouge">Recommendation_Screen</code>, <code class="language-plaintext highlighter-rouge">ViewOptions_Screen</code>, and <code class="language-plaintext highlighter-rouge">Share_Screen</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/health-plan-app-screens-v2.png" alt="App screens in the Tree view"/></p> <p>Each screen contains various controls such as text inputs, radio buttons, checkboxes, galleries, and buttons that work together to collect user preferences and display recommendations.</p> <h2 id="send-button-logic">Examining the Send Button Logic</h2> <p>For this tutorial, we’ll focus specifically on the <code class="language-plaintext highlighter-rouge">Share_Screen</code>, which is where users see their final plan recommendation and have the option to send the details to their email address. This is the screen we’ll modify to integrate document generation capabilities instead of the basic email functionality that currently exists.</p> <p>The <code class="language-plaintext highlighter-rouge">Share_Screen</code> includes a <strong>SEND</strong> button that currently triggers a <code class="language-plaintext highlighter-rouge">mailto</code> link to compose an email with the plan details. To understand what we need to replace, let’s examine the existing button logic. When you select the <strong>SEND</strong> button in the app designer, you can view its associated code in the formula bar.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/share-screen-send-button-v2.png" alt="Send button code in the Share_Screen"/></p> <p>The code uses the <code class="language-plaintext highlighter-rouge">Launch</code> function to open the user’s default email client with pre-populated subject and body content. This approach has several limitations. It requires the user to have a default email client configured, it opens the email in draft form requiring the user to manually click send, and the formatting is limited to plain text with URL-encoded line breaks.</p> <p>The code also performs data collection operations to store the user’s responses in a collection called <code class="language-plaintext highlighter-rouge">ResponsesCollect</code>. Here’s the complete code from the original <strong>SEND</strong> button:</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">If</span><span class="p">(</span><span class="o">!</span><span class="nc">IsBlank</span><span class="p">(</span><span class="nx">TextInput1_1</span><span class="p">.</span><span class="nx">Text</span><span class="p">);</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">1</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nx">Radio1</span><span class="p">.</span><span class="nx">SelectedText</span><span class="p">.</span><span class="nx">OptionText</span><span class="p">});;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">1</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">;</span><span class="mi">1</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">2</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">;</span><span class="mi">2</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">3</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">3</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">;</span><span class="mi">3</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span><span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">4</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">4</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">;</span><span class="mi">4</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">5</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">BasicCollect</span><span class="p">;</span><span class="mi">5</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">1</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">;</span><span class="mi">1</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span><span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">2</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">;</span><span class="mi">2</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">3</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">;</span><span class="mi">3</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">4</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">;</span><span class="mi">4</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">5</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">;</span><span class="mi">5</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">If</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">)</span><span class="o">&gt;=</span><span class="mi">6</span><span class="p">;</span><span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">2</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">Last</span><span class="p">(</span><span class="nc">FirstN</span><span class="p">(</span><span class="nx">AddONCollect</span><span class="p">;</span><span class="mi">6</span><span class="p">)).</span><span class="nx">OptionText</span><span class="p">)}));;</span>

<span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">3</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nx">Radio1_2</span><span class="p">.</span><span class="nx">SelectedText</span><span class="p">.</span><span class="nx">OptionText</span><span class="p">});;</span>

<span class="nc">Collect</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">;{</span><span class="na">QuestionId</span><span class="p">:</span><span class="dl">"</span><span class="s2">4</span><span class="dl">"</span><span class="p">;</span><span class="nl">ResponseId</span><span class="p">:</span><span class="nc">Text</span><span class="p">(</span><span class="nc">CountRows</span><span class="p">(</span><span class="nx">ResponsesCollect</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span><span class="p">);</span><span class="nl">Response</span><span class="p">:</span><span class="nx">Radio1_3</span><span class="p">.</span><span class="nx">SelectedText</span><span class="p">.</span><span class="nx">OptionText</span><span class="p">});;</span>

<span class="nc">Launch</span><span class="p">(</span><span class="dl">"</span><span class="s2">mailto:</span><span class="dl">"</span><span class="o">&amp;</span><span class="nx">TextInput1_1</span><span class="p">.</span><span class="nx">Text</span><span class="o">&amp;</span><span class="dl">"</span><span class="s2">?subject=</span><span class="dl">"</span><span class="o">&amp;</span><span class="nx">TextBox1_16</span><span class="p">.</span><span class="nx">Text</span><span class="o">&amp;</span><span class="dl">"</span><span class="s2"> &amp;body=Plan Details:</span><span class="dl">"</span> <span class="o">&amp;</span><span class="nx">TextBox1_16</span><span class="p">.</span><span class="nx">Text</span><span class="o">&amp;</span> <span class="dl">"</span><span class="s2">%0D%0A</span><span class="dl">"</span> <span class="o">&amp;</span> <span class="nx">TextBox3_5</span><span class="p">.</span><span class="nx">Text</span> <span class="o">&amp;</span> <span class="dl">"</span><span class="s2">%0D%0A</span><span class="dl">"</span> <span class="o">&amp;</span><span class="nx">TextBox3_6</span><span class="p">.</span><span class="nx">Text</span> <span class="o">&amp;</span> <span class="dl">"</span><span class="s2">%0D%0A</span><span class="dl">"</span> <span class="o">&amp;</span> <span class="nx">TextBox3_7</span><span class="p">.</span><span class="nx">Text</span> <span class="o">&amp;</span> <span class="dl">"</span><span class="s2">%0D%0A</span><span class="dl">"</span> <span class="o">&amp;</span><span class="nx">TextBox3_8</span><span class="p">.</span><span class="nx">Text</span><span class="o">&amp;</span> <span class="dl">"</span><span class="s2">%0D%0A</span><span class="dl">"</span> <span class="o">&amp;</span> <span class="nc">EncodeUrl</span><span class="p">(</span><span class="nx">TextBox3_9</span><span class="p">.</span><span class="nx">Text</span><span class="p">)</span> <span class="o">&amp;</span> <span class="dl">"</span><span class="s2">%0D%0A</span><span class="dl">"</span> <span class="o">&amp;</span> <span class="nc">EncodeUrl</span><span class="p">(</span><span class="nx">TextBox3_11</span><span class="p">.</span><span class="nx">Text</span><span class="p">));;</span>

<span class="nc">Navigate</span><span class="p">(</span><span class="nx">Screen1</span><span class="p">;</span><span class="nx">ScreenTransition</span><span class="p">.</span><span class="nx">Fade</span><span class="p">);</span><span class="nc">UpdateContext</span><span class="p">({</span><span class="na">emailreset</span><span class="p">:</span><span class="kc">true</span><span class="p">}));;</span>
</code></pre></div></div> <p>This code collects response data from various form controls and collections, then constructs a <code class="language-plaintext highlighter-rouge">mailto</code> URL with the email address from <code class="language-plaintext highlighter-rouge">TextInput1_1.Text</code>, the plan name from <code class="language-plaintext highlighter-rouge">TextBox1_16.Text</code> as the subject, and several other text box values concatenated into the body. We’ll replace the <code class="language-plaintext highlighter-rouge">Launch</code> function call with a call to a Power Automate flow that handles document generation and email delivery.</p> <h2 id="modify-button">Modifying the Button to Call Power Automate</h2> <p>Instead of launching the email client, we’ll modify the <strong>SEND</strong> button to trigger a Power Automate flow. This flow will receive the plan details, generate a professional PDF document using DocuGenerate, and send it via email. Replace the entire <code class="language-plaintext highlighter-rouge">Launch</code> function call with the following code:</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="nx">SendEmailWithDocument</span><span class="p">.</span><span class="nc">Run</span><span class="p">(</span><span class="nx">TextInput1_1</span><span class="p">.</span><span class="nx">Text</span><span class="p">;</span> <span class="nx">TextBox1_16</span><span class="p">.</span><span class="nx">Text</span><span class="p">;</span> <span class="nx">TextBox3_5</span><span class="p">.</span><span class="nx">Text</span><span class="p">;</span> <span class="nx">TextBox3_6</span><span class="p">.</span><span class="nx">Text</span><span class="p">;</span> <span class="nx">TextBox3_7</span><span class="p">.</span><span class="nx">Text</span><span class="p">;</span> <span class="nx">TextBox3_8</span><span class="p">.</span><span class="nx">Text</span><span class="p">;</span> <span class="nx">TextBox3_9</span><span class="p">.</span><span class="nx">Text</span><span class="p">;</span> <span class="nx">TextBox3_11</span><span class="p">.</span><span class="nx">Text</span><span class="p">;</span> <span class="nc">User</span><span class="p">().</span><span class="nx">FullName</span><span class="p">);;</span>

</code></pre></div></div> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/share-screen-send-button-call-flow.png" alt="Updated button code calling SendEmailWithDocument flow"/></p> <p>This modified code calls a Power Automate flow named <code class="language-plaintext highlighter-rouge">SendEmailWithDocument</code> and passes nine parameters: the email address, plan name, coverage details, price per month, price per individual, out-of-pocket limit, coinsurance percentage, additional services, and the current user’s full name.</p> <p>The <code class="language-plaintext highlighter-rouge">User().FullName</code> function retrieves the authenticated user’s name from Azure Active Directory, which we can include in the personalized document. These parameters correspond to the data displayed on the <code class="language-plaintext highlighter-rouge">Share_Screen</code> and represent the information we want to include in the generated proposal document.</p> <p>You’ll notice that Power Apps shows this flow reference in red initially because the flow doesn’t exist yet. We’ll create the flow in the <a href="#create-flow">next section</a>, and once it’s connected to the app, the reference will resolve correctly.</p> <h2 id="create-flow">Creating the Power Automate Flow</h2> <p>Now we’ll create the Power Automate flow that handles document generation and email delivery. In Power Apps, navigate to the <strong>Power Automate</strong> section from the left menu and click <strong>Create a new flow</strong>. Select <strong>Create from blank</strong> to start with an empty flow canvas.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/create-flow-from-blank-v2.png" alt="Creating a new flow from blank" class="desktop-width-75"/></p> <p>Name your flow <code class="language-plaintext highlighter-rouge">SendEmailWithDocument</code> to match the flow name we referenced in the button code. The first step in any Power Apps-triggered flow is the <strong>Power Apps (V2)</strong> trigger, which defines the parameters that the app will pass to the flow.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/power-apps-input-parameters.png" alt="Power Automate input parameters configuration"/></p> <p>Click <strong>Add an input</strong> for each parameter you need to receive from Power Apps. The parameter types should match the data being passed (all text in this case). The table below shows how each flow parameter maps to the corresponding UI element:</p> <table class="table table-bordered"> <thead> <tr> <th>Flow Parameter</th> <th>UI Element</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code class="language-plaintext highlighter-rouge">Email</code></td> <td><code class="language-plaintext highlighter-rouge">TextInput1_1.Text</code></td> <td>Recipient email address</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">Plan_Name</code></td> <td><code class="language-plaintext highlighter-rouge">TextBox1_16.Text</code></td> <td>Name of the recommended health plan</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">Coverage</code></td> <td><code class="language-plaintext highlighter-rouge">TextBox3_5.Text</code></td> <td>Coverage level description</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">Price_Per_Month</code></td> <td><code class="language-plaintext highlighter-rouge">TextBox3_6.Text</code></td> <td>Monthly premium amount</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">Price_Per_Individual</code></td> <td><code class="language-plaintext highlighter-rouge">TextBox3_7.Text</code></td> <td>Individual coverage cost</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">Out_Of_Pocket_Limit</code></td> <td><code class="language-plaintext highlighter-rouge">TextBox3_8.Text</code></td> <td>Maximum out-of-pocket expenses</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">Coinsurance_Percentage</code></td> <td><code class="language-plaintext highlighter-rouge">TextBox3_9.Text</code></td> <td>Coinsurance percentage</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">Additional_Services</code></td> <td><code class="language-plaintext highlighter-rouge">TextBox3_11.Text</code></td> <td>List of additional covered services</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">Name</code></td> <td><code class="language-plaintext highlighter-rouge">User().FullName</code></td> <td>Employee name from Azure Active Directory</td> </tr> </tbody> </table> <p><br/></p> <h2 id="docugenerate-template">Preparing the DocuGenerate Template</h2> <p>Before adding the document generation step to our flow, we need to create a Word template in DocuGenerate that defines the structure and formatting of our health plan proposal. The template uses <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> that correspond to the parameter names we defined in Power Automate, which will be replaced with the actual values from the flow.</p> <p>The Word document includes company branding, a clear header, sections for plan details, and additional information that should appear on every proposal. It has merge tags for all nine parameters: <code class="language-plaintext highlighter-rouge">[Name]</code>, <code class="language-plaintext highlighter-rouge">[Email]</code>, <code class="language-plaintext highlighter-rouge">[Plan_Name]</code>, <code class="language-plaintext highlighter-rouge">[Coverage]</code>, <code class="language-plaintext highlighter-rouge">[Price_Per_Month]</code>, <code class="language-plaintext highlighter-rouge">[Price_Per_Individual]</code>, <code class="language-plaintext highlighter-rouge">[Out_Of_Pocket_Limit]</code>, <code class="language-plaintext highlighter-rouge">[Coinsurance_Percentage]</code>, and <code class="language-plaintext highlighter-rouge">[Additional_Services]</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/docugenerate-template.png" alt="Health Plan Proposal template with merge tags"/></p> <p>Once your template is ready, <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">upload it</a> to your DocuGenerate account and name it <strong>Health Plan Proposal</strong>. You can download a copy of the template used in this tutorial <a href="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/Health Plan Proposal.docx">here</a>.</p> <h2 id="generate-document-step">Adding the Document Generation Step</h2> <p>To use DocuGenerate from Power Automate, you need to install the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-power-apps/#add-the-custom-connector">custom connector</a> in your Power Platform environment. The first time you use it, you’ll need to authenticate with your DocuGenerate <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a>, which you can find in your DocuGenerate account settings. This creates a connection that can be reused across multiple flows in your environment.</p> <p>With the template created and the connector available, we can now add the document generation step to our flow. Click <strong>New step</strong> in your flow and search for “DocuGenerate”. Select the <strong>Generate Document</strong> action from the list of available operations.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/search-docugenerate-app.png" alt="Searching for the DocuGenerate connector"/></p> <p>To configure the action, select your template from the <strong>Template</strong> dropdown. If you uploaded your template with the name “Health Plan Proposal,” you should see it in the list. Next, set the <strong>Name</strong> parameter to specify what the generated document should be called. Select <code class="language-plaintext highlighter-rouge">.pdf</code> as the <strong>Format</strong> so that the generated document is delivered as a professional PDF rather than an editable Word file.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/generate-document-step.png" alt="Generate Document step configuration"/></p> <p>For the <strong>Data</strong> parameter, you need to provide a JSON object that contains all the values for the merge tags in your template. Replace each empty string with the appropriate dynamic content from the trigger step. Power Automate will display these as tokens in the expression rather than literal strings.</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Email"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Plan_Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Coverage"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Price_Per_Month"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Price_Per_Individual"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Out_Of_Pocket_Limit"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Coinsurance_Percentage"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Additional_Services"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div> <h2 id="send-email-step">Sending the Email with the Document</h2> <p>The final step in our flow sends an email to the employee with the generated PDF proposal attached. Add a new step and search for the <strong>Send an email notification (V3)</strong> action.</p> <p><img src="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/send-an-email-notification-step.png" alt="Send an email notification step configuration"/></p> <p>Configure the email parameters as follows. Set the <strong>To</strong> field to the <strong>Email</strong> value from the Power Apps trigger, which is the address the employee entered in the app. For the <strong>Subject</strong>, use something descriptive like <code class="language-plaintext highlighter-rouge">Your Personalized Healthcare Plan Proposal</code>. In the <strong>Body</strong> field, compose a friendly message that explains what the attachment contains and provides any next steps the employee should take.</p> <p>The most important configuration is the attachments section. This is where you connect the generated PDF to the email. For the <strong>Attachment</strong> parameter, select the <code class="language-plaintext highlighter-rouge">document_uri</code> output from the <strong>Generate Document</strong> step. For the <strong>Attachment File Name</strong> parameter, select the <code class="language-plaintext highlighter-rouge">filename</code> output from the same step. This ensures that the email includes the actual PDF document with the correct filename.</p> <p>With this final step configured, save your flow and test it to ensure everything works correctly.</p> <h2 id="testing">Testing the Complete Integration</h2> <p>Now that both the Power Apps app and the Power Automate flow are configured, it’s time to test the complete integration. Run the app in preview mode and go through the health plan selection process. Answer the questions about coverage needs, desired services, and budget preferences. When you reach the confirmation screen, enter your email address and click the <strong>SEND</strong> button. If everything is configured correctly, the button will trigger the Power Automate flow, which generates the PDF and sends the email.</p> <p>The document contains all the plan details with the merge tags replaced by actual values from the app, and the formatting matches the professional template design.</p> <object data="/assets/posts/028-power-apps-health-plan/Health Plan Proposal.pdf" type="application/pdf" class="inline-pdf-blog"></object> <p>If you encounter any issues, check the flow run history in Power Automate to see where the process might have failed. Common issues include incorrect parameter mappings, or authentication problems with any of the connectors. The flow run history provides detailed information about each step, including the data that was passed and any error messages that occurred.</p> <h2 id="benefits">Benefits of This Approach</h2> <p>Replacing the basic email sending functionality with automated document generation and email delivery offers several advantages for both HR teams and employees. The automated workflow ensures consistency in how health plan information is presented to all employees, eliminating variations that can occur when individuals compose emails manually. The generated PDF serves as a formal document that employees can save, print, and reference throughout the enrollment period, making it easier to compare options or discuss plans with family members.</p> <p>From an operational perspective, this integration reduces the manual effort required from HR staff. Instead of having to help employees compose emails or prepare plan summaries individually, the system handles this automatically based on the recommendations generated by the app. This frees up HR time for more valuable activities like answering specific questions or helping employees with complex situations.</p> <p>The approach also creates better documentation for compliance purposes. Each generated proposal is a record of what information was provided to the employee, which can be important for regulatory compliance or if questions arise later about what was communicated during the enrollment process. You could extend the workflow further by adding a step that saves each generated proposal to SharePoint or another document management system for centralized record-keeping.</p> <h2 id="conclusion">Conclusion</h2> <p>Enhancing <a href="https://www.docugenerate.com/integrations/#power-apps">Power Apps applications</a> with automated document generation capabilities demonstrates the power of the Microsoft Power Platform ecosystem when combined with specialized services like DocuGenerate. The integration we’ve built transforms a simple health plan selector app into a complete onboarding solution that guides employees through plan selection and automatically delivers professional proposal documents.</p> <p>This tutorial focused on health plan proposals, but the same integration pattern can be applied to many other Power Apps scenarios. Any time your app collects data that needs to be formatted as a formal document and delivered to users or stored for records, this approach of using Power Automate to orchestrate document generation and distribution can add significant value. Whether you’re generating employment contracts, offer letters, training certificates, or custom reports, the combination of Power Apps for data collection, Power Automate for workflow orchestration, and DocuGenerate for document generation provides a powerful and flexible solution.</p> <p>The no-code nature of this integration makes it accessible to business analysts and power users who may not have traditional development skills. By leveraging pre-built connectors and visual workflow designers, you can create sophisticated document automation solutions without writing custom code or managing complex infrastructure.</p> <h2 id="resources">Resources</h2> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/Health Plan Proposal.docx">Health Plan Proposal</a> template used in this tutorial.</li> <li>The <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-power-apps/">DocuGenerate Guide</a> for integrating with Power Apps.</li> <li>Official <a href="https://learn.microsoft.com/en-us/power-automate/" target="_blank" rel="nofollow noopener">Power Automate documentation</a> from Microsoft.</li> <li>Official <a href="https://learn.microsoft.com/en-us/power-apps/" target="_blank" rel="nofollow noopener">Power Apps documentation</a> from Microsoft.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Proposals"/> <category term="Power Platform"/> <category term="No-Code"/> <summary type="html"><![CDATA[This in-depth tutorial shows how to enhance the Health Plan Selector app in Power Apps with automated document generation using DocuGenerate to create professional PDF proposals that summarize personalized health plan recommendations.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/028-power-apps-health-plan/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Build a Resume Analyzer with Pipedream and DocuGenerate</title> <link href="https://www.docugenerate.com/blog/build-a-resume-analyzer-with-pipedream-and-docugenerate/" rel="alternate" type="text/html" title="Build a Resume Analyzer with Pipedream and DocuGenerate"/> <published>2025-11-19T00:00:00+00:00</published> <updated>2025-11-19T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/build-a-resume-analyzer-with-pipedream-and-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/build-a-resume-analyzer-with-pipedream-and-docugenerate/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Resume screening is one of the most time-consuming aspects of the hiring process. HR teams often spend hours reviewing resumes to extract key information, evaluate candidates, and prepare summaries for hiring managers. In this tutorial, we’ll build an automated resume analyzer that handles this work for you, combining the power of <a href="https://pipedream.com/" target="_blank" rel="nofollow noopener">Pipedream</a> workflow automation, <a href="https://www.anthropic.com/claude" target="_blank" rel="nofollow noopener">Claude AI</a> for intelligent analysis, and <a href="https://www.docugenerate.com/">DocuGenerate</a> for professional PDF generation.</p> <p>The workflow operates automatically whenever a new resume is added to a Dropbox folder. It extracts the text from the resume, uses Claude to analyze the candidate’s experience and qualifications, generates a structured summary with key insights, and creates a professional PDF report that your hiring team can review immediately. The entire process takes just seconds and requires no manual intervention.</p> <p>This approach is particularly valuable for organizations that need to process multiple resumes quickly while maintaining consistency in candidate evaluation. By standardizing the analysis format and leveraging AI to extract insights, you can focus your time on interviewing the most promising candidates rather than spending hours on initial screening.</p> <h2 id="workflow-overview">Understanding the Workflow</h2> <p>The complete workflow consists of seven connected steps that work together to transform a raw resume into a structured analysis report. Here’s how the process flows from start to finish:</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/complete-workflow-diagram.png" alt="Complete workflow diagram showing all steps"/></p> <p>The workflow begins when you upload a resume to a monitored Dropbox folder. Pipedream detects the new file, downloads it, and extracts the text content from the PDF. This text is then sent to Claude AI with specific instructions to analyze the resume and extract key information like work experience, skills, education, and notable achievements. Claude returns a structured JSON response containing all the extracted data.</p> <p>The JSON data is then passed to DocuGenerate along with a pre-designed template to generate a professional PDF summary. Once the document is created, it’s automatically uploaded back to Dropbox in a designated folder where your hiring team can access it. The entire process completes in under a minute, and you can process multiple resumes simultaneously simply by uploading them to the trigger folder.</p> <h2 id="setting-up-template">Setting Up the Document Template</h2> <p>Before building the Pipedream workflow, we need to create a template that will format our resume analysis reports. The template uses DocuGenerate’s <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> syntax to define where data from Claude’s analysis should appear in the final document. This ensures every candidate summary follows a consistent, professional format.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/docugenerate-template.png" alt="Screenshot of the resume summary template in DocuGenerate"/></p> <p>The template includes sections for candidate information (name, email, phone, location), a professional summary, experience overview, key skills, education, strengths, interview recommendations, and an overall assessment with a fit score. Some sections like skills, strengths, and recommendations use <a href="https://www.docugenerate.com/help/articles/how-to-add-lists-to-a-template/">list syntax</a> to display multiple items from arrays in the data. For example, the skills section uses <code class="language-plaintext highlighter-rouge">[#skills]</code> to begin the loop, <code class="language-plaintext highlighter-rouge">[.]</code> to display each skill as a bullet point, and <code class="language-plaintext highlighter-rouge">[/skills]</code> to end the loop.</p> <p>You can <a href="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/Resume Analysis Summary.docx" target="_blank">download the complete template</a> and upload it to your DocuGenerate account. Once uploaded, take note of the template name or ID, as you’ll need this information when configuring the document generation step in the workflow. With the template ready, we can now build the Pipedream workflow that will automate the entire analysis process.</p> <h2 id="dropbox-trigger">Configuring the Dropbox Trigger</h2> <p>The workflow starts with a <a href="https://pipedream.com/apps/dropbox/triggers/new-file" target="_blank" rel="nofollow noopener">Dropbox trigger</a> that monitors a specific folder for new files. This trigger is the entry point that activates the entire automation whenever a resume is uploaded. To configure this trigger, you’ll need to connect your Dropbox account to Pipedream and specify which folder to monitor.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/dropbox-trigger-config.png" alt="Screenshot of Dropbox trigger configuration"/></p> <p>For this tutorial, we’re monitoring a folder called <code class="language-plaintext highlighter-rouge">/Pipedream/Resumes</code>. When you test the trigger with a sample resume, you’ll see that it returns metadata about the file including the filename, path, size, and modification dates. However, it’s important to note that the trigger only provides this metadata and not the actual file content. This is why we need a separate step to download the file, which we’ll configure in the <a href="#download-file">next section</a>.</p> <p>The trigger activates immediately when a new file is detected, making the workflow responsive to your hiring needs. You can upload resumes throughout the day, and each one will be processed automatically without any manual intervention. This real-time processing ensures that candidate summaries are available to your team as quickly as possible.</p> <h2 id="download-file">Downloading the Resume File</h2> <p>After the trigger detects a new file, we need to actually download the file content before we can extract text from it. The <a href="https://pipedream.com/apps/dropbox/actions/download-file-to-tmp" target="_blank" rel="nofollow noopener">Download File to TMP</a> action retrieves the resume from Dropbox and saves it to Pipedream’s temporary storage, where subsequent steps can access it.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/download-file-to-tmp-config.png" alt="Screenshot of download file configuration"/></p> <p>The configuration is straightforward. The <strong>Path</strong> parameter uses <code class="language-plaintext highlighter-rouge">{{steps.trigger.event.path_display}}</code> to reference the file path captured by the trigger. This action downloads the file and returns an object containing the temporary file path in the <code class="language-plaintext highlighter-rouge">tmpPath</code> property. The file remains in temporary storage throughout the workflow execution, which is perfect for processing and then discarding after the workflow completes.</p> <p>The downloaded file is now ready for text extraction. The temporary file path will be used in the next step to read the PDF content and convert it into text that Claude can analyze.</p> <h2 id="extract-text">Extracting Text from the PDF</h2> <p>With the resume downloaded to temporary storage, we now need to extract the text content from the PDF file. This step uses a Node.js code block with the <a href="https://www.npmjs.com/package/pdf-parse" target="_blank" rel="nofollow noopener">pdf-parse</a> library to read the PDF and convert it into plain text that Claude can analyze.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/node-code-config.png" alt="Screenshot of text extraction code"/></p> <p>The code reads the file from the temporary path using Node.js’s built-in <code class="language-plaintext highlighter-rouge">fs</code> module, then passes the file buffer to <code class="language-plaintext highlighter-rouge">pdf-parse</code> for processing. The library handles the complexities of PDF parsing and returns the extracted text as a string.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">import</span> <span class="p">{</span> <span class="nx">PDFParse</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">"</span><span class="s2">pdf-parse</span><span class="dl">"</span><span class="p">;</span>
<span class="k">import</span> <span class="o">*</span> <span class="k">as</span> <span class="nx">fs</span> <span class="k">from</span> <span class="dl">"</span><span class="s2">fs</span><span class="dl">"</span><span class="p">;</span>

<span class="k">export</span> <span class="k">default</span> <span class="nf">defineComponent</span><span class="p">({</span>
  <span class="k">async</span> <span class="nf">run</span><span class="p">({</span> <span class="nx">steps</span><span class="p">,</span> <span class="nx">$</span> <span class="p">})</span> <span class="p">{</span>
    <span class="c1">// Get the tmp file path</span>
    <span class="kd">const</span> <span class="nx">filePath</span> <span class="o">=</span> <span class="nx">steps</span><span class="p">.</span><span class="nx">download_file_to_tmp</span><span class="p">.</span><span class="nx">$return_value</span><span class="p">.</span><span class="nx">tmpPath</span><span class="p">;</span>

    <span class="c1">// Read the file from /tmp</span>
    <span class="kd">const</span> <span class="nx">dataBuffer</span> <span class="o">=</span> <span class="nx">fs</span><span class="p">.</span><span class="nf">readFileSync</span><span class="p">(</span><span class="nx">filePath</span><span class="p">);</span>

    <span class="c1">// Parse the PDF</span>
    <span class="kd">const</span> <span class="nx">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">PDFParse</span><span class="p">({</span> <span class="na">data</span><span class="p">:</span> <span class="nx">dataBuffer</span> <span class="p">});</span>
    <span class="kd">const</span> <span class="nx">resumeText</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">parser</span><span class="p">.</span><span class="nf">getText</span><span class="p">();</span>

    <span class="c1">// Return the PDF content</span>
    <span class="k">return</span> <span class="nx">resumeText</span><span class="p">;</span>
  <span class="p">},</span>
<span class="p">})</span>
</code></pre></div></div> <p>The extracted text is now available in <code class="language-plaintext highlighter-rouge">resumeText</code> and ready to be analyzed by Claude in the next step.</p> <h2 id="claude-analysis">Analyzing the Resume with Claude</h2> <p>This is where the intelligence happens. The Claude API step sends the extracted resume text to <a href="https://docs.anthropic.com/en/api/getting-started" target="_blank" rel="nofollow noopener">Anthropic’s Claude AI</a> with detailed instructions to analyze the content and return structured data in JSON format. Claude examines the resume and extracts key information including work experience, skills, education, and provides insights that would typically require manual review.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/claude-chat-config.png" alt="Screenshot of Claude API configuration"/></p> <p>The configuration of the <a href="https://pipedream.com/apps/anthropic/actions/chat" target="_blank" rel="nofollow noopener">Chat with Anthropic (Claude)</a> action requires your Anthropic API key, which you can obtain from your Anthropic account. The request uses the <code class="language-plaintext highlighter-rouge">claude-sonnet-4-5-20250929</code> model, which provides an excellent balance of speed, cost, and analytical capability for this task. The <strong>Maximum Tokens to Sample</strong> parameter is set to <code class="language-plaintext highlighter-rouge">4096</code>, which gives Claude enough space to return a comprehensive analysis with all the fields we need.</p> <p>The prompt is carefully structured to guide Claude in extracting specific information and formatting it as valid JSON. Here’s the complete prompt that instructs Claude on what to analyze and how to structure the response:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>You are an expert HR analyst. Analyze the following resume and extract key information into a structured JSON format.

Resume content:
{{steps.code.$return_value.text}}

Please analyze this resume and provide a comprehensive summary in the following JSON structure. Be thorough but concise:

{
  "date": "YYYY-MM-DD (today's date)",
  "candidateName": "Full name from resume",
  "email": "Email address",
  "phone": "Phone number",
  "location": "City, State/Country",
  "summary": "2-3 sentence professional summary highlighting key qualifications, experience, and strengths",
  "yearsOfExperience": "X years (calculate total)",
  "currentPosition": "Most recent job title",
  "currentCompany": "Most recent company name",
  "skills": [
    "List 6-10 key technical and professional skills with proficiency levels where relevant"
  ],
  "highestDegree": "Degree name (e.g., Bachelor of Science in Computer Science)",
  "institution": "University/College name",
  "fieldOfStudy": "Major/Field",
  "strengths": [
    "List 4-6 key strengths based on achievements, projects, and experience"
  ],
  "recommendations": [
    "List 4-5 specific interview questions or topics to explore based on their unique experience"
  ],
  "fitScore": "Rate 1-10 based on overall qualifications and experience",
  "finalNotes": "2-3 sentence overall assessment and hiring recommendation"
}

IMPORTANT INSTRUCTIONS:
- Extract all information directly from the resume
- If any field is not available in the resume, use "Not specified" or an empty array []
- For skills, include proficiency levels when they can be inferred from years of experience or explicit mentions
- Make the summary compelling but accurate
- Base the fitScore on years of experience, skill diversity, education, and career progression
- Ensure all JSON is properly formatted with no syntax errors
- Return ONLY the JSON object, no additional text or markdown formatting

CRITICAL OUTPUT REQUIREMENTS:
- Return ONLY the raw JSON object
- Do NOT wrap the JSON in markdown code blocks
- Do NOT include ```json or ``` markers
- Do NOT add any explanatory text before or after the JSON
- The response must start with { and end with }
- The entire response must be valid, parseable JSON
</code></pre></div></div> <p>Claude processes the resume text and returns a JSON object containing all the extracted information. The response includes everything from basic contact details to insightful recommendations for interview questions based on the candidate’s unique experience. This structured format makes it easy to pass the data to DocuGenerate for document generation in the next step.</p> <h2 id="parse-json">Parsing the JSON Response</h2> <p>Claude returns its analysis as a JSON string, but we need to convert this into a structured object that we can work with in subsequent steps. Pipedream’s built-in <strong>Parse JSON</strong> action found under <strong>Formatting → Data</strong> handles this conversion automatically.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/parse-json-config.png" alt="Screenshot of Parse JSON configuration"/></p> <p>The configuration simply takes the Claude response from <code class="language-plaintext highlighter-rouge">{{steps.chat.$return_value.content[0].text}}</code> and parses it into a structured object. This parsed data becomes available to all subsequent steps in the workflow, allowing us to reference specific fields like <code class="language-plaintext highlighter-rouge">{{steps.parse_json.$return_value.candidateName}}</code> when we need them.</p> <p>Having the data parsed into individual fields is particularly useful for dynamic file naming and for passing the complete dataset to DocuGenerate. The parsed object contains all the fields defined in our template: candidate information, summary, skills array, strengths array, recommendations array, and the overall assessment.</p> <h2 id="generate-document">Generating the Summary Document</h2> <p>With the analyzed data now available as a structured object, we’re ready to generate the professional PDF summary. This step uses the <a href="https://pipedream.com/apps/docugenerate" target="_blank" rel="noopener">DocuGenerate App</a> on Pipedream to merge the data with our template and create a formatted document.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/generate-document-config.png" alt="Screenshot of DocuGenerate API configuration"/></p> <p>You’ll need your DocuGenerate API Key to set up a connection, which you can find in your account settings. The action configuration includes several important parameters:</p> <ul> <li><strong>Template</strong> specifies the <strong>Resume Analysis Summary</strong> template from the setup section</li> <li><strong>Name</strong> uses <code class="language-plaintext highlighter-rouge">Resume Analysis for {{steps.parse_json.$return_value.candidateName}}</code> to create a dynamic filename based on the candidate’s name</li> <li><strong>Format</strong> is set to <code class="language-plaintext highlighter-rouge">PDF (.pdf)</code> to generate a PDF document</li> <li><strong>Data</strong> contains the complete parsed JSON object <code class="language-plaintext highlighter-rouge">{{steps.parse_json.$return_value}}</code> from Claude with all the candidate information</li> </ul> <p>The API processes this request and <a href="https://www.docugenerate.com/pdf-generation-api/#quick-start">returns a response</a> containing a <code class="language-plaintext highlighter-rouge">document_uri</code> field, which is a URL pointing to the generated PDF document.</p> <h2 id="upload-to-dropbox">Uploading the Analysis to Dropbox</h2> <p>The final step completes the workflow by uploading the generated PDF analysis back to Dropbox where your hiring team can access it. The <a href="https://pipedream.com/apps/dropbox/actions/upload-file" target="_blank" rel="nofollow noopener">Upload a File</a> action saves the document to a designated folder, organizing all candidate analyses in one location.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/upload-file-to-dropbox.png" alt="Screenshot of upload to Dropbox configuration"/></p> <p>The configuration requires specifying the destination path and the file content to upload:</p> <ul> <li><strong>Path</strong> specifies the <code class="language-plaintext highlighter-rouge">/Pipedream/Analysis</code> destination folder</li> <li><strong>File Name</strong> is set to <code class="language-plaintext highlighter-rouge">{{steps.generate_document.$return_value.filename}}</code> as the generated document’s file name</li> <li><strong>File Path or URL</strong> references the <code class="language-plaintext highlighter-rouge">{{steps.generate_document.$return_value.document_uri}}</code> value from the previous step</li> <li><strong>Mode</strong> is set to <code class="language-plaintext highlighter-rouge">overwrite</code> to define what to do if the file already exists</li> </ul> <p>Once uploaded, the analysis is immediately available to your team, and you can optionally add an email notification step to alert hiring managers when a new candidate summary is ready for review.</p> <h2 id="workflow-execution">Testing the Complete Workflow</h2> <p>With all steps configured, the workflow is ready to process resumes automatically. To test it, simply upload a resume PDF to the <code class="language-plaintext highlighter-rouge">/Pipedream/Resumes</code> folder in your Dropbox. The workflow will detect the new file within seconds and begin processing it through each step.</p> <p>You can monitor the execution in real-time through Pipedream’s interface, which shows the data flowing through each step. Once finished, you’ll find the generated analysis PDF in your <code class="language-plaintext highlighter-rouge">/Pipedream/Analysis</code> folder in Dropbox, ready for your hiring team to review.</p> <p><img src="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/pdf-analysis-in-dropbox.png" alt="Example of the generated PDF analysis saved to Dropbox"/></p> <h2 id="extending-workflow">Extending the Workflow</h2> <p>The resume analyzer we’ve built provides a solid foundation, but there are many ways you can extend it to better fit your hiring process. Here are some practical enhancements you might consider adding to make the workflow even more valuable for your organization.</p> <p>You could add an email notification step that alerts hiring managers immediately when a new candidate analysis is ready. This notification could include key highlights from Claude’s analysis, such as the fit score and professional summary, along with a direct link to the full PDF report in Dropbox. This eliminates the need for hiring managers to constantly check the folder for new analyses.</p> <p>Another useful extension is storing the structured JSON data in a database or spreadsheet. By adding a step that sends the parsed data to Airtable, <a href="https://pipedream.com/apps/google-sheets" target="_blank" rel="nofollow noopener">Google Sheets</a>, or your applicant tracking system, you can build a searchable database of all candidates. This makes it easy to filter candidates by skills, experience level, or fit score when you’re looking for specific qualifications.</p> <p>You might also want to customize the analysis based on the position you’re hiring for. You could create different templates for different roles and use the filename or a designated folder structure to determine which template to use. For example, resumes in <code class="language-plaintext highlighter-rouge">/Resumes/Engineering</code> could use a template that emphasizes technical skills, while those in <code class="language-plaintext highlighter-rouge">/Resumes/Sales</code> could focus more on communication abilities and deal experience.</p> <h2 id="conclusion">Conclusion</h2> <p>Building an automated resume analyzer with Pipedream, Claude, and DocuGenerate demonstrates how AI and workflow automation can transform time-consuming manual processes into efficient, consistent operations. The workflow we’ve created processes resumes in seconds, extracts meaningful insights that would take humans much longer to identify, and generates reports that make hiring decisions easier.</p> <p>This approach is particularly valuable because it maintains consistency in candidate evaluation. Every resume is analyzed using the same criteria, reducing unconscious bias and ensuring that all candidates are assessed fairly. The structured format of the analysis reports also makes it easier to compare candidates side-by-side and identify the most promising applicants for your open positions.</p> <p>The workflow pattern we’ve demonstrated here extends beyond resume analysis. The same approach of extracting text from documents, using AI to analyze and structure the content, and generating formatted reports can be applied to many other document processing scenarios. Whether you’re analyzing contracts, processing customer feedback, or extracting data from research papers, the core workflow remains similar with adjustments to the analysis prompt and output template.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/Resume Analysis Summary.docx" target="_blank">Resume Analysis Summary</a> template for DocuGenerate.</li> <li>The <a href="https://pipedream.com/new?h=tch_dbf5Nj" target="_blank" rel="nofollow noopener">AI Resume Analyzer</a> link to copy this workflow in Pipedream.</li> <li>The official <a href="https://pipedream.com/apps/docugenerate" target="_blank" rel="noopener">DocuGenerate App</a> for Pipedream.</li> <li>The <a href="https://pipedream.com/apps/anthropic" target="_blank" rel="nofollow noopener">Anthropic (Claude) App</a> on Pipedream.</li> <li>The <a href="https://pipedream.com/apps/dropbox" target="_blank" rel="nofollow noopener">Dropbox App</a> on Pipedream.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="AI"/> <category term="Pipedream"/> <category term="No-Code"/> <summary type="html"><![CDATA[Find out how to build an intelligent resume analyzer that automatically processes candidate applications using Pipedream, Claude AI, and DocuGenerate. This step-by-step tutorial shows how to extract key data from resumes and use it to create PDF reports.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/cover-image-v2.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/027-pipedream-resume-analyzer/cover-image-v2.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Automate PDF Invoice Generation with n8n and DocuGenerate</title> <link href="https://www.docugenerate.com/blog/automate-pdf-invoice-generation-with-n8n-and-docugenerate/" rel="alternate" type="text/html" title="Automate PDF Invoice Generation with n8n and DocuGenerate"/> <published>2025-10-24T00:00:00+00:00</published> <updated>2025-10-24T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/automate-pdf-invoice-generation-with-n8n-and-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/automate-pdf-invoice-generation-with-n8n-and-docugenerate/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Document automation doesn’t always require cloud-based solutions, sometimes the most effective workflows are the ones that run locally on your machine. In this tutorial, we’ll explore how to build an automated invoice generation system using <a href="https://n8n.io/" target="_blank" rel="nofollow noopener">n8n</a>, a powerful workflow automation tool, combined with <a href="https://www.docugenerate.com/">DocuGenerate</a> to create professional PDF invoices.</p> <p>The workflow we’ll build is straightforward yet powerful. It monitors a designated folder on your local machine for new Excel files containing invoice data. When a file appears, the workflow automatically reads the data, generates a separate invoice for each row, and saves the completed PDF documents to an output folder. This approach is particularly useful for businesses that need to process invoices locally and maintain full control over their data.</p> <p>Throughout this guide, we’ll walk through each node in the n8n workflow, explaining its purpose and configuration. By the end of this tutorial, you’ll have a fully functional local invoice generation system that you can adapt to your specific needs.</p> <h2 id="setting-up-template">Setting Up the Template</h2> <p>Before building the n8n workflow, we need to prepare our invoice template. DocuGenerate’s <a href="/templates/">Template Library</a> includes a ready-to-use <a href="https://www.docugenerate.com/assets/templates/invoices/repair/Repair Invoice.zip">Repair Invoice</a> template that’s perfect for this tutorial. You can learn more about using templates from the library in our <a href="/blog/how-to-use-the-templates-from-the-template-library/">previous guide</a>.</p> <p>The template contains merge tags like <code class="language-plaintext highlighter-rouge">Invoice No</code>, <code class="language-plaintext highlighter-rouge">Customer Name</code>, <code class="language-plaintext highlighter-rouge">Product Name</code>, and other common invoice fields. These <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> will be automatically replaced with actual data from the Excel file during the document generation process. The template also includes a sample Excel file with ten rows of invoice data, which we’ll use to demonstrate the workflow.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/repair-invoice-template.png" alt="The Repair Invoice template in DocuGenerate"/></p> <p>Once you’ve downloaded the template from the library, upload the file <a href="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/Repair Invoice.docx">Repair Invoice.docx</a> to your DocuGenerate account. With the template ready, we can now turn our attention to building the n8n workflow that will automate the entire invoice generation process.</p> <h2 id="workflow-overview">The Complete Workflow Overview</h2> <p>The workflow we’re building consists of several interconnected nodes that work together to monitor for files, process data, generate documents, and save the results on the disk. Here’s what the complete workflow looks like in n8n:</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/complete-workflow.png" alt="The complete n8n workflow"/></p> <p>The workflow begins with a trigger that watches a local folder for new files. When an Excel file is added, the workflow validates the file extension, reads the file content, extracts the data into structured rows, and then loops through each row to generate an individual invoice. Each generated invoice is downloaded and saved to a designated output folder on your local machine. This entire process runs automatically, requiring no manual intervention once configured.</p> <p>If you’d like to import this workflow directly into your n8n instance, you can download the <a href="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/n8n-workflow.json" target="_blank">workflow JSON file</a> and import it. This can save you time and ensure all the nodes are configured correctly. Now let’s examine each node in detail to understand how the workflow operates.</p> <h2 id="local-file-trigger">Configuring the Local File Trigger</h2> <p>The workflow starts with the <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.localfiletrigger/" target="_blank" rel="nofollow noopener">Local File Trigger</a> node, which monitors a specific folder on your computer for new files. This trigger is the entry point for the entire automation process. For this tutorial, we’re watching the <code class="language-plaintext highlighter-rouge">/Users/docugenerate/n8n/Data</code> folder, but you can configure this to any directory on your system where you plan to add Excel files.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/local-file-trigger-v3.png" alt="Local File Trigger configuration" class="desktop-width-50"/></p> <p>The trigger is configured to detect the <code class="language-plaintext highlighter-rouge">File Added</code> event, meaning it activates whenever a new file appears in the monitored folder. This is ideal for batch processing scenarios where you might drop multiple Excel files into a folder throughout the day and want them processed automatically. The trigger captures the file path and passes it to the next node in the workflow.</p> <p>For this example, we’ll be using the <strong>Repair Invoice.xlsx</strong> file from the sample template, which contains ten rows of invoice data. Each row represents a separate invoice with details like invoice number, customer information, service descriptions, and amounts.</p> <h2 id="check-file-extension">Validating the File Extension</h2> <p>After the trigger detects a new file, we need to verify that it’s actually an Excel file before attempting to process it. The <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.if/" target="_blank" rel="nofollow noopener">If</a> node serves this purpose by checking whether the file path ends with the <code class="language-plaintext highlighter-rouge">.xlsx</code> extension. This validation step prevents errors that could occur if someone accidentally drops a different file type into the monitored folder.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/if-condition.png" alt="Checking if file is an Excel file" class="desktop-width-75"/></p> <p>If the condition evaluates to true, the workflow continues to the next step. If false, the workflow stops, preventing unnecessary processing of incompatible files. This simple check adds robustness to the workflow and ensures that only valid Excel files are processed.</p> <h2 id="read-file-from-disk">Reading the File from Disk</h2> <p>Once we’ve confirmed that the file is an Excel spreadsheet, the <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.readwritefile/#read-files-from-disk" target="_blank" rel="nofollow noopener">Read File from Disk</a> node retrieves the actual file content from your local machine. This node uses the file path provided by the trigger to locate and read the binary data of the Excel file.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/read-file-from-disk-v2.png" alt="Reading the file from disk"/></p> <p>The configuration is straightforward. The <strong>File(s) Selector</strong> parameter is set to <code class="language-plaintext highlighter-rouge">{{ $json.path }}</code>, which references the path captured by the <a href="#local-file-trigger">trigger</a>. In the options section, we specify <code class="language-plaintext highlighter-rouge">data</code> as the name of the output binary field where the file content will be stored. This field name will be used in subsequent nodes to access the file data.</p> <p>It’s important to note that this node works with files on the same computer running n8n. If you need to handle files between different computers, you would need to use alternative nodes such as FTP, HTTP Request, or AWS S3 nodes. For local processing scenarios like ours, this node provides a simple and efficient solution.</p> <h2 id="extract-from-file">Extracting Data from the Excel File</h2> <p>With the file content now available as binary data, we need to convert it into a structured format that can be processed by the workflow. The <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.extractfromfile/" target="_blank" rel="nofollow noopener">Extract from File</a> node handles this transformation by parsing the Excel file and converting each row into a separate data item.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/extract-from-file.png" alt="Extracting data from the Excel file"/></p> <p>The node is configured with the <strong>Extract from XLSX</strong> operation, and the <strong>Input Binary Field</strong> is set to <code class="language-plaintext highlighter-rouge">data</code>, which matches the field name we specified in the <a href="#read-file-from-disk">previous node</a>. This step is essential because it transforms the raw binary file data into structured JSON objects that contain the invoice information from each row. These structured data items can now be processed individually to generate invoices.</p> <h2 id="loop-over-items">Looping Through Each Invoice Record</h2> <p>Now that we have the structured data items from the Excel file, we need to process each one individually to generate a separate invoice. The <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/" target="_blank" rel="nofollow noopener">Loop Over Items</a> node enables this by iterating through the items in batches. For this workflow, we’re using a batch size of one, meaning each invoice is generated and saved before moving to the next one.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/loop-over-items.png" alt="Looping over items with batch size of 1"/></p> <p>This batching approach is particularly useful for document generation because it ensures that each invoice is completely processed before starting the next one. It also helps manage system resources when dealing with larger datasets. The loop continues until all items have been processed, with the workflow executing the same sequence of nodes for each invoice record.</p> <h2 id="generate-document">Generating the Invoice Document</h2> <p>The <a href="/help/articles/automate-document-generation-with-n8n/#generate-document">Generate Document</a> node that takes the data from each row and merges it with the template to create a PDF invoice. To use this node, you’ll need to install the <a href="/help/articles/automate-document-generation-with-n8n/#install-docugenerate">DocuGenerate node</a> in your n8n instance.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/generate-document-v2.png" alt="Generating the invoice document"/></p> <p>The node configuration requires several parameters:</p> <ul> <li><strong>Template Name or ID</strong> is set to <code class="language-plaintext highlighter-rouge">Repair Invoice</code>, which matches the template we <a href="#setting-up-template">uploaded earlier</a>.</li> <li><strong>Name</strong> uses an expression <code class="language-plaintext highlighter-rouge">Invoice no {{ $json['Invoice No'] }}</code> to dynamically name each document based on the invoice number from the data.</li> <li><strong>Format</strong> is set to <code class="language-plaintext highlighter-rouge">PDF (.pdf)</code> to generate PDF documents.</li> <li><strong>Data</strong> is configured with <code class="language-plaintext highlighter-rouge">{{ $json }}</code>, which passes the entire current data item to the document generation API. This means all the fields from the Excel row are available for merge tags in the template.</li> </ul> <p>The API processes this request and returns a response that includes a <code class="language-plaintext highlighter-rouge">document_uri</code> field pointing to the generated document.</p> <h2 id="get-file-from-url">Downloading the Generated Document</h2> <p>After DocuGenerate creates the invoice, <strong>Get File from URL</strong> uses the built-in <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/" target="_blank" rel="nofollow noopener">HTTP Request</a> node to retrieve the generated PDF from the URL provided in the previous step’s response.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/get-file-from-url.png" alt="Getting the file from URL"/></p> <p>The <strong>URL</strong> parameter is set to <code class="language-plaintext highlighter-rouge">{{ $json.document_uri }}</code>, which references the document URL returned by the <a href="#generate-document">Generate Document</a> node. In the options section, the <strong>Response Format</strong> is configured as <code class="language-plaintext highlighter-rouge">File</code> to ensure the data is treated as binary content rather than text. The <strong>Put Output in Field</strong> option is set to <code class="language-plaintext highlighter-rouge">data</code>, storing the PDF content in a field that can be accessed by the next node.</p> <p>For this example, the generated document has the filename <code class="language-plaintext highlighter-rouge">Invoice no 58-223-0655.pdf</code>, which was dynamically created based on the invoice number in the first row of our sample data. Each subsequent invoice will have its own unique filename following the same pattern.</p> <h2 id="write-file-to-disk">Saving the Invoice to Disk</h2> <p>The final step in the workflow saves the generated invoice PDF to a designated folder on your local machine. The <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.readwritefile/#write-file-to-disk" target="_blank" rel="nofollow noopener">Write File to Disk</a> node handles this operation, storing each completed invoice where you can easily access it.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/write-file-to-disk.png" alt="Writing the file to disk"/></p> <p>The <strong>File Path and Name</strong> parameter is configured with <code class="language-plaintext highlighter-rouge">/Users/docugenerate/n8n/Invoices/{{ $data.filename }}</code>, which combines a base directory path with the dynamic filename from the generated document. The <strong>Input Binary Field</strong> is set to <code class="language-plaintext highlighter-rouge">data</code>, which contains the PDF content retrieved in the <a href="#get-file-from-url">previous step</a>.</p> <p>This configuration saves all invoices to the same folder, but you could customize this further. For example, you might organize invoices by date, or group them by customer name. The flexibility of n8n expressions allows you to create any folder structure that suits your business needs. Just keep in mind that this node is designed for working with files on the same computer running n8n.</p> <h2 id="workflow-execution">Running the Workflow</h2> <p>With all the nodes configured, the workflow is ready to process invoices automatically. To test it, simply add the <strong>Repair Invoice.xlsx</strong> file to the <code class="language-plaintext highlighter-rouge">Data</code> folder that the trigger is monitoring. The workflow will immediately detect the new file and begin processing.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/execute-workflow-v2.gif" alt="Executing the workflow"/></p> <p>The animation above shows the <a href="#loop-over-items">Loop Over Items</a> segment in action, iterating through all ten data items from the Excel file. For each item, the workflow generates an invoice using the template and data, downloads the PDF, and saves it to the destination folder. You can watch the progress in real-time through n8n’s visual interface, which provides excellent visibility into each step of the process.</p> <p><img src="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/invoices-folder.png" alt="Generated invoices in the output folder"/></p> <p>Once the workflow completes, all ten invoices have been generated and saved in the <code class="language-plaintext highlighter-rouge">Invoices</code> folder. This automated approach eliminates the need for manual document creation, saving significant time and reducing the potential for errors that can occur with manual data entry.</p> <h2 id="conclusion">Conclusion</h2> <p>Building local <a href="https://www.docugenerate.com/integrations/#n8n">automation workflows with n8n</a> and DocuGenerate offers a powerful solution for businesses that need to process documents efficiently while maintaining full control over their data. The workflow we’ve built demonstrates how easy it is to monitor folders, validate files, extract data, and generate professional documents without relying on cloud services or complex integrations.</p> <p>This approach is particularly valuable for scenarios where data privacy is paramount, internet connectivity is limited, or you simply prefer to keep your document processing pipeline local. The flexibility of n8n allows you to extend this workflow in numerous ways. You could add email notifications when invoices are generated, create backup copies, or integrate with your existing business systems with other solutions.</p> <p>The workflow we’ve created processes repair invoices, but the same pattern can be applied to any document type supported by DocuGenerate. Whether you need to generate contracts, letters, certificates, or reports, the core workflow remains the same. You simply need to adjust the template and ensure your Excel data matches the merge tags in your chosen template.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/n8n-workflow.json" target="_blank">n8n workflow JSON file</a> that you can import into your n8n instance.</li> <li>The <a href="https://www.docugenerate.com/assets/templates/invoices/repair/Repair Invoice.zip">Repair Invoice </a> template from DocuGenerate’s Template Library.</li> <li>The official <a href="https://docs.n8n.io/" target="_blank" rel="nofollow noopener">n8n documentation</a> page.</li> <li>The complete DocuGenerate <a href="/help/articles/automate-document-generation-with-n8n/">integration guide</a> for n8n.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Invoices"/> <category term="n8n"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to build an automated invoice generation workflow with n8n and DocuGenerate that monitors a folder for Excel files, extracts the data, and generates professional PDF invoices. Ideal for local processing without relying on multiple cloud-based solutions.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/cover-image-v2.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/026-n8n-generate-invoices/cover-image-v2.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Sync Templates from Google Docs to DocuGenerate with Apps Script</title> <link href="https://www.docugenerate.com/blog/sync-templates-from-google-docs-to-docugenerate-with-apps-script/" rel="alternate" type="text/html" title="Sync Templates from Google Docs to DocuGenerate with Apps Script"/> <published>2025-09-25T00:00:00+00:00</published> <updated>2025-09-25T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/sync-templates-from-google-docs-to-docugenerate-with-apps-script</id> <content type="html" xml:base="https://www.docugenerate.com/blog/sync-templates-from-google-docs-to-docugenerate-with-apps-script/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>While DocuGenerate primarily works with Word documents, many teams prefer creating and editing their templates in Google Docs due to its superior collaboration features, real-time editing capabilities, and intuitive interface. However, using Google Docs templates in DocuGenerate traditionally requires a manual process: download the Google Doc as a Word file, then upload it to DocuGenerate. While this approach works, it creates friction in your workflow and makes template maintenance cumbersome, especially when templates change frequently.</p> <p>What if you could eliminate this manual step entirely? What if your Google Docs could automatically sync with DocuGenerate, creating new templates when documents are added and updating existing ones when changes are made? This automation would allow your team to continue working in Google Docs while ensuring your DocuGenerate templates stay current without any manual intervention.</p> <p>In this comprehensive tutorial, we’ll build a complete synchronization solution using <a href="https://developers.google.com/apps-script" target="_blank" rel="nofollow noopener">Google Apps Script</a> that monitors a specific Google Drive folder and automatically syncs any changes with your DocuGenerate account. The system handles both initial template creation and ongoing updates, making it perfect for teams that want to maintain their Google Docs workflow while leveraging DocuGenerate’s powerful document generation capabilities.</p> <h2 id="how-sync-works">How the Sync System Works</h2> <p>Our synchronization script monitors a designated Google Drive folder for changes and automatically processes any modified documents, ensuring that your DocuGenerate templates always reflect the latest version of your Google Docs. The sync workflow follows this logical sequence:</p> <ul> <li> <p><strong>Document Detection</strong>: The <a href="#change-detection">system scans</a> your designated Google Drive folder for Google Docs, identifying both new documents that haven’t been synced yet and existing documents that have been modified recently.</p> </li> <li> <p><strong>Template Mapping</strong>: For each document, the script checks whether it already corresponds to a DocuGenerate template by examining the document’s custom properties. These properties act as a bridge between the two systems, storing the <a href="#document-synchronization">DocuGenerate template ID</a> directly within the Google Doc’s metadata.</p> </li> <li> <p><strong>Format Conversion</strong>: When a document needs to be synced, the script <a href="#converting-documents">converts it</a> from Google Docs format to Microsoft Word format (<code class="language-plaintext highlighter-rouge">.docx</code>), which is the format DocuGenerate expects for template processing.</p> </li> <li> <p><strong>API Communication</strong>: Depending on whether the document is new or existing, the automation either <a href="#creating-templates">creates a new template</a> in DocuGenerate or <a href="#updating-templates">updates an existing one</a> using the DocuGenerate API.</p> </li> <li> <p><strong>Metadata Storage</strong>: After successful synchronization, the script stores the DocuGenerate template ID in the Google Doc’s custom properties, ensuring future updates will modify the correct template rather than creating duplicates.</p> </li> </ul> <p>This design ensures that your team can continue working naturally in Google Docs while the automated sync handles all the technical details of keeping DocuGenerate templates up to date. You can take a look at the <a href="https://www.docugenerate.com/assets/posts/025-sync-google-docs/apps-script.txt" target="_blank">complete script</a> that we’ll be building in this tutorial, if you want to get an idea of how it’s all working.</p> <h2 id="setting-up-apps-script">Setting Up the Apps Script Project</h2> <p>Google Apps Script provides a powerful platform for automating workflows between Google Workspace applications and external APIs. For our synchronization solution, we’ll create a new Apps Script project that contains all the functions needed to monitor Google Docs and communicate with DocuGenerate.</p> <p>To begin, navigate to <a href="https://script.google.com/" target="_blank" rel="nofollow noopener">Apps Script</a> and create a new project. You’ll start with a blank canvas where we can build our complete synchronization solution. Our project for this tutorial is called <strong>Templates Sync DocuGenerate</strong> as you can see in the image below.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/new-apps-script-project.png" alt="Creating a new Apps Script project placeholder"/></p> <h3 id="enabling-drive-api">Enabling the Google Drive API</h3> <p>Our synchronization script needs access to advanced Google Drive functionality that goes beyond the standard DriveApp service. Specifically, we need the <a href="https://developers.google.com/workspace/drive/api/guides/about-sdk" target="_blank" rel="nofollow noopener">Google Drive API</a> v3 to work with custom file properties, which is how we’ll track the relationship between Google Docs and DocuGenerate templates.</p> <p>To enable the Google Drive API in your newly created Apps Script project, click <strong>Add a service</strong> in the left sidebar of the Apps Script editor.<br/> <img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/add-a-service.png" alt="Creating a new Apps Script project placeholder" class="desktop-width-75"/></p> <p>Then search for <strong>Drive API</strong>, set the identifier to <code class="language-plaintext highlighter-rouge">Drive</code> and click the <strong>Add</strong> button to finish the setup.<br/> <img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/add-drive-service.png" alt="Adding the Google Drive API service" class="desktop-width-50"/></p> <p>This step is crucial because the standard DriveApp service doesn’t provide access to custom file properties, which we use to store the DocuGenerate template ID within each Google Doc’s metadata. Without this API access, our script wouldn’t be able to track which documents have already been synced or determine whether to create new templates or update existing ones.</p> <h3 id="configuring-credentials">Configuring Your Credentials</h3> <p>Before implementing the sync functions, you’ll need to configure the system with your specific credentials and settings. Our script uses a configuration object that centralizes all the settings you need to customize:</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">CONFIG</span> <span class="o">=</span> <span class="p">{</span>
  <span class="na">DOCUGENERATE_API_KEY</span><span class="p">:</span> <span class="dl">'</span><span class="s1">YOUR_API_KEY_HERE</span><span class="dl">'</span><span class="p">,</span> <span class="c1">// Get from DocuGenerate settings</span>
  <span class="na">DOCUGENERATE_BASE_URL</span><span class="p">:</span> <span class="dl">'</span><span class="s1">https://api.docugenerate.com/v1</span><span class="dl">'</span><span class="p">,</span> <span class="c1">// Change region if needed</span>
  <span class="na">MONITORED_FOLDER_ID</span><span class="p">:</span> <span class="dl">'</span><span class="s1">YOUR_FOLDER_ID_HERE</span><span class="dl">'</span> <span class="c1">// Google Drive folder ID to monitor</span>
<span class="p">};</span>
</code></pre></div></div> <ul> <li> <p><strong>DOCUGENERATE_API_KEY</strong>: You can find your API Key in your <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">Developers settings</a> page. This key authenticates all requests to the DocuGenerate API and ensures that generated templates are properly associated with your account.</p> </li> <li> <p><strong>DOCUGENERATE_BASE_URL</strong>: The default URL points to DocuGenerate’s primary processing region. If you’re using a <a href="https://www.docugenerate.com/help/articles/can-i-use-regional-api-endpoints/">regional endpoint</a> for faster processing in your geographic area, update this URL accordingly.</p> </li> <li> <p><strong>MONITORED_FOLDER_ID</strong>: This is the unique identifier for the Google Drive folder you want to monitor. You can extract the folder ID from any Google Drive URL: <code class="language-plaintext highlighter-rouge">https://drive.google.com/drive/folders/&lt;FOLDER_ID&gt;</code></p> </li> </ul> <h2 id="manual-sync-function">Building the Manual Sync Function</h2> <p>The manual sync function serves as the foundation of our synchronization solution and provides the initial setup mechanism for establishing connections between your Google Docs and DocuGenerate templates. This function processes all documents in your monitored folder regardless of when they were last modified, making it perfect for initial setup or bulk synchronization operations.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/**
 * Manual sync function - syncs all documents in the monitored folder
 * Useful for initial setup or bulk sync
 */</span>
<span class="kd">function</span> <span class="nf">manualSync</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">try</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Starting manual sync of all documents...</span><span class="dl">'</span><span class="p">);</span>

    <span class="kd">const</span> <span class="nx">folder</span> <span class="o">=</span> <span class="nx">DriveApp</span><span class="p">.</span><span class="nf">getFolderById</span><span class="p">(</span><span class="nx">CONFIG</span><span class="p">.</span><span class="nx">MONITORED_FOLDER_ID</span><span class="p">);</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="s2">`Processing folder: </span><span class="p">${</span><span class="nx">folder</span><span class="p">.</span><span class="nf">getName</span><span class="p">()}</span><span class="s2">`</span><span class="p">);</span>

    <span class="kd">const</span> <span class="nx">files</span> <span class="o">=</span> <span class="nx">folder</span><span class="p">.</span><span class="nf">getFilesByType</span><span class="p">(</span><span class="nx">MimeType</span><span class="p">.</span><span class="nx">GOOGLE_DOCS</span><span class="p">);</span>

    <span class="k">while </span><span class="p">(</span><span class="nx">files</span><span class="p">.</span><span class="nf">hasNext</span><span class="p">())</span> <span class="p">{</span>
      <span class="kd">const</span> <span class="nx">file</span> <span class="o">=</span> <span class="nx">files</span><span class="p">.</span><span class="nf">next</span><span class="p">();</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="s2">`Processing: </span><span class="p">${</span><span class="nx">file</span><span class="p">.</span><span class="nf">getName</span><span class="p">()}</span><span class="s2">`</span><span class="p">);</span>
      <span class="nf">syncDocument</span><span class="p">(</span><span class="nx">file</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Manual sync completed!</span><span class="dl">'</span><span class="p">);</span>

  <span class="p">}</span> <span class="k">catch </span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error in manual sync:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">error</span><span class="p">);</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div> <p>This function demonstrates several key concepts that are used throughout our synchronization script:</p> <p><strong>Folder Access</strong>: The function uses <code class="language-plaintext highlighter-rouge">DriveApp.getFolderById()</code> to access the specific folder we want to monitor. This approach ensures that only documents in the designated folder are processed, preventing accidental synchronization of unrelated documents.</p> <p><strong>File Type Filtering</strong>: By using <code class="language-plaintext highlighter-rouge">getFilesByType(MimeType.GOOGLE_DOCS)</code>, the function automatically filters out any non-Google Docs files in the folder. This ensures that only documents that can be converted to Word format are processed.</p> <p><strong>Iterator Pattern</strong>: Google Apps Script uses iterators for file collections to handle potentially large numbers of files efficiently. The <code class="language-plaintext highlighter-rouge">while (files.hasNext())</code> loop processes each file individually, allowing for detailed logging and error handling on a per-document basis.</p> <p><strong>Delegation to Core Logic</strong>: The actual synchronization work is handled by the <code class="language-plaintext highlighter-rouge">syncDocument()</code> function, which we’ll examine next. This separation of concerns makes the code more maintainable and allows the same core logic to be used by both manual and automatic sync operations.</p> <p><strong>Error Handling</strong>: The entire operation is wrapped in a try-catch block to ensure that any errors during processing are properly logged and don’t crash the entire sync operation. This is particularly important for automated scripts that need to run reliably over time.</p> <p>You should run this function first when setting up your sync automation, as it establishes the initial mappings between your existing Google Docs and their corresponding DocuGenerate templates.</p> <h2 id="document-synchronization">Understanding Document Synchronization</h2> <p>The <code class="language-plaintext highlighter-rouge">syncDocument()</code> function contains the core logic that handles the synchronization process for individual documents. This function is responsible for determining whether a document needs to create a new template or update an existing one, managing the conversion process, and maintaining the metadata that tracks the relationship between Google Docs and DocuGenerate templates.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/**
 * Syncs a Google Doc to DocuGenerate
 */</span>
<span class="kd">function</span> <span class="nf">syncDocument</span><span class="p">(</span><span class="nx">doc</span><span class="p">)</span> <span class="p">{</span>
  <span class="k">try</span> <span class="p">{</span>
    <span class="kd">const</span> <span class="nx">docId</span> <span class="o">=</span> <span class="nx">doc</span><span class="p">.</span><span class="nf">getId</span><span class="p">();</span>
    <span class="kd">const</span> <span class="nx">docName</span> <span class="o">=</span> <span class="nx">doc</span><span class="p">.</span><span class="nf">getName</span><span class="p">();</span>

    <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="s2">`Syncing document: </span><span class="p">${</span><span class="nx">docName</span><span class="p">}</span><span class="s2"> (</span><span class="p">${</span><span class="nx">docId</span><span class="p">}</span><span class="s2">)`</span><span class="p">);</span>

    <span class="c1">// Check if document already has a template ID</span>
    <span class="kd">const</span> <span class="nx">docMetadata</span> <span class="o">=</span> <span class="nx">Drive</span><span class="p">.</span><span class="nx">Files</span><span class="p">.</span><span class="nf">get</span><span class="p">(</span><span class="nx">docId</span><span class="p">,</span> <span class="p">{</span>
      <span class="na">fields</span><span class="p">:</span> <span class="dl">'</span><span class="s1">properties</span><span class="dl">'</span>
    <span class="p">});</span>
    <span class="kd">const</span> <span class="nx">docProperties</span> <span class="o">=</span> <span class="nx">docMetadata</span><span class="p">.</span><span class="nx">properties</span> <span class="o">||</span> <span class="p">{};</span>
    <span class="kd">const</span> <span class="nx">existingTemplateId</span> <span class="o">=</span> <span class="nx">docProperties</span><span class="p">[</span><span class="dl">'</span><span class="s1">docugenerate_template_id</span><span class="dl">'</span><span class="p">];</span>

    <span class="c1">// Convert Google Doc to Word format</span>
    <span class="kd">const</span> <span class="nx">wordBlob</span> <span class="o">=</span> <span class="nf">convertToWordFormat</span><span class="p">(</span><span class="nx">docId</span><span class="p">,</span> <span class="nx">docName</span><span class="p">);</span>

    <span class="k">if </span><span class="p">(</span><span class="nx">existingTemplateId</span><span class="p">)</span> <span class="p">{</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="s2">`Updating existing template: </span><span class="p">${</span><span class="nx">existingTemplateId</span><span class="p">}</span><span class="s2">`</span><span class="p">);</span>
      <span class="nf">updateTemplate</span><span class="p">(</span><span class="nx">existingTemplateId</span><span class="p">,</span> <span class="nx">wordBlob</span><span class="p">,</span> <span class="nx">docName</span><span class="p">);</span>
    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Creating new template</span><span class="dl">'</span><span class="p">);</span>
      <span class="kd">const</span> <span class="nx">templateId</span> <span class="o">=</span> <span class="nf">createTemplate</span><span class="p">(</span><span class="nx">wordBlob</span><span class="p">,</span> <span class="nx">docName</span><span class="p">);</span>

      <span class="k">if </span><span class="p">(</span><span class="nx">templateId</span><span class="p">)</span> <span class="p">{</span>
        <span class="c1">// Store the template ID in document properties</span>
        <span class="nx">Drive</span><span class="p">.</span><span class="nx">Files</span><span class="p">.</span><span class="nf">update</span><span class="p">({</span>
          <span class="na">properties</span><span class="p">:</span> <span class="p">{</span>
            <span class="dl">'</span><span class="s1">docugenerate_template_id</span><span class="dl">'</span><span class="p">:</span> <span class="nx">templateId</span>
          <span class="p">}</span>
        <span class="p">},</span> <span class="nx">docId</span><span class="p">);</span>
      <span class="p">}</span>
    <span class="p">}</span>

  <span class="p">}</span> <span class="k">catch </span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error syncing document:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">error</span><span class="p">);</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div> <p>This function illustrates several sophisticated concepts that make the sync solution robust and intelligent:</p> <p><strong>Metadata Inspection</strong>: The function uses the Google Drive API v3 to examine the document’s custom properties. These properties are invisible to users but provide a powerful way to store metadata that persists with the document. The <code class="language-plaintext highlighter-rouge">Drive.Files.get()</code> call specifically requests only the properties field to minimize API usage and improve performance.</p> <p><strong>Decision Logic</strong>: Based on whether the document already has a <code class="language-plaintext highlighter-rouge">docugenerate_template_id</code> property, the function decides whether to create a new template or update an existing one. This decision logic prevents duplicate templates and ensures that document modifications result in template updates rather than new template creation.</p> <p><strong>Format Conversion</strong>: Every synchronization operation requires converting the Google Doc to Word format, which is handled by the <code class="language-plaintext highlighter-rouge">convertToWordFormat()</code> function. This conversion ensures that DocuGenerate receives the template in a format it can process reliably.</p> <p><strong>Metadata Persistence</strong>: When a new template is successfully created in DocuGenerate, the function stores the returned template ID in the document’s properties using <code class="language-plaintext highlighter-rouge">Drive.Files.update()</code>. This creates a permanent link between the Google Doc and its corresponding DocuGenerate template.</p> <p><strong>Graceful Error Handling</strong>: Individual document errors don’t stop the overall sync process. If one document fails to sync, the error is logged, but the system continues processing other documents.</p> <p>This approach ensures that the sync system behaves intelligently and maintains data integrity across both platforms. The metadata storage mechanism is particularly elegant because it’s completely invisible to users while providing the system with the information needed to make smart decisions about template management.</p> <h2 id="converting-documents">Converting Documents to Word Format</h2> <p>The document conversion process is a critical component of our sync solution because DocuGenerate expects templates to be in Microsoft Word format (<code class="language-plaintext highlighter-rouge">.docx</code>). Google Apps Script provides built-in functionality to export Google Docs in various formats, and we leverage this functionality to create properly formatted Word documents that maintain all the formatting, styles, and merge tags from the original Google Doc.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/**
 * Converts a Google Doc to Word format (.docx)
 */</span>
<span class="kd">function</span> <span class="nf">convertToWordFormat</span><span class="p">(</span><span class="nx">docId</span><span class="p">,</span> <span class="nx">docName</span><span class="p">)</span> <span class="p">{</span>
  <span class="k">try</span> <span class="p">{</span>
    <span class="c1">// Export as Word document</span>
    <span class="kd">const</span> <span class="nx">url</span> <span class="o">=</span> <span class="s2">`https://docs.google.com/document/d/</span><span class="p">${</span><span class="nx">docId</span><span class="p">}</span><span class="s2">/export?format=docx`</span><span class="p">;</span>
    <span class="kd">const</span> <span class="nx">response</span> <span class="o">=</span> <span class="nx">UrlFetchApp</span><span class="p">.</span><span class="nf">fetch</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span> <span class="p">{</span>
      <span class="na">headers</span><span class="p">:</span> <span class="p">{</span>
        <span class="dl">'</span><span class="s1">Authorization</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Bearer </span><span class="dl">'</span> <span class="o">+</span> <span class="nx">ScriptApp</span><span class="p">.</span><span class="nf">getOAuthToken</span><span class="p">()</span>
      <span class="p">}</span>
    <span class="p">});</span>

    <span class="c1">// Return blob with proper name and content type</span>
    <span class="k">return</span> <span class="nx">response</span><span class="p">.</span><span class="nf">getBlob</span><span class="p">()</span>
      <span class="p">.</span><span class="nf">setName</span><span class="p">(</span><span class="s2">`</span><span class="p">${</span><span class="nx">docName</span><span class="p">}</span><span class="s2">.docx`</span><span class="p">)</span>
      <span class="p">.</span><span class="nf">setContentType</span><span class="p">(</span><span class="nx">MimeType</span><span class="p">.</span><span class="nx">MICROSOFT_WORD</span><span class="p">);</span>

  <span class="p">}</span> <span class="k">catch </span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error converting to Word format:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">error</span><span class="p">);</span>
    <span class="k">throw</span> <span class="nx">error</span><span class="p">;</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div> <p>This function demonstrates several important technical concepts:</p> <p><strong>Google’s Export API</strong>: Google provides a direct export URL for each document that can generate the document in various formats. The <code class="language-plaintext highlighter-rouge">format=docx</code> parameter specifically requests Microsoft Word format, which ensures compatibility with DocuGenerate’s template processing system.</p> <p><strong>OAuth Authentication</strong>: The conversion process requires authentication to access private Google Docs. The <code class="language-plaintext highlighter-rouge">ScriptApp.getOAuthToken()</code> method provides the necessary OAuth token that grants the script access to the document on behalf of the user who authorized the script.</p> <p><strong>Blob Management</strong>: Google Apps Script represents files as “blobs” - binary large objects that contain the file data along with metadata like filename and content type. The function properly sets both the filename (adding the <code class="language-plaintext highlighter-rouge">.docx</code> extension) and the MIME type to ensure the resulting file is recognized as a proper Word document.</p> <p><strong>Error Propagation</strong>: Unlike other functions that catch and log errors locally, this function re-throws errors to the calling function. This design ensures that if document conversion fails, the calling function can handle the error appropriately (such as skipping the document or retrying later).</p> <p><strong>Filename Handling</strong>: The function automatically appends the <code class="language-plaintext highlighter-rouge">.docx</code> extension to the document name, ensuring that the resulting file has the correct extension regardless of how the original Google Doc was named.</p> <p>This conversion process preserves all the important aspects of your Google Doc, including text formatting, tables, images, and most importantly, merge tags that DocuGenerate will use during document generation. The resulting Word document is functionally identical to what you would get if you manually exported the Google Doc through the Google Docs interface.</p> <h2 id="creating-templates">Creating New Templates in DocuGenerate</h2> <p>When a Google Doc doesn’t have an associated DocuGenerate template (indicated by the absence of a <code class="language-plaintext highlighter-rouge">docugenerate_template_id</code> property), the system needs to create a new template in DocuGenerate. This function handles the API communication required to upload the converted Word document and establish it as a new template in your DocuGenerate account.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/**
 * Creates a new template in DocuGenerate
 */</span>
<span class="kd">function</span> <span class="nf">createTemplate</span><span class="p">(</span><span class="nx">wordBlob</span><span class="p">,</span> <span class="nx">templateName</span><span class="p">)</span> <span class="p">{</span>
  <span class="k">try</span> <span class="p">{</span>
    <span class="kd">const</span> <span class="nx">payload</span> <span class="o">=</span> <span class="p">{</span>
      <span class="dl">'</span><span class="s1">file</span><span class="dl">'</span><span class="p">:</span> <span class="nx">wordBlob</span><span class="p">,</span>
      <span class="dl">'</span><span class="s1">name</span><span class="dl">'</span><span class="p">:</span> <span class="nx">templateName</span>
    <span class="p">};</span>

    <span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span>
      <span class="na">method</span><span class="p">:</span> <span class="dl">'</span><span class="s1">POST</span><span class="dl">'</span><span class="p">,</span>
      <span class="na">headers</span><span class="p">:</span> <span class="p">{</span>
        <span class="dl">'</span><span class="s1">Authorization</span><span class="dl">'</span><span class="p">:</span> <span class="nx">CONFIG</span><span class="p">.</span><span class="nx">DOCUGENERATE_API_KEY</span>
        <span class="c1">// Don't set Content-Type - Apps Script will handle it automatically</span>
      <span class="p">},</span>
      <span class="na">payload</span><span class="p">:</span> <span class="nx">payload</span>
    <span class="p">};</span>

    <span class="kd">const</span> <span class="nx">response</span> <span class="o">=</span> <span class="nx">UrlFetchApp</span><span class="p">.</span><span class="nf">fetch</span><span class="p">(</span>
      <span class="s2">`</span><span class="p">${</span><span class="nx">CONFIG</span><span class="p">.</span><span class="nx">DOCUGENERATE_BASE_URL</span><span class="p">}</span><span class="s2">/template`</span><span class="p">,</span>
      <span class="nx">options</span>
    <span class="p">);</span>

    <span class="k">if </span><span class="p">(</span><span class="nx">response</span><span class="p">.</span><span class="nf">getResponseCode</span><span class="p">()</span> <span class="o">===</span> <span class="mi">201</span><span class="p">)</span> <span class="p">{</span>
      <span class="kd">const</span> <span class="nx">responseData</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nf">parse</span><span class="p">(</span><span class="nx">response</span><span class="p">.</span><span class="nf">getContentText</span><span class="p">());</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Template created successfully:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">responseData</span><span class="p">.</span><span class="nx">id</span><span class="p">);</span>
      <span class="k">return</span> <span class="nx">responseData</span><span class="p">.</span><span class="nx">id</span><span class="p">;</span>
    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error creating template:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">response</span><span class="p">.</span><span class="nf">getContentText</span><span class="p">());</span>
      <span class="k">return</span> <span class="kc">null</span><span class="p">;</span>
    <span class="p">}</span>

  <span class="p">}</span> <span class="k">catch </span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error creating template:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">error</span><span class="p">);</span>
    <span class="k">return</span> <span class="kc">null</span><span class="p">;</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div> <p>This function showcases several important aspects of API integration and multipart form handling:</p> <p><strong>Multipart Form Data</strong>: Creating a template requires uploading both a file (the Word document) and metadata (the template name). This function constructs a multipart form payload that includes both pieces of information in the format expected by the DocuGenerate API.</p> <p><strong>Automatic Content-Type Handling</strong>: One crucial detail is that we deliberately avoid setting the <code class="language-plaintext highlighter-rouge">Content-Type</code> header manually. When you include files in the payload, Google Apps Script needs to add boundary parameters to the <code class="language-plaintext highlighter-rouge">multipart/form-data</code> content type. By omitting the Content-Type header, we allow Apps Script to handle this automatically, preventing boundary-related errors.</p> <p><strong>HTTP Status Code Verification</strong>: The DocuGenerate API returns a <code class="language-plaintext highlighter-rouge">201 Created</code> status code when a template is successfully created. The function specifically checks for this status code to distinguish between successful operations and errors, ensuring robust error handling.</p> <p><strong>Response Parsing</strong>: When template creation succeeds, the API returns a JSON response containing the new template’s ID. This ID is crucial because it’s what we’ll store in the Google Doc’s properties to link the document with its corresponding template.</p> <p><strong>Graceful Error Returns</strong>: Rather than throwing exceptions, this function returns <code class="language-plaintext highlighter-rouge">null</code> when errors occur. This approach allows the calling function to continue processing other documents even if one template creation fails.</p> <p><strong>Comprehensive Logging</strong>: The function provides detailed logging for both successful operations and errors, making it easy to diagnose issues during development and monitor system performance in production.</p> <p>The template creation process establishes the fundamental link between your Google Doc and DocuGenerate. Once this link is established through the metadata storage mechanism, all future changes to the Google Doc will result in template updates rather than creating additional templates.</p> <h2 id="updating-templates">Updating Existing Templates</h2> <p>When a Google Doc already has an associated DocuGenerate template (indicated by the presence of a <code class="language-plaintext highlighter-rouge">docugenerate_template_id</code> property), the system updates the existing template rather than creating a new one. This function handles the API communication required to replace the template content while preserving the template ID and any associated settings in DocuGenerate.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/**
 * Updates an existing template in DocuGenerate
 */</span>
<span class="kd">function</span> <span class="nf">updateTemplate</span><span class="p">(</span><span class="nx">templateId</span><span class="p">,</span> <span class="nx">wordBlob</span><span class="p">,</span> <span class="nx">templateName</span><span class="p">)</span> <span class="p">{</span>
  <span class="k">try</span> <span class="p">{</span>
    <span class="kd">const</span> <span class="nx">payload</span> <span class="o">=</span> <span class="p">{</span>
      <span class="dl">'</span><span class="s1">file</span><span class="dl">'</span><span class="p">:</span> <span class="nx">wordBlob</span><span class="p">,</span>
      <span class="dl">'</span><span class="s1">name</span><span class="dl">'</span><span class="p">:</span> <span class="nx">templateName</span>
    <span class="p">};</span>

    <span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span>
      <span class="na">method</span><span class="p">:</span> <span class="dl">'</span><span class="s1">PUT</span><span class="dl">'</span><span class="p">,</span>
      <span class="na">headers</span><span class="p">:</span> <span class="p">{</span>
        <span class="dl">'</span><span class="s1">Authorization</span><span class="dl">'</span><span class="p">:</span> <span class="nx">CONFIG</span><span class="p">.</span><span class="nx">DOCUGENERATE_API_KEY</span>
        <span class="c1">// Don't set Content-Type - Apps Script will handle it automatically</span>
      <span class="p">},</span>
      <span class="na">payload</span><span class="p">:</span> <span class="nx">payload</span>
    <span class="p">};</span>

    <span class="kd">const</span> <span class="nx">response</span> <span class="o">=</span> <span class="nx">UrlFetchApp</span><span class="p">.</span><span class="nf">fetch</span><span class="p">(</span>
      <span class="s2">`</span><span class="p">${</span><span class="nx">CONFIG</span><span class="p">.</span><span class="nx">DOCUGENERATE_BASE_URL</span><span class="p">}</span><span class="s2">/template/</span><span class="p">${</span><span class="nx">templateId</span><span class="p">}</span><span class="s2">`</span><span class="p">,</span>
      <span class="nx">options</span>
    <span class="p">);</span>

    <span class="k">if </span><span class="p">(</span><span class="nx">response</span><span class="p">.</span><span class="nf">getResponseCode</span><span class="p">()</span> <span class="o">===</span> <span class="mi">200</span><span class="p">)</span> <span class="p">{</span>
      <span class="kd">const</span> <span class="nx">responseData</span> <span class="o">=</span> <span class="nx">JSON</span><span class="p">.</span><span class="nf">parse</span><span class="p">(</span><span class="nx">response</span><span class="p">.</span><span class="nf">getContentText</span><span class="p">());</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Template updated successfully:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">templateId</span><span class="p">);</span>
      <span class="k">return</span> <span class="kc">true</span><span class="p">;</span>
    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error updating template:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">response</span><span class="p">.</span><span class="nf">getContentText</span><span class="p">());</span>
      <span class="k">return</span> <span class="kc">false</span><span class="p">;</span>
    <span class="p">}</span>

  <span class="p">}</span> <span class="k">catch </span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error updating template:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">error</span><span class="p">);</span>
    <span class="k">return</span> <span class="kc">false</span><span class="p">;</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div> <p>This function shares many similarities with the template creation function but includes some important differences:</p> <p><strong>HTTP Method</strong>: Template updates use the <code class="language-plaintext highlighter-rouge">PUT</code> method instead of <code class="language-plaintext highlighter-rouge">POST</code>, following RESTful API conventions. The <code class="language-plaintext highlighter-rouge">PUT</code> method indicates that we’re replacing the existing resource entirely with new content.</p> <p><strong>URL Structure</strong>: The URL includes the specific template ID that we’re updating (<code class="language-plaintext highlighter-rouge">/template/${templateId}</code>), ensuring that the update operation targets the correct template in your DocuGenerate account.</p> <p><strong>Status Code Expectations</strong>: Successful updates return a <code class="language-plaintext highlighter-rouge">200 OK</code> status code rather than <code class="language-plaintext highlighter-rouge">201 Created</code>, reflecting the difference between creating new resources and updating existing ones.</p> <p><strong>Return Value Semantics</strong>: The function returns a boolean indicating success or failure rather than returning a resource ID like the creation function. Since the template ID doesn’t change during updates, there’s no need to return it.</p> <p><strong>Content Replacement</strong>: The update operation completely replaces the template content with the new version from the Google Doc. This ensures that all changes, including text modifications, formatting updates, and merge tag adjustments, are reflected in the DocuGenerate template.</p> <p><strong>Preservation of Settings</strong>: While the template content is replaced, other DocuGenerate settings associated with the template remain unchanged. This provides the best of both worlds: current content with preserved configuration.</p> <p>The update mechanism is crucial for maintaining synchronization over time. As your team collaborates on Google Docs and makes changes to templates, this function ensures that your DocuGenerate templates automatically stay current without any manual intervention.</p> <h2 id="automatic-synchronization">Implementing Automatic Synchronization</h2> <p>While manual synchronization is useful for initial setup and bulk operations, the real power of our solution comes from automatic synchronization that runs continuously in the background. This automation ensures that your DocuGenerate templates stay current as your team makes changes to Google Docs, without requiring any manual intervention.</p> <h3 id="time-based-triggers">Setting Up Time-Based Triggers</h3> <p>Google Apps Script provides a powerful trigger mechanism that can execute functions on a schedule. Our automatic sync solution uses time-based triggers to periodically check for document changes and process them automatically.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/**
 * Sets up automatic sync with time-based triggers
 * Run this function once to initialize the sync
 */</span>
<span class="kd">function</span> <span class="nf">setupAutoSync</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">try</span> <span class="p">{</span>
    <span class="c1">// Delete existing triggers to avoid duplicates</span>
    <span class="kd">const</span> <span class="nx">triggers</span> <span class="o">=</span> <span class="nx">ScriptApp</span><span class="p">.</span><span class="nf">getProjectTriggers</span><span class="p">();</span>
    <span class="nx">triggers</span><span class="p">.</span><span class="nf">forEach</span><span class="p">(</span><span class="nx">trigger</span> <span class="o">=&gt;</span> <span class="p">{</span>
      <span class="k">if </span><span class="p">(</span><span class="nx">trigger</span><span class="p">.</span><span class="nf">getHandlerFunction</span><span class="p">()</span> <span class="o">===</span> <span class="dl">'</span><span class="s1">autoSync</span><span class="dl">'</span><span class="p">)</span> <span class="p">{</span>
        <span class="nx">ScriptApp</span><span class="p">.</span><span class="nf">deleteTrigger</span><span class="p">(</span><span class="nx">trigger</span><span class="p">);</span>
      <span class="p">}</span>
    <span class="p">});</span>

    <span class="c1">// Create time-based trigger that runs every 5 minutes</span>
    <span class="nx">ScriptApp</span><span class="p">.</span><span class="nf">newTrigger</span><span class="p">(</span><span class="dl">'</span><span class="s1">autoSync</span><span class="dl">'</span><span class="p">)</span>
      <span class="p">.</span><span class="nf">timeBased</span><span class="p">()</span>
      <span class="p">.</span><span class="nf">everyMinutes</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
      <span class="p">.</span><span class="nf">create</span><span class="p">();</span>

    <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Auto-sync setup completed successfully!</span><span class="dl">'</span><span class="p">);</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Monitored folder:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">CONFIG</span><span class="p">.</span><span class="nx">MONITORED_FOLDER_ID</span><span class="p">);</span>

  <span class="p">}</span> <span class="k">catch </span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error setting up auto-sync:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">error</span><span class="p">);</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div> <p>This setup function demonstrates several important concepts for robust automation:</p> <p><strong>Duplicate Prevention</strong>: Before creating a new trigger, the function removes any existing triggers that would call the same function. This prevents the creation of multiple overlapping triggers if the setup function is run multiple times.</p> <p><strong>Trigger Configuration</strong>: The trigger is configured to run every 5 minutes, which provides a good balance between responsiveness (changes are detected quickly) and efficiency (the system doesn’t waste resources checking for changes too frequently).</p> <p><strong>Error Handling</strong>: Like all our functions, the setup process includes comprehensive error handling to ensure that trigger creation problems are properly logged and don’t crash the automation.</p> <p><strong>Confirmation Logging</strong>: The function provides clear confirmation when the automatic sync is successfully set up, including details about which folder is being monitored.</p> <p>You only need to run this function once to establish the automatic synchronization. After running it, the <code class="language-plaintext highlighter-rouge">autoSync()</code> function will automatically execute every 5 minutes, checking for document changes and processing them as needed.</p> <h3 id="change-detection">Efficient Change Detection</h3> <p>The automatic sync function is designed to be highly efficient by only processing documents that have been modified recently. This approach minimizes API usage and processing time while ensuring that changes are detected and synchronized promptly.</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/**
 * Automatically checks for modified documents and syncs them
 * This function is called automatically every 5 minutes
 */</span>
<span class="kd">function</span> <span class="nf">autoSync</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">try</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Running auto-sync check...</span><span class="dl">'</span><span class="p">);</span>

    <span class="kd">const</span> <span class="nx">folder</span> <span class="o">=</span> <span class="nx">DriveApp</span><span class="p">.</span><span class="nf">getFolderById</span><span class="p">(</span><span class="nx">CONFIG</span><span class="p">.</span><span class="nx">MONITORED_FOLDER_ID</span><span class="p">);</span>
    <span class="kd">const</span> <span class="nx">files</span> <span class="o">=</span> <span class="nx">folder</span><span class="p">.</span><span class="nf">getFilesByType</span><span class="p">(</span><span class="nx">MimeType</span><span class="p">.</span><span class="nx">GOOGLE_DOCS</span><span class="p">);</span>

    <span class="c1">// Check for files modified in the last 5 minutes</span>
    <span class="kd">const</span> <span class="nx">lastCheck</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Date</span><span class="p">(</span><span class="nb">Date</span><span class="p">.</span><span class="nf">now</span><span class="p">()</span> <span class="o">-</span> <span class="mi">5</span> <span class="o">*</span> <span class="mi">60</span> <span class="o">*</span> <span class="mi">1000</span><span class="p">);</span>
    <span class="kd">let</span> <span class="nx">modifiedCount</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>

    <span class="k">while </span><span class="p">(</span><span class="nx">files</span><span class="p">.</span><span class="nf">hasNext</span><span class="p">())</span> <span class="p">{</span>
      <span class="kd">const</span> <span class="nx">file</span> <span class="o">=</span> <span class="nx">files</span><span class="p">.</span><span class="nf">next</span><span class="p">();</span>

      <span class="c1">// Check if file was modified recently</span>
      <span class="k">if </span><span class="p">(</span><span class="nx">file</span><span class="p">.</span><span class="nf">getLastUpdated</span><span class="p">()</span> <span class="o">&gt;</span> <span class="nx">lastCheck</span><span class="p">)</span> <span class="p">{</span>
        <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="s2">`Auto-syncing recently modified document: </span><span class="p">${</span><span class="nx">file</span><span class="p">.</span><span class="nf">getName</span><span class="p">()}</span><span class="s2">`</span><span class="p">);</span>
        <span class="nf">syncDocument</span><span class="p">(</span><span class="nx">file</span><span class="p">);</span>
        <span class="nx">modifiedCount</span><span class="o">++</span><span class="p">;</span>
      <span class="p">}</span>
    <span class="p">}</span>

    <span class="k">if </span><span class="p">(</span><span class="nx">modifiedCount</span> <span class="o">===</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">No recently modified documents found</span><span class="dl">'</span><span class="p">);</span>
    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
      <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="s2">`Synced </span><span class="p">${</span><span class="nx">modifiedCount</span><span class="p">}</span><span class="s2"> modified document(s)`</span><span class="p">);</span>
    <span class="p">}</span>

  <span class="p">}</span> <span class="k">catch </span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
    <span class="nx">console</span><span class="p">.</span><span class="nf">error</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error in periodic sync:</span><span class="dl">'</span><span class="p">,</span> <span class="nx">error</span><span class="p">);</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div> <p>This function showcases several optimization techniques that make automatic synchronization efficient and reliable:</p> <p><strong>Timestamp-Based Filtering</strong>: The function only processes documents that have been modified within the last 5 minutes (matching the trigger frequency). This dramatically reduces the number of documents that need to be checked on each run.</p> <p><strong>Minimal Processing</strong>: By checking modification timestamps before doing any heavy processing (like format conversion or API calls), the function minimizes resource usage when no changes have occurred.</p> <p><strong>Performance Monitoring</strong>: The function tracks and reports how many documents were actually synchronized, providing visibility and helping identify potential issues.</p> <p><strong>Non-Disruptive Operation</strong>: If no documents have been modified, the function completes quickly without performing any unnecessary operations. This ensures that the automatic sync doesn’t impact performance when there’s no work to be done.</p> <p><strong>Consistent Error Handling</strong>: Even automated functions include comprehensive error handling to ensure that temporary issues don’t break the synchronization system permanently.</p> <p>The 5-minute synchronization interval strikes an optimal balance between responsiveness and efficiency. Changes made to Google Docs will be reflected in DocuGenerate templates within 5 minutes, which is fast enough for most business workflows while being gentle on system resources.</p> <h2 id="initial-testing">Initial Setup and Manual Sync Testing</h2> <p>Before deploying your synchronization solution for regular use, it’s important to test all components thoroughly to ensure they work correctly with your specific Google Drive folder and DocuGenerate account configuration. Proper testing helps identify any configuration issues and confirms that the sync logic handles various scenarios correctly.</p> <p>Start by testing the <a href="#manual-sync-function">manual sync</a> function, which provides immediate feedback and helps establish the initial connections between your Google Docs and DocuGenerate templates.</p> <h3 id="prepare-test-documents">Prepare Test Documents</h3> <p>Create a few test Google Docs in your monitored folder with different types of content (simple text, formatted text, tables, images) to ensure the conversion process handles various document types correctly. For the purpose of this tutorial we’ll use the <strong>Software licensing agreement</strong> and <strong>General release of liability</strong> templates from Google Docs.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/google-docs-documents.png" alt="Google Docs documents"/></p> <h3 id="run-manual-sync">Run Manual Sync</h3> <p>Execute the <code class="language-plaintext highlighter-rouge">manualSync()</code> function from the Apps Script editor and monitor the execution log. You should see detailed output showing which documents are being processed and whether templates are being created successfully.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/manual-sync-logs.png" alt="Manual sync execution logs"/></p> <h3 id="verify-template-creation">Verify Template Creation</h3> <p>Check your DocuGenerate account to confirm that new templates were created with the correct names and content. The templates should maintain all the formatting from the original Google Docs.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/manual-sync.gif" alt="Manual sync execution demo"/></p> <p>This initial testing confirms that your sync automation is properly configured and can successfully create new templates from your Google Docs. With manual sync working correctly, you’re ready to set up automatic synchronization.</p> <h2 id="automatic-testing">Automatic Sync Testing</h2> <p>Once manual synchronization is working correctly, it’s time to test the <a href="#automatic-synchronization">automatic sync</a> system that forms the core of your ongoing synchronization workflow. This process is more complex because it relies on time-based triggers and change detection algorithms to identify which documents need updating.</p> <h3 id="set-up-triggers">Set Up Triggers</h3> <p>Run the <code class="language-plaintext highlighter-rouge">setupAutoSync()</code> function to create the <a href="#time-based-triggers">time-based trigger</a>. You should see detailed output logs to make sure the auto-sync setup completed successfully.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/setup-auto-sync.png" alt="Setup auto sync execution logs"/></p> <p>After running the setup function, it’s important to verify that the trigger was created successfully and is configured with the correct parameters. Navigate to the <strong>Triggers</strong> section in the left sidebar of the Apps Script editor to view all triggers associated with your project. You should see a new time-based trigger that calls the <code class="language-plaintext highlighter-rouge">autoSync</code> function every 5 minutes.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/apps-script-trigger.png" alt="Setup auto sync execution logs"/></p> <h3 id="make-test-changes">Make Test Changes</h3> <p>Modify your test documents and wait for the next automatic sync cycle (up to 5 minutes). The automation should detect the change and update the corresponding DocuGenerate template. In our case we removed the green highlighting of the merge tags to trigger the document update, which represents a typical formatting change that teams might make during collaborative editing sessions.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/google-docs-updated.png" alt="Google Docs documents updated"/></p> <h3 id="verify-updates">Verify Updates</h3> <p>Monitor the Apps Script execution logs to confirm that the <a href="#change-detection">automatic sync function</a> detected your changes and processed them correctly. The execution logs shown below demonstrate the system identifying recently modified documents and successfully updating the corresponding DocuGenerate templates.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/auto-sync-logs.png" alt="Automatic sync execution logs"/></p> <p>Finally, log into your DocuGenerate account and verify that the changes made to your Google Docs have been properly synchronized to the corresponding templates. Check that formatting changes, text modifications, and any structural updates are accurately reflected in the template content. This verification step completes the testing cycle and confirms that your automatic sync solution is functioning correctly.</p> <p><img src="https://www.docugenerate.com/assets/posts/025-sync-google-docs/docugenerate-templates-updated.png" alt="Templates updated on DocuGenerate"/></p> <p>With automatic sync testing complete, your synchronization system is now fully operational and will continue monitoring your Google Drive folder for changes every 5 minutes, ensuring your DocuGenerate templates stay current without any manual effort.</p> <h2 id="future-enhancements">Future Enhancements and Customizations</h2> <p>The synchronization workflow we’ve built provides a solid foundation that can be extended with additional features based on your specific needs. These enhancements would transform the basic sync automation into a complete template management solution.</p> <h3 id="advanced-monitoring">Advanced Monitoring Capabilities</h3> <ul> <li> <p><strong>Multiple Folder Support</strong>: Modify the script to monitor multiple Google Drive folders simultaneously, each potentially syncing to different DocuGenerate accounts or with different processing rules.</p> </li> <li> <p><strong>Selective Synchronization</strong>: Implement document filtering based on naming patterns, document properties, or metadata tags to give you fine-grained control over which documents get synchronized.</p> </li> </ul> <h3 id="integration-enhancements">Integration Enhancements</h3> <ul> <li> <p><strong>Regional Endpoint Support</strong>: Automatically select optimal DocuGenerate regional endpoints based on your geographic location or team distribution.</p> </li> <li> <p><strong>Extended Format Support</strong>: Extend the solution to handle Microsoft Word documents stored in Google Drive, providing sync capabilities for teams that work with mixed document formats.</p> </li> </ul> <h3 id="deletion-handling">Deletion Handling</h3> <ul> <li> <p><strong>Document Deletion Sync</strong>: Implement logic to handle document deletions in Google Drive by removing corresponding templates from DocuGenerate.</p> </li> <li> <p><strong>Template Cleanup</strong>: Create functions to identify and clean up orphaned templates in DocuGenerate that no longer have corresponding Google Docs.</p> </li> </ul> <h2 id="conclusion">Conclusion</h2> <p>Synchronizing Google Docs with DocuGenerate eliminates the manual friction that often prevents teams from maintaining current templates while leveraging powerful document generation capabilities. The automated system we’ve built bridges the gap between collaborative document editing and professional document generation, allowing your team to work naturally in Google Docs while ensuring that your DocuGenerate templates always reflect the latest changes.</p> <p>By implementing this solution, your team can continue using Google Docs for collaborative template development while gaining the advanced document generation capabilities that DocuGenerate provides. The automatic synchronization ensures that changes made during collaborative editing sessions are immediately available for document generation workflows, creating a powerful combination of tools that enhances both productivity and document quality.</p> <p>The modular design of our synchronization solution makes it easy to customize and extend based on your specific requirements. Whether you need to monitor multiple folders, implement custom filtering rules, or integrate with additional systems, the foundation we’ve established provides a robust platform for future enhancements.</p> <h2 id="resources">Resources</h2> <ul> <li><a href="https://www.docugenerate.com/assets/posts/025-sync-google-docs/apps-script.txt" target="_blank">Complete Apps Script Code</a> - Download the complete synchronization script</li> <li><a href="https://developers.google.com/apps-script" target="_blank" rel="nofollow noopener">Google Apps Script Documentation</a> - Official Google Apps Script guide and API reference</li> <li><a href="https://developers.google.com/workspace/drive/api/guides/properties" target="_blank" rel="nofollow noopener">Google Drive API Properties Guide</a> - Working with custom file properties</li> <li><a href="https://api.docugenerate.com/" target="_blank">DocuGenerate API Documentation</a> - Complete API reference for DocuGenerate integration</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Templates"/> <category term="Google Docs"/> <category term="Apps Script"/> <summary type="html"><![CDATA[Discover how to create new templates automatically when Google Docs are added to a folder and update templates when documents are modified. Perfect for teams that prefer working in Google Docs but need the power of DocuGenerate for document generation.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/025-sync-google-docs/cover-image-v3.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/025-sync-google-docs/cover-image-v3.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">How to Send Generated Documents as Email Attachments in Bubble</title> <link href="https://www.docugenerate.com/blog/how-to-send-generated-documents-as-email-attachments-in-bubble/" rel="alternate" type="text/html" title="How to Send Generated Documents as Email Attachments in Bubble"/> <published>2025-08-17T00:00:00+00:00</published> <updated>2025-08-17T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/how-to-send-generated-documents-as-email-attachments-in-bubble</id> <content type="html" xml:base="https://www.docugenerate.com/blog/how-to-send-generated-documents-as-email-attachments-in-bubble/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Building professional client onboarding systems can be complex, especially when you need to generate personalized documents and deliver them automatically via email. Traditional approaches often require extensive development work, custom integrations, and significant technical expertise. However, with modern no-code platforms like <a href="https://bubble.io/" target="_blank" rel="nofollow noopener">Bubble</a> combined with specialized document generation services, you can create sophisticated workflows that handle everything from data collection to document delivery.</p> <p>In this comprehensive tutorial, we’ll build a complete client onboarding system that collects client information through a web form, generates personalized Non-Disclosure Agreements (NDAs) using that data, and automatically sends the completed documents as email attachments. This approach demonstrates how to leverage Bubble’s visual development platform alongside DocuGenerate’s document generation API to create professional business workflows without writing code.</p> <p>The system we’ll create showcases several powerful concepts: automated document generation based on form submissions, integration between no-code platforms and external APIs, and professional email delivery with file attachments. This workflow is particularly valuable for businesses that need to process client agreements, contracts, or other personalized documents at scale while maintaining a professional appearance and reliable delivery.</p> <h2 id="ai-page-designer">Leveraging Bubble’s AI Page Designer</h2> <p>To accelerate our development process, we’ll use Bubble’s innovative AI page designer feature, which can generate complete application interfaces based on natural language descriptions. This feature, publicly released as a beta in mid-June 2024 and officially announced at the <a href="https://bubble.io/blog/event-recap-ai-founder-tools/" target="_blank" rel="nofollow noopener">Zero to One With AI + No-Code</a> event, represents a significant advancement in no-code application development.</p> <p>The AI page designer allows us to describe our requirements in plain English and receive a fully functional application structure, complete with forms, workflows, and data types. This approach significantly reduces development time while ensuring that the generated application follows Bubble’s best practices and design patterns.</p> <p>For our NDA signing system, we’ll provide the following detailed prompt to the AI designer:<br/> <em>“Help me create a web page that will allow my clients to sign NDAs. The web page needs to be modern and contain a form with the following fields: Name, Address, Email and Country. The form data will be used to generate the NDA using DocuGenerate and send it by email to the client.”</em></p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/ai-prompt.png" alt="AI prompt for generating the NDA application"/></p> <p>This prompt provides the AI with enough context to understand both the functional requirements (form fields, data processing) and the intended workflow (document generation and email delivery). The AI will use this information to create appropriate data structures, user interface elements, and initial workflow configurations.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/ai-generating.png" alt="AI generating the application interface"/></p> <p>The generation process typically takes several minutes, during which Bubble’s AI analyzes the requirements, creates the necessary components, and assembles them into a cohesive application. It’s important to keep the browser tab open during this process, as closing it can interrupt the generation.</p> <h2 id="application-structure">Understanding the Generated Application Structure</h2> <p>Once the AI completes the generation process, you’ll have a fully functional application with multiple pages, data structures, and initial workflows. The generated application demonstrates Bubble’s systematic approach to application architecture, with clear separation between different functional areas and logical data organization. The AI-generated application includes two primary pages that work together to create a complete user experience.</p> <h3 id="index-page">Index Page</h3> <p>This serves as the main entry point where clients interact with your system. The page features a clean, modern design with a comprehensive form that collects all necessary information for NDA generation. The form includes fields for Full <strong>Name</strong>, <strong>Address</strong>, <strong>Email</strong> <strong>Address</strong>, and <strong>Country</strong>, along with a prominent <strong>Submit NDA Request</strong> button that initiates the document generation and email delivery workflow.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/app-index-page.png" alt="Main form on the index page"/></p> <p>The index page design prioritizes user experience with clear labeling, appropriate form validation, and visual feedback. The layout is responsive and professional, ensuring that clients can easily complete the form regardless of their device or technical expertise.</p> <h3 id="confirmation-page">Confirmation Page</h3> <p>After form submission, users are automatically redirected to this page, which provides immediate feedback about their request status. The confirmation page displays the submitted information and shows the current processing status, creating transparency and building user confidence in the system.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/app-confirmation-page.png" alt="Confirmation page showing submission details"/></p> <p>This two-page structure follows established patterns for form-based applications, providing users with clear feedback and maintaining engagement throughout the process.</p> <h3 id="data-type-architecture">Data Type Architecture</h3> <p>The AI designer automatically creates the <code class="language-plaintext highlighter-rouge">NdaSubmission</code> data type, which serves as the foundation for storing and managing client information throughout the workflow. This data structure is designed to accommodate both the initial form submission and the various status tracking fields needed for document generation and email delivery.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/nda-submission-data-type.png" alt="NDA Submission data type structure"/></p> <p>The <code class="language-plaintext highlighter-rouge">NdaSubmission</code> data type includes the following fields:</p> <ul> <li><code class="language-plaintext highlighter-rouge">address</code> (text): Stores the client’s full address information</li> <li><code class="language-plaintext highlighter-rouge">confirmation_email_sent</code> (yes/no): Tracks whether the initial confirmation email has been sent</li> <li><code class="language-plaintext highlighter-rouge">country</code> (text): Records the client’s country information</li> <li><code class="language-plaintext highlighter-rouge">docugenerate_status</code> (text): Monitors the document generation process status</li> <li><code class="language-plaintext highlighter-rouge">email</code> (text): Contains the client’s email address for document delivery</li> <li><code class="language-plaintext highlighter-rouge">name</code> (text): Stores the client’s full name</li> <li><code class="language-plaintext highlighter-rouge">nda_email_sent</code> (yes/no): Indicates whether the NDA has been successfully delivered</li> <li><code class="language-plaintext highlighter-rouge">submission_date</code> (date): Records when the form was initially submitted</li> </ul> <p>This comprehensive data structure supports both the immediate workflow requirements and future enhancements, such as reporting, analytics, and advanced status tracking.</p> <h3 id="sample-data">Sample Data Population</h3> <p>The generated application includes a thoughtful sample dataset that populates the <code class="language-plaintext highlighter-rouge">NdaSubmission</code> table with realistic entries. This sample data serves multiple purposes: it demonstrates the expected data format, provides immediate content for testing workflows, and offers examples of how the system handles various client scenarios.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/nda-submission-app-data.png" alt="Sample data in the NDA Submission table"/></p> <p>Having sample data immediately available allows you to test the complete workflow without needing to manually create test entries. This approach accelerates development and ensures that you can verify all system components work correctly before deploying to production.</p> <h2 id="plugin-installation">Installing and Configuring the DocuGenerate Plugin</h2> <p>To enable document generation capabilities in our Bubble application, we need to install and configure the <a href="https://bubble.io/plugin/docugenerate-1730225425528x319288222630019100" target="_blank">DocuGenerate plugin</a> from Bubble’s marketplace. This plugin provides direct access to DocuGenerate’s API functionality through Bubble’s visual workflow system, eliminating the need for custom API integration.</p> <p>The plugin installation process is straightforward and follows Bubble’s standard plugin management procedures. Navigate to the <strong>Plugins</strong> section in your Bubble editor and search for “DocuGenerate” in the marketplace then click on <strong>Install</strong>:</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/install-docugenerate-plugin.png" alt="Installing the DocuGenerate plugin"/></p> <p>After installing the plugin, you’ll need to configure it with your DocuGenerate API credentials. This configuration establishes the connection between your Bubble application and your DocuGenerate account, enabling secure communication for document generation requests.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/configure-docugenerate-plugin.png" alt="Configuring the DocuGenerate plugin"/></p> <p>The configuration requires your DocuGenerate <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a>, which you can find in your DocuGenerate account settings. This API key authenticates your requests and ensures that generated documents are properly associated with your account and usage limits.</p> <p>Once configured, the plugin provides access to all DocuGenerate functionality through Bubble’s action system, including document generation, template management, and status monitoring. The plugin handles authentication automatically, request formatting, and response processing, allowing you to focus on building your application logic rather than managing API integration details.</p> <h2 id="nda-template">Creating the NDA Template</h2> <p>Before we can generate personalized NDAs, we need to create a template that defines the document structure and identifies where client-specific information should be inserted. For this tutorial, we’ll use the <a href="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/Non Disclosure Agreement.docx">Non Disclosure Agreement</a> template from DocuGenerate’s <a href="https://www.docugenerate.com/templates/#contracts">Template Library</a>, which provides a professionally formatted legal document with appropriate merge tags.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/docugenerate-nda-template.png" alt="DocuGenerate NDA template preview"/></p> <p>The template includes several key sections that make it suitable for our automated workflow:</p> <ul> <li> <p><strong>Party Information</strong>: The template includes dedicated sections for both the disclosing party (your company) and the receiving party (the client), with merge tags that will be populated with information from our Bubble form.</p> </li> <li> <p><strong>Legal Framework</strong>: All necessary legal language is pre-written and formatted appropriately, ensuring that the generated documents maintain professional legal standards without requiring legal expertise to create.</p> </li> <li> <p><strong>Merge Tag Integration</strong>: Strategic placement of merge tags throughout the document allows for dynamic content insertion while maintaining proper formatting and legal structure.</p> </li> </ul> <p>The template uses DocuGenerate’s <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tag syntax</a> to identify where dynamic content should be inserted. These tags correspond to the data we’ll collect in our Bubble form and send through the DocuGenerate API during the generation process.</p> <h2 id="document-generation-workflow">Building the Document Generation Workflow</h2> <p>The AI-generated application provides a foundation workflow that we need to enhance with document generation and email delivery capabilities. The initial workflow includes basic form processing and page navigation, but we’ll extend it to include the complete document automation process.</p> <h3 id="initial-workflow">Initial Workflow Analysis</h3> <p>The existing workflow on the index page includes three primary steps that handle the basic form submission process:</p> <ol> <li><strong>Event Trigger</strong>: Activates when the <strong>Submit NDA Request</strong> button is clicked</li> <li><strong>Data Creation</strong>: Creates a new <code class="language-plaintext highlighter-rouge">NdaSubmission</code> record with form data</li> <li><strong>Navigation</strong>: Redirects the user to the confirmation page</li> </ol> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/submit-nda-initial-workflow-v2.png" alt="Initial workflow configuration"/></p> <p>This basic workflow captures the form data and provides user feedback, but it doesn’t yet include the document generation or email delivery functionality we need. We’ll build upon this foundation by adding additional workflow steps that handle these advanced features.</p> <h3 id="adding-document-generation">Adding Document Generation</h3> <p>The next step involves adding a document generation action to our workflow. This action will trigger immediately after the form data is saved, ensuring that document generation begins as soon as the client information is available in the system.</p> <p>To add the document generation step, click the <strong>+</strong> button after the existing workflow steps, navigate to the <strong>Plugins</strong> section, and select <strong>DocuGenerate - Generate Document</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/add-generate-document-action-v2.png" alt="Adding the generate document action"/></p> <p>The <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#generate-document">document generation action</a> requires several configuration parameters that connect our form data with the DocuGenerate template:</p> <ul> <li> <p><code class="language-plaintext highlighter-rouge">template_id</code>: This identifies the specific NDA template we created in DocuGenerate. Each template has a <a href="https://www.docugenerate.com/help/articles/how-do-i-get-the-template-id/">unique ID</a> that tells the system which document structure to use for generation.</p> </li> <li> <p><code class="language-plaintext highlighter-rouge">name</code>: We’ll set this to dynamically include the client’s name using. This creates descriptive file names that make it easy to identify generated documents.</p> </li> <li> <p><code class="language-plaintext highlighter-rouge">output_format</code>: Enter <code class="language-plaintext highlighter-rouge">.pdf</code> to generate PDF documents, which provide consistent formatting across different devices and platforms while maintaining professional appearance.</p> </li> <li> <p><code class="language-plaintext highlighter-rouge">data</code>: This is the most complex part of the configuration, as it requires mapping our form data to the merge tags in the template. The data should be formatted as a JSON array containing the dynamic values from our form submission.</p> </li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/config-generate-document-action-v2.png" alt="Configuring the generate document action"/></p> <p>This JSON structure maps each merge tag in the template to either static information (like your company details) or dynamic data from the form submission. The dynamic values use Bubble’s syntax to reference the data created in the first workflow step, ensuring that each generated document contains the correct client information:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[{</span><span class="w">
  </span><span class="nl">"Effective Date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Result of step 1 (Create a new NdaSubmission)'s submission_date:formatted as 8/30/25"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Disclosing Party Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"NDA Signer"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Disclosing Party Address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"93 East Lassen Street, Los Angeles, CA, 90013"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Receiving Party Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Result of step 1 (Create a new NdaSubmission)'s name"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Receiving Party Address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Result of step 1 (Create a new NdaSubmission)'s address"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"Governing Country"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Result of step 1 (Create a new NdaSubmission)'s country"</span><span class="w">
</span><span class="p">}]</span><span class="w">
</span></code></pre></div></div> <h3 id="email-delivery">Implementing Email Delivery</h3> <p>The final workflow step handles email delivery of the generated document. This involves using <a href="https://manual.bubble.io/core-resources/actions/email" target="_blank" rel="nofollow noopener">Bubble’s native email</a> functionality to send the PDF as an attachment to the client’s email address. The email delivery system provides professional communication while ensuring that clients receive their documents promptly and reliably.</p> <p>To add the email step, click the <strong>+</strong> sign after the document generation step and select <strong>Send email</strong> from the <strong>Email</strong> submenu:</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/email-add-action-v2.png" alt="Adding the email delivery action"/></p> <p>The email configuration requires several parameters that create a professional communication experience:</p> <ul> <li> <p><strong>Recipient</strong>: Set to <code class="language-plaintext highlighter-rouge">Result of step 1 (Create a new NdaSubmission)'s email</code> to automatically send to the client’s submitted email address.</p> </li> <li> <p><strong>Sender Name</strong>: Use a professional name like “NDA Signer” or your company name to establish credibility and brand recognition.</p> </li> <li> <p><strong>Subject Line</strong>: Create a clear, professional subject like “Your NDA is ready” that immediately communicates the email’s purpose.</p> </li> <li> <p><strong>Email Body</strong>: Craft a personalized message that maintains professionalism.</p> </li> <li> <p><strong>File Attachment</strong>: This is the most critical configuration point. Set this to <code class="language-plaintext highlighter-rouge">Result of step 2 (DocuGenerate - Generate Document)'s document_uri:saved to Bubble Storage</code>.</p> </li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/email-config-action-v2.png" alt="Configuring the email delivery action"/></p> <p>The <a href="https://manual.bubble.io/core-resources/data/operations-and-comparisons#saved-to-bubble-storage" target="_blank" rel="nofollow noopener">:saved to Bubble Storage</a> modifier is essential for proper email attachment handling. Without this modifier, Bubble cannot access the generated PDF file for attachment purposes. This tells Bubble to download the generated document from DocuGenerate and store it temporarily in Bubble’s file system, making it available for email attachment.</p> <h2 id="testing-application">Testing the Complete Application</h2> <p>With all workflow components configured, we can test the complete application to verify that each step functions correctly and that the integration between Bubble, DocuGenerate, and email delivery works as expected. This testing phase is crucial for identifying any configuration issues before deploying the application to production.</p> <p>Bubble provides a preview mode that allows you to test your application in a live environment without affecting production users. You can access the test version of our NDA application <a href="https://support-55928.bubbleapps.io/version-test?debug_mode=true" target="_blank">here</a>. The test environment provides debug mode capabilities, which offer detailed information about workflow execution, data processing, and any errors that might occur during testing.</p> <h3 id="nda-generation">NDA Generation &amp; Email Delivery</h3> <p>The testing process involves completing the entire user journey from form submission through document receipt. When testing, use realistic information that mirrors your expected client data to ensure the system handles various scenarios correctly. After filling in the form with client information, the system automatically processes the request through all workflow steps:</p> <p><strong>1. Form Processing</strong>: Client information is validated and stored in the database.<br/> <strong>2. Document Generation</strong>: The NDA is created with personalized information.<br/> <strong>3. Email Delivery</strong>: The completed document is sent as an attachment.<br/> <strong>4. User Feedback</strong>: The confirmation page displays the current status.</p> <p>The generated email demonstrates the professional appearance and functionality of the complete system:</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/email-received.png" alt="Email received with NDA attachment"/></p> <p>The email includes the personalized message content, professional formatting, and the generated NDA as a PDF attachment. This demonstrates that the entire workflow functions correctly and provides a professional experience for clients.</p> <h3 id="file-storage-verification">File Storage Verification</h3> <p>One important aspect of testing involves verifying that generated documents are properly stored in Bubble’s file management system. This storage capability provides backup access to generated documents and supports future enhancements like document history or re-sending capabilities.</p> <p><img src="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/file-manager.png" alt="Generated documents in Bubble's File manager"/></p> <p>The <a href="https://manual.bubble.io/help-guides/data/files" target="_blank" rel="nofollow noopener">File manager</a> shows that each generated NDA is properly stored with appropriate naming conventions and accessible for future reference. This storage capability ensures that your system maintains records of all generated documents, supporting compliance requirements and customer service needs.</p> <h2 id="conclusion">Conclusion</h2> <p>Building an automated document generation and email delivery system with Bubble and DocuGenerate demonstrates the power of modern no-code development platforms when combined with specialized APIs. The system we’ve created handles complex business processes including data collection, document personalization, and professional communication, all without requiring traditional software development skills.</p> <p>This approach offers significant advantages for businesses that need to process client documents at scale. The automated workflow eliminates manual document creation, reduces errors, ensures consistent formatting, and provides professional client experiences. The integration between Bubble’s visual development platform and DocuGenerate’s document generation capabilities creates a solution that is both powerful and accessible.</p> <h3 id="resources">Resources</h3> <ul> <li><a href="https://support-55928.bubbleapps.io/version-test?debug_mode=true" target="_blank">Test Application</a> for hands-on experience with the complete workflow.</li> <li><a href="https://bubble.io/blog/ai-page-designer-prompts/" target="_blank" rel="nofollow noopener">Bubble’s AI Page Designer</a> documentation and best practices.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/">DocuGenerate Bubble Plugin</a> installation and configuration guide.</li> <li><a href="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/Non Disclosure Agreement.docx">Non Disclosure Agreement</a> template used in this tutorial.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Email"/> <category term="Bubble"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to create a complete workflow in Bubble that generates personalized NDAs and sends them as email attachments to clients. This step-by-step tutorial shows you how to build a professional client onboarding system with Bubble's AI page designer.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/024-email-attachments-bubble/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Generate PDF Shipping Forms with Retool for Inventory Management</title> <link href="https://www.docugenerate.com/blog/generate-pdf-shipping-forms-with-retool-for-inventory-management/" rel="alternate" type="text/html" title="Generate PDF Shipping Forms with Retool for Inventory Management"/> <published>2025-07-29T00:00:00+00:00</published> <updated>2025-07-29T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/generate-pdf-shipping-forms-with-retool-for-inventory-management</id> <content type="html" xml:base="https://www.docugenerate.com/blog/generate-pdf-shipping-forms-with-retool-for-inventory-management/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Inventory management applications built with <a href="https://retool.com/" target="_blank" rel="nofollow noopener">Retool</a> excel at organizing data and providing intuitive interfaces for tracking products, orders, and shipments. However, many businesses require professional documentation for their shipping operations that goes beyond simple data displays. Creating PDF shipping forms that include detailed product information, addresses, and custom branding can significantly improve logistics operations and provide customers with professional documentation.</p> <p>In this tutorial, we’ll enhance Retool’s existing <a href="https://retool.com/templates/inventory-management" target="_blank" rel="nofollow noopener">Inventory Management App</a> template by integrating DocuGenerate’s document generation capabilities. Instead of building an inventory system from scratch, we’ll focus on adding professional PDF shipping form generation to an already functional application. This approach demonstrates how existing Retool applications can be enhanced with document generation features without disrupting established workflows.</p> <p>The integration we’ll build creates a powerful combination where users can manage their inventory data through Retool’s intuitive interface while generating professional shipping documents on demand. This solution is particularly valuable for businesses that need to provide carriers, customers, and internal teams with standardized shipping documentation that includes detailed product information and company branding.</p> <h2 id="understanding-base-application">Understanding the Base Application</h2> <p>Before adding document generation capabilities, let’s examine the foundation we’re working with. Retool’s Inventory Management App template provides a comprehensive solution for tracking inventory levels, managing shipments, and monitoring product data across multiple locations.</p> <p>The application includes several key components that make it ideal for our shipping form enhancement:</p> <ul> <li> <p><strong>Shipment Tracking</strong>: A complete system for managing shipments from creation to delivery, including status updates and detailed shipment information.</p> </li> <li> <p><strong>Product Management</strong>: Comprehensive product data including descriptions, quantities, and pricing information that’s essential for shipping documentation.</p> </li> <li> <p><strong>Location Management</strong>: Support for multiple warehouses and shipping locations, providing the address information needed for shipping forms.</p> </li> <li> <p><strong>Data Relationships</strong>: Well-structured relationships between shipments, products, and locations that facilitate comprehensive document generation.</p> </li> </ul> <p>The template’s existing data structure provides all the information typically required for professional shipping forms, including sender and receiver details, product descriptions, quantities, and shipment status information.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/app-database.png" alt="Inventory Management app database"/></p> <h2 id="preparing-application">Preparing the Application</h2> <p>To focus on the document generation aspects of this tutorial, we’ll make several modifications to the base template. These changes simplify the interface while preserving the core functionality needed for shipping form generation.</p> <h3 id="cloning-template">Cloning the Template</h3> <p>Start by cloning the Inventory Management App template from Retool’s template library. This provides the complete foundation with sample data, established workflows, and proven user interface patterns.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/clone-app-template.png" alt="Cloning the Retool Inventory Management template"/></p> <p>The cloned template includes all necessary components, queries, and sample data to demonstrate the shipping form generation process. The existing structure provides realistic shipment scenarios that showcase various document generation possibilities.</p> <h3 id="simplifying-interface">Simplifying the Interface</h3> <p>For this tutorial, we’ll remove some complexity to focus on the document generation workflow. The key simplification involves updating the shipments query to remove date filtering, making it easier to view all available shipments.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/get-shipments-filter.png" alt="Simplified shipments query with filter removal"/></p> <p>We remove the date range filtering components and simplify the <code class="language-plaintext highlighter-rouge">getShipments</code> query. This change doesn’t affect the core functionality but makes it easier to navigate shipments during our tutorial. In a production environment, you would typically retain these filtering capabilities for managing large volumes of shipment data. The simplified view provides immediate access to all shipments, making it easier to test document generation with various shipment types and configurations.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/simplified-shipments-view.png" alt="Simplified shipments view without date filters"/></p> <h3 id="pdf-generation-button">Adding the PDF Generation Button</h3> <p>Next, we’ll be adding a <strong>View Shipping Form</strong> button to the shipment detail page. This button will trigger the document generation process and navigate users to a PDF viewer page.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/view-shipping-form-pdf-button.png" alt="View Shipping Form PDF button on shipment detail page"/></p> <p>The button placement integrates naturally with the existing shipment detail interface, providing users with immediate access to shipping form generation without disrupting established workflows. The button’s design matches the application’s existing style patterns and maintains visual consistency.</p> <h3 id="shipping-form-page">Adding the Shipping Form Page</h3> <p>The final step involves creating a new <strong>ShippingFormPDF</strong> page, for displaying generated shipping forms. This page includes a PDF viewer component configured to display documents generated by DocuGenerate and a <strong>Print</strong> fab button to allow users to print the shipping form.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/shipping-form-pdf.png" alt="Example of the generated shipping form PDF"/></p> <h2 id="shipping-form-template">Creating the Shipping Form Template</h2> <p>To generate dynamic shipping forms, we’ll need to first <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">create a template</a>, designed to include all essential elements typically found in commercial shipping documentation. The shipping form template includes sections with <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> for sender information, receiver details, shipment contents, and additional notes.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/shipping-form-template.png" alt="Image of the Shipping Form Template"/></p> <p>The <a href="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/Shipping Form.docx">Shipping Form</a> template used in this tutorial includes several important features:</p> <ul> <li> <p><strong>Conditional Content</strong>: The notes section only appears when shipment notes are present, using the <a href="https://www.docugenerate.com/help/articles/how-to-add-conditions-to-a-template/">conditional syntax</a></p> </li> <li> <p><strong>Dynamic Table</strong>: The shipment items section automatically expands to accommodate varying numbers of products using the <a href="https://www.docugenerate.com/help/articles/how-to-add-tables-to-a-template/">table syntax</a></p> </li> <li> <p><strong>Consistent Formatting</strong>: All elements maintain professional formatting regardless of content length or complexity</p> </li> </ul> <h2 id="document-generation">Setting Up Document Generation</h2> <p>With our interface ready, we can focus on integrating DocuGenerate’s PDF generation capabilities into the existing shipment workflow to create shipping forms automatically.</p> <h3 id="docugenerate-resource">DocuGenerate Resource</h3> <p>We need to configure the connection between Retool and <a href="https://api.docugenerate.com/" target="_blank">DocuGenerate’s API</a>. This involves creating a REST API resource that handles authentication and communication with DocuGenerate’s document generation service.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/configure-rest-api.png" alt="Configuring the REST API connection for DocuGenerate"/></p> <p>The REST API configuration requires:</p> <ul> <li><strong>Resource Name</strong>: Use “DocuGenerate” for easy identification in queries</li> <li><strong>Base URL</strong>: Set to <code class="language-plaintext highlighter-rouge">https://api.docugenerate.com</code> (or use one of our <a href="https://www.docugenerate.com/help/articles/can-i-use-regional-api-endpoints/">regional endpoints</a> for improved performance)</li> <li><strong>Authentication</strong>: Add your DocuGenerate <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a> in the <code class="language-plaintext highlighter-rouge">Authorization</code> header</li> </ul> <p>This configuration establishes the foundation for all document generation requests, handling authentication automatically and providing a reusable connection for multiple document types.</p> <h3 id="generation-query">Document Generation Query</h3> <p>With our template created, we need to configure the Retool query that sends shipment data to DocuGenerate for processing. This query handles data transformation and API communication.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/generate-document-query.png" alt="Generate document query configuration in Retool"/></p> <p>The <code class="language-plaintext highlighter-rouge">generateDocument</code> query uses the <a href="#docugenerate-resource">DocuGenerate resource</a> and its configuration includes:</p> <ul> <li><strong>URL Path</strong>: POST request to the <code class="language-plaintext highlighter-rouge">/v1/document/</code> endpoint for creating new documents</li> <li><strong>Request Body</strong>: JSON containing the following fields: <ul> <li><code class="language-plaintext highlighter-rouge">template_id</code>: ID of the <a href="#shipping-form-template">Shipping Form</a> template created in DocuGenerate</li> <li><code class="language-plaintext highlighter-rouge">output_format</code>: set to <code class="language-plaintext highlighter-rouge">.pdf</code> to generate PDF documents</li> <li><code class="language-plaintext highlighter-rouge">name</code>: specifies the dynamic document name to match the name displayed in the app (<code class="language-plaintext highlighter-rouge">Shipment #{{ Shipments_HistoryCollection.selectedItem.id }}</code>)</li> <li><code class="language-plaintext highlighter-rouge">data</code>: the shipping form data based on <code class="language-plaintext highlighter-rouge">Shipments_HistoryCollection.selectedItem</code></li> </ul> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  
[{
  "shipment_number": "{{ Shipments_HistoryCollection.selectedItem.id }}",
  "shipment_from": "{{ Shipments_HistoryCollection.selectedItem.fromStreet }}",
  "shipment_to": "{{ Shipments_HistoryCollection.selectedItem.toStreet }}",
  "shipment_status": "{{ Shipments_HistoryCollection.selectedItem.status }}",
  "shipment_notes": "{{ Shipments_HistoryCollection.selectedItem.notes }}",
  "shipment_items": {{ getShipmentItems.data }},
  "shipment_date": "{{ Shipments_HistoryCollection.selectedItem.date }}"
}]
  
</code></pre></div> </div> </li> </ul> <p>The query transforms Retool’s shipment data into the format expected by DocuGenerate’s template processing engine. This includes extracting relevant information from the selected shipment record and formatting it appropriately for the merge tags defined in our template.</p> <h3 id="data-transformation">Data Transformation</h3> <p>The <code class="language-plaintext highlighter-rouge">getShipmentItems</code> query provides the shipment items in a table format, but that is incompatible with the list format expected for the <code class="language-plaintext highlighter-rouge">shipment_items</code> value used in the <code class="language-plaintext highlighter-rouge">generateDocument</code> query.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/get-shipment-items-table.png" alt="Shipment items table showing product data"/></p> <p>We need to convert this tabular data into an array structure that can populate the dynamic product list in our shipping form template. Entering the following JavaScript code in the <strong>Transform results</strong> step will convert the table format into an array of objects with <code class="language-plaintext highlighter-rouge">title</code> and <code class="language-plaintext highlighter-rouge">quantity</code> attributes:</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="p">{</span> <span class="nx">title</span><span class="p">,</span> <span class="nx">quantity</span> <span class="p">}</span> <span class="o">=</span> <span class="nx">data</span><span class="p">;</span>

<span class="k">return</span> <span class="nx">title</span><span class="p">.</span><span class="nf">map</span><span class="p">((</span><span class="nx">t</span><span class="p">,</span> <span class="nx">i</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">({</span>
  <span class="na">title</span><span class="p">:</span> <span class="nx">t</span><span class="p">,</span>
  <span class="na">quantity</span><span class="p">:</span> <span class="nx">quantity</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span>
<span class="p">}));</span>
</code></pre></div></div> <p>This transformation ensures that product information from Retool’s database structure matches the array format expected by DocuGenerate’s template processing engine. The resulting array can accommodate any number of products while maintaining consistent formatting in the generated document.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/get-shipment-items-array.png" alt="Transformed shipment items array for template processing"/></p> <h2 id="complete-workflow">Implementing the Complete Workflow</h2> <p>The final implementation connects all components into a smooth user experience, from shipment selection to PDF generation and display. This integration ensures that document generation feels like a natural extension of the existing inventory management workflow rather than a separate process.</p> <h3 id="event-handler-configuration">Event Handler Configuration</h3> <p>The <strong>View Shipping Form</strong> button requires two event handlers to manage the complete workflow. The first event handler triggers the <code class="language-plaintext highlighter-rouge">generateDocument</code> query, which sends the shipment data to DocuGenerate and receives the generated PDF URL in response.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/click-handler-generate-document.png" alt="Click handler configuration for document generation"/></p> <p>The second event handler manages navigation to the <code class="language-plaintext highlighter-rouge">ShippingFormPDF</code> page after successful document generation. This creates a smooth user experience where clicking the button immediately generates the document and displays it to the user.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/click-handler-navigate-to-page.png" alt="Click handler configuration for page navigation"/></p> <h3 id="pdf-viewer-implementation">PDF Viewer Implementation</h3> <p>The final step consists in displaying the generated shipping form in the <a href="#shipping-form-page">dedicated page</a> that was added to the application at the beginning of this tutorial.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/shipping-form-file-url.png" alt="Generated shipping form PDF displayed in viewer"/></p> <p>To load the generated document in the <code class="language-plaintext highlighter-rouge">ShippingFormPDFViewer</code> component, we must specify the following value in the <code class="language-plaintext highlighter-rouge">File URL</code> input field:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{{ generateDocument.data?.document_uri }}
</code></pre></div></div> <p>This configuration automatically displays the PDF returned by <a href="https://www.docugenerate.com/pdf-generation-api/">DocuGenerate’s API</a> via the <a href="#generation-query">document generation query</a>, providing users with immediate access to their generated shipping forms.</p> <h2 id="testing-solution">Testing the Complete Solution</h2> <p>With all components configured, the complete workflow provides a professional document generation experience integrated directly into the inventory management interface. Users can navigate from shipment management to professional PDF generation without leaving the application.</p> <p><img src="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/demo-video-retool.gif" alt="Demo video showing the complete Retool shipping form workflow"/></p> <p>The finalized solution, which you can access <a href="https://docugenerate.retool.com/mobile/apps/Inventory%20Management" target="_blank">here</a>, demonstrates several key advantages:</p> <ul> <li><strong>Workflow Integration</strong>: Document generation fits naturally into existing shipment management processes</li> <li><strong>Professional Output</strong>: Generated forms maintain consistent formatting and branding across all shipments</li> <li><strong>User Experience</strong>: Simple button clicks trigger complex document generation without exposing technical complexity</li> <li><strong>Data Consistency</strong>: All shipment information automatically populates in the generated forms, eliminating manual data entry errors</li> </ul> <h2 id="conclusion">Conclusion</h2> <p>Integrating DocuGenerate’s document generation capabilities into Retool’s Inventory Management App demonstrates how existing no-code applications can be enhanced with professional document creation without disrupting established workflows. This approach provides significant value for businesses that need to generate consistent, professional shipping documentation while maintaining the efficiency of their existing inventory management processes.</p> <p>The combination of Retool’s intuitive interface building capabilities with DocuGenerate’s robust template processing creates a solution that bridges operational efficiency with professional documentation requirements. Users can continue managing their inventory and shipments through familiar interfaces while accessing enterprise-grade document generation capabilities with simple button clicks. The flexibility of both platforms means the solution can evolve alongside changing business requirements, supporting everything from simple shipping labels to complex multi-page shipping manifests.</p> <p>The tutorial’s step-by-step approach demonstrates that sophisticated document generation features can be added to existing applications without requiring extensive development resources or disrupting current operational workflows. This makes professional document automation accessible to businesses of all sizes, from small operations managing dozens of shipments to large enterprises processing thousands of shipping documents daily.</p> <h3 id="resources">Resources</h3> <ul> <li><a href="https://retool.com/templates/inventory-management" target="_blank" rel="nofollow noopener">Retool Inventory Management Template</a> for the base application structure.</li> <li><a href="https://api.docugenerate.com/" target="_blank">DocuGenerate API Documentation</a> with comprehensive integration guidance.</li> <li><a href="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/Shipping Form.docx">Shipping Form</a> template used in this tutorial.</li> <li><a href="https://docugenerate.retool.com/mobile/apps/Inventory%20Management" target="_blank">Live Demo Application</a> showing the complete integration in action.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Shipping Forms"/> <category term="Retool"/> <category term="No-Code"/> <summary type="html"><![CDATA[Enhance your Retool inventory management app with professional PDF shipping forms using DocuGenerate. This step-by-step tutorial shows you how to integrate document generation into existing workflows, creating shipping documents for your logistics operations.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/023-retool-shipping-forms/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Google Docs vs DocuGenerate Ultimate Comparison</title> <link href="https://www.docugenerate.com/blog/google-docs-vs-docugenerate-ultimate-comparison/" rel="alternate" type="text/html" title="Google Docs vs DocuGenerate Ultimate Comparison"/> <published>2025-06-18T00:00:00+00:00</published> <updated>2025-06-18T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/google-docs-vs-docugenerate-ultimate-comparison</id> <content type="html" xml:base="https://www.docugenerate.com/blog/google-docs-vs-docugenerate-ultimate-comparison/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Document generation is a critical process for businesses across industries. Whether you’re creating invoices, contracts, certificates, or reports, the ability to efficiently transform data into professional documents can save countless hours and reduce human error. Two popular approaches for document generation are using Google Docs with its API, and specialized <a href="https://www.docugenerate.com/document-generation/">document generation</a> platforms like DocuGenerate.</p> <p>While both solutions can create documents from templates and data, they differ significantly in their approach, complexity, and capabilities. <a href="https://developers.google.com/workspace/docs/api/how-tos/overview" target="_blank" rel="nofollow noopener">Google Docs</a> offers a familiar interface and powerful collaborative features, but requires programming knowledge to automate document generation beyond simple text replacement. <a href="https://www.docugenerate.com/">DocuGenerate</a>, on the other hand, is purpose-built for document automation and offers declarative template-based generation without the need for complex coding.</p> <p>In this comprehensive comparison, we’ll explore the strengths and limitations of each approach, helping you determine which solution best fits your document generation needs. We’ll examine everything from template creation and data handling to advanced features like dynamic lists, tables, and image insertion.</p> <h2 id="using-google-docs">Using Google Docs</h2> <p>Google Docs offers <a href="https://developers.google.com/workspace/docs/api/how-tos/merge" target="_blank" rel="nofollow noopener">document generation</a> capabilities through its API, which allows developers to programmatically create and modify documents. The process typically involves several steps:</p> <p><strong>1. Template Creation</strong>: You start by creating a template document in Google Docs with placeholder text that will be replaced with actual data.</p> <p><img src="https://www.docugenerate.com/assets/posts/022-google-docs-compare/google-docs-template.jpg" alt="Google Docs template with placeholders"/></p> <p><strong>2. Document Duplication</strong>: When generating a new document, you must first create a copy of the template using the Google Drive API’s <a href="https://developers.google.com/workspace/drive/api/reference/rest/v3/files/copy" target="_blank" rel="nofollow noopener">files.copy</a> method.</p> <p><strong>3. Text Replacement</strong>: After copying the template, you use the Google Docs API’s <a href="https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/batchUpdate" target="_blank" rel="nofollow noopener">batchUpdate</a> method with <a href="https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#replacealltextrequest" target="_blank" rel="nofollow noopener">ReplaceAllTextRequest</a> to replace placeholder text with real data.</p> <p><strong>4. Document Retrieval</strong>: Finally, you retrieve the completed document for distribution or storage.</p> <p>Here’s what a typical Google Docs API workflow looks like:</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="kd">let</span> <span class="nx">date</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Date</span><span class="p">();</span>
  <span class="kd">let</span> <span class="nx">requests</span> <span class="o">=</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="na">replaceAllText</span><span class="p">:</span> <span class="p">{</span>
        <span class="na">containsText</span><span class="p">:</span> <span class="p">{</span>
          <span class="na">text</span><span class="p">:</span> <span class="dl">'</span><span class="s1">{{customer-name}}</span><span class="dl">'</span><span class="p">,</span>
          <span class="na">matchCase</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
        <span class="p">},</span>
        <span class="na">replaceText</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Alice</span><span class="dl">'</span>
      <span class="p">},</span>
    <span class="p">},</span>
    <span class="p">{</span>
      <span class="na">replaceAllText</span><span class="p">:</span> <span class="p">{</span>
        <span class="na">containsText</span><span class="p">:</span> <span class="p">{</span>
          <span class="na">text</span><span class="p">:</span> <span class="dl">'</span><span class="s1">{{date}}</span><span class="dl">'</span><span class="p">,</span>
          <span class="na">matchCase</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
        <span class="p">},</span>
        <span class="na">replaceText</span><span class="p">:</span> <span class="nx">date</span><span class="p">.</span><span class="nf">toDateString</span><span class="p">(),</span>
      <span class="p">},</span>
    <span class="p">},</span>
  <span class="p">];</span>

  <span class="nx">google</span><span class="p">.</span><span class="nf">options</span><span class="p">({</span><span class="na">auth</span><span class="p">:</span> <span class="nx">auth</span><span class="p">});</span>
  <span class="nx">google</span>
      <span class="p">.</span><span class="nf">discoverAPI</span><span class="p">(</span>
          <span class="dl">'</span><span class="s1">https://docs.googleapis.com/$discovery/rest?version=v1&amp;key={YOUR_API_KEY}</span><span class="dl">'</span><span class="p">)</span>
      <span class="p">.</span><span class="nf">then</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">docs</span><span class="p">)</span> <span class="p">{</span>
        <span class="nx">docs</span><span class="p">.</span><span class="nx">documents</span><span class="p">.</span><span class="nf">batchUpdate</span><span class="p">(</span>
            <span class="p">{</span>
              <span class="na">documentId</span><span class="p">:</span> <span class="dl">'</span><span class="s1">DOCUMENT_ID</span><span class="dl">'</span><span class="p">,</span>
              <span class="na">resource</span><span class="p">:</span> <span class="p">{</span>
                <span class="nx">requests</span><span class="p">,</span>
              <span class="p">},</span>
            <span class="p">},</span>
            <span class="p">(</span><span class="nx">err</span><span class="p">,</span> <span class="p">{</span><span class="nx">data</span><span class="p">})</span> <span class="o">=&gt;</span> <span class="p">{</span>
              <span class="k">if </span><span class="p">(</span><span class="nx">err</span><span class="p">)</span> <span class="k">return</span> <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">The API returned an error: </span><span class="dl">'</span> <span class="o">+</span> <span class="nx">err</span><span class="p">);</span>
              <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="nx">data</span><span class="p">);</span>
            <span class="p">});</span>
      <span class="p">});</span>
</code></pre></div></div> <h3 id="google-docs-limitations">Google Docs Limitations</h3> <p>While Google Docs is incredibly powerful for document collaboration and editing, it has several limitations when it comes to automated document generation:</p> <ul> <li> <p><strong>Simple Text Replacement Only</strong>: The Google Docs API primarily supports basic text replacement operations. You can find and replace placeholder text with actual values, but creating dynamic content structures requires programming.</p> </li> <li> <p><strong>Limited Template Logic</strong>: Google Docs templates cannot contain conditional logic, loops, or dynamic structures within the template itself. All logic must be implemented in your application code.</p> </li> <li> <p><strong>Image Handling Complexity</strong>: While you can insert images using the API, images must be publicly accessible via URL, and you need to manage image positioning and resizing through code rather than template markup.</p> </li> <li> <p><strong>Multi-Step Process</strong>: Every document generation requires multiple API calls - first to copy the template, then to perform replacements, and potentially additional calls for complex formatting or structure modifications.</p> </li> <li> <p><strong>Technical Expertise Required</strong>: Implementing Google Docs-based document generation requires significant programming knowledge and understanding of both the Google Docs API and Google Drive API.</p> </li> </ul> <h2 id="using-docugenerate">Using DocuGenerate</h2> <p>DocuGenerate takes a fundamentally different approach to document generation. Instead of requiring imperative programming to modify documents, it uses a declarative template system where all the logic and structure are defined directly within the template itself.</p> <ul> <li><strong>Template-Centric Design</strong>: With DocuGenerate, you create your templates using familiar Word documents and embed <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> directly in the template. These tags define not just</li> <li> <p>simple text replacements, but also complex data structures like lists, tables, and conditional content.</p> </li> <li> <p><strong>Single API Call</strong>: Document generation happens with a <a href="https://api.docugenerate.com/#/Document/generateDocument" target="_blank">single API call</a> or through the web interface. You provide your template ID and data, and DocuGenerate handles all the processing, formatting, and generation internally.</p> </li> <li><strong>Rich Data Structure Support</strong>: DocuGenerate natively supports complex data structures including dynamic lists, tables, conditional content, image insertion, QR codes and advanced formatting.</li> </ul> <p>Here’s how simple DocuGenerate’s approach is:</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">const</span> <span class="nx">date</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Date</span><span class="p">();</span>
<span class="kd">const</span> <span class="nx">response</span> <span class="o">=</span> <span class="k">await</span> <span class="nf">fetch</span><span class="p">(</span><span class="dl">'</span><span class="s1">https://api.docugenerate.com/v1/document</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span>
  <span class="na">method</span><span class="p">:</span> <span class="dl">'</span><span class="s1">POST</span><span class="dl">'</span><span class="p">,</span>
  <span class="na">headers</span><span class="p">:</span> <span class="p">{</span>
    <span class="dl">'</span><span class="s1">Authorization</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">YOUR_API_KEY</span><span class="dl">'</span><span class="p">,</span>
    <span class="dl">'</span><span class="s1">Content-Type</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">application/json</span><span class="dl">'</span>
  <span class="p">},</span>
  <span class="na">body</span><span class="p">:</span> <span class="nx">JSON</span><span class="p">.</span><span class="nf">stringify</span><span class="p">({</span>
    <span class="na">template_id</span><span class="p">:</span> <span class="dl">'</span><span class="s1">TEMPLATE_ID</span><span class="dl">'</span><span class="p">,</span>
    <span class="na">data</span><span class="p">:</span> <span class="p">{</span>
        <span class="dl">"</span><span class="s2">customer-name</span><span class="dl">"</span><span class="p">:</span> <span class="dl">"</span><span class="s2">Alice</span><span class="dl">"</span><span class="p">,</span>
        <span class="dl">"</span><span class="s2">date</span><span class="dl">"</span><span class="p">:</span> <span class="nx">date</span><span class="p">.</span><span class="nf">toDateString</span><span class="p">()</span>
    <span class="p">},</span>
    <span class="na">output_format</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.pdf</span><span class="dl">'</span>
  <span class="p">})</span>
<span class="p">});</span>

<span class="kd">const</span> <span class="nb">document</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">response</span><span class="p">.</span><span class="nf">json</span><span class="p">();</span>
<span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="dl">'</span><span class="s1">Document generated:</span><span class="dl">'</span><span class="p">,</span> <span class="nb">document</span><span class="p">.</span><span class="nx">document_uri</span><span class="p">);</span>
</code></pre></div></div> <h2 id="feature-comparison">Feature-by-Feature Comparison</h2> <p>To help you understand the practical differences between Google Docs and DocuGenerate for document generation, we’ve broken down the key features into four main categories. Each comparison table highlights how the two platforms handle essential aspects of document automation, from template management to output quality.</p> <h3 id="template-creation">Template Creation and Management</h3> <table class="table table-bordered"> <thead> <tr> <th>Feature</th> <th>Google Docs</th> <th>DocuGenerate</th> </tr> </thead> <tbody> <tr> <td><strong>Template Creation</strong></td> <td>Templates created in Google Docs interface</td> <td>Templates created in Microsoft Word or uploaded as DOCX files</td> </tr> <tr> <td><strong>Placeholder Syntax</strong></td> <td>Simple text strings using the double-brace delimiters syntax</td> <td>Rich merge tag syntax supporting complex data structures and <a href="https://www.docugenerate.com/help/articles/how-do-i-update-the-tag-delimiters/">custom delimiters</a></td> </tr> <tr> <td><strong>Version Control</strong></td> <td>Google Docs revision history</td> <td>Built-in <a href="https://www.docugenerate.com/help/articles/how-do-i-restore-a-template-version/">template versioning</a> and management</td> </tr> <tr> <td><strong>Template Management</strong></td> <td>Managed through Google Drive</td> <td>Dedicated template management with sharing capabilities</td> </tr> <tr> <td><strong>Access Control</strong></td> <td>Google Drive sharing and permissions</td> <td>Role-based access control for <a href="https://www.docugenerate.com/help/articles/introduction-to-team-collaboration/">team collaboration</a></td> </tr> </tbody> </table> <h3 id="data-handling">Data Handling and Integration</h3> <table class="table table-bordered"> <thead> <tr> <th>Feature</th> <th>Google Docs</th> <th>DocuGenerate</th> </tr> </thead> <tbody> <tr> <td><strong>Data Processing</strong></td> <td>Requires custom code to structure and format data</td> <td>Accepts data in multiple formats: <a href="https://www.docugenerate.com/help/articles/generate-documents-from-json-data/">JSON</a>, <a href="https://www.docugenerate.com/help/articles/generate-documents-from-an-excel-or-csv-file/">Excel or CSV</a></td> </tr> <tr> <td><strong>Data Preparation</strong></td> <td>Data must be processed and formatted before API calls</td> <td>Automatic data type detection and <a href="https://www.docugenerate.com/help/articles/how-to-format-data-with-filters/">formatting</a></td> </tr> <tr> <td><strong>Complex Structures</strong></td> <td>Limited support without extensive programming</td> <td>Native support for nested data structures</td> </tr> <tr> <td><strong>Data Type Handling</strong></td> <td>Each data type requires different API handling</td> <td>Unified handling for all data types</td> </tr> <tr> <td><strong>Platform Integration</strong></td> <td>Built-in integrations with all major platforms</td> <td>Built-in integrations with <a href="https://www.docugenerate.com/integrations/zapier/">Zapier</a>, <a href="https://www.docugenerate.com/integrations/make/">Make</a>, <a href="https://www.docugenerate.com/integrations/bubble/">Bubble</a> and more</td> </tr> </tbody> </table> <h3 id="dynamic-content">Dynamic Content Generation</h3> <table class="table table-bordered"> <thead> <tr> <th>Feature</th> <th>Google Docs</th> <th>DocuGenerate</th> </tr> </thead> <tbody> <tr> <td><strong>Dynamic Lists</strong></td> <td>Requires programmatic <a href="https://developers.google.com/workspace/docs/api/how-tos/lists" rel="nofollow noopener">lists</a> manipulation</td> <td><a href="https://www.docugenerate.com/help/articles/how-to-add-lists-to-a-template/">Dynamic lists</a> created with simple template syntax</td> </tr> <tr> <td><strong>Variable Tables</strong></td> <td>Complex API calls needed to insert and <a href="https://developers.google.com/workspace/docs/api/how-tos/tables" rel="nofollow noopener">format tables</a></td> <td><a href="https://www.docugenerate.com/help/articles/how-to-add-tables-to-a-template/">Tables</a> generated automatically from data arrays</td> </tr> <tr> <td><strong>Conditional Content</strong></td> <td>Application logic required to determine what to include</td> <td><a href="https://www.docugenerate.com/help/articles/how-to-add-conditions-to-a-template/">Conditional sections</a> defined directly in templates</td> </tr> <tr> <td><strong>Image Insertion</strong></td> <td><a href="https://developers.google.com/workspace/docs/api/how-tos/images" rel="nofollow noopener">Images</a> must be publicly accessible through the URL</td> <td><a href="https://www.docugenerate.com/help/articles/how-to-add-images-to-a-template/">Image handling</a> with resizing and positioning</td> </tr> </tbody> </table> <h3 id="output-formats">Output Formats and Quality</h3> <table class="table table-bordered"> <thead> <tr> <th>Feature</th> <th>Google Docs</th> <th>DocuGenerate</th> </tr> </thead> <tbody> <tr> <td><strong>Native Format</strong></td> <td>Google Docs format</td> <td><a href="https://www.docugenerate.com/help/articles/select-the-merge-export-format/">Multiple output formats</a>: PDF, DOCX, DOC, ODT, TXT, HTML, PNG</td> </tr> <tr> <td><strong>Export Options</strong></td> <td>PDF, DOCX, ODT, RTF, TXT, HTML, EPUB</td> <td>Single-step conversion to target format</td> </tr> <tr> <td><strong>Output Quality</strong></td> <td>Depends on Google’s conversion algorithms</td> <td>High-fidelity generation maintaining original formatting</td> </tr> <tr> <td><strong>Consistency</strong></td> <td>Variable quality across different export formats</td> <td>Consistent output quality across all formats</td> </tr> <tr> <td><strong>Advanced Features</strong></td> <td>Limited control over final formatting and layout</td> <td>Advanced PDF features like <a href="https://www.docugenerate.com/help/articles/merge-a-pdf-at-the-end-of-generated-documents/">merging with existing files</a></td> </tr> </tbody> </table> <h2 id="no-code-integration">Integration with No-Code/Low-Code Platforms</h2> <p><img src="https://www.docugenerate.com/assets/posts/022-google-docs-compare/zapier-google-docs.png" alt="Zapier integration for Google Docs"/></p> <p>No-code and low-code platforms like <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-zapier/">Zapier</a> have revolutionized how businesses automate document generation workflows. These platforms allow users to create sophisticated automation without writing code, making document generation accessible to non-technical team members. However, the integration experience varies significantly between <a href="https://zapier.com/apps/google-docs/integrations">Google Docs</a> and <a href="https://zapier.com/apps/docugenerate/integrations">DocuGenerate</a>, particularly when it comes to template flexibility and merge tag handling.</p> <p>Zapier’s Google Docs integration demonstrates both the power and limitations of using Google Docs for automated document generation. As detailed in <a href="https://zapier.com/blog/create-autopopulate-google-docs-template/" target="_blank" rel="nofollow noopener">Zapier’s guide</a> on creating and autopopulating Google Docs templates, the platform automatically detects merge tags in your Google Docs templates that use the standard <code class="language-plaintext highlighter-rouge">{{ }}</code> syntax.</p> <p><img src="https://www.docugenerate.com/assets/posts/022-google-docs-compare/template-field-names.png" alt="Field names in a sample template" class="desktop-width-75"/></p> <p>When you configure your Zap, these placeholders are detected as form fields, allowing you to map data from your trigger app directly to your template without any manual configuration. While this automatic detection feature makes Google Docs integration appear seamless, it creates a significant limitation: you’re locked into using Google’s specific double-brace <code class="language-plaintext highlighter-rouge">{{ }}</code> delimiter syntax. This constraint becomes problematic when your templates need to coexist with other systems that might conflict with this syntax, or when you want to use other delimiters that match your organization’s existing conventions.</p> <p><img src="https://www.docugenerate.com/assets/posts/022-google-docs-compare/zapier-field-names.png" alt="Zapier automatic field names detection" class="desktop-width-75"/></p> <p>DocuGenerate takes a more flexible approach to delimiter configuration. While it supports the standard double-brace <code class="language-plaintext highlighter-rouge">{{ }}</code> syntax by default, you can <a href="https://www.docugenerate.com/help/articles/how-do-i-update-the-tag-delimiters/">customize the delimiters</a> to use any characters that suit your needs, whether that’s square brackets <code class="language-plaintext highlighter-rouge">[ ]</code>, single braces <code class="language-plaintext highlighter-rouge">{ }</code>, or even custom strings like angle brackets <code class="language-plaintext highlighter-rouge">&lt;&lt; &gt;&gt;</code>. The practical impact of this difference becomes clear in complex automation scenarios. With Google Docs, your entire workflow must conform to the double-brace standard, potentially requiring template modifications and careful content management to avoid conflicts.</p> <h2 id="when-to-choose">When to Choose Google Docs vs DocuGenerate</h2> <h3 id="choose-google-docs">Choose Google Docs For</h3> <ul> <li> <p><strong>Native Google Workspace Integration</strong>: If your organization is heavily invested in Google Workspace and you have existing Google Docs workflows, building on that foundation might make sense.</p> </li> <li> <p><strong>Simple Text Replacement Only</strong>: For basic document generation that only requires simple find-and-replace operations without dynamic content structures.</p> </li> <li> <p><strong>Collaborative Template Editing</strong>: When multiple team members need to collaborate on template creation and you want to leverage Google Docs’ real-time collaboration features.</p> </li> <li> <p><strong>Custom Document Processing</strong>: If you need highly customized document processing logic that goes beyond standard document generation patterns.</p> </li> </ul> <h3 id="choose-docugenerate">Choose DocuGenerate For</h3> <ul> <li> <p><strong>Complex Document Templates</strong>: When your documents require dynamic lists, tables, conditional content, or image insertion.</p> </li> <li> <p><strong>Rapid Implementation</strong>: If you need to get document generation working quickly without extensive development effort.</p> </li> <li> <p><strong>Bulk Document Generation</strong>: For generating large volumes of documents from datasets (Excel, CSV, JSON).</p> </li> <li> <p><strong>Template Management</strong>: When you need version control, sharing, and management features specifically designed for document templates.</p> </li> <li> <p><strong>Multiple Output Formats</strong>: If you need to generate documents in various formats (PDF, Word, etc.) from the same template.</p> </li> </ul> <h2 id="conclusion">Conclusion</h2> <p>Both Google Docs and DocuGenerate offer viable approaches to document generation, but they serve different needs and use cases. <a href="#using-google-docs">Google Docs</a> excels when you need deep integration with Google Workspace and have the technical resources to build custom document generation solutions. However, it requires significant programming expertise and ongoing maintenance for complex document templates.</p> <p><a href="#using-docugenerate">DocuGenerate</a>, on the other hand, is purpose-built for document generation and offers a more declarative, template-centric approach that reduces complexity and development overhead. It’s particularly well-suited for organizations that need to generate complex documents quickly, integrate with no-code platforms, or manage large-scale document generation workflows.</p> <p>If you’re currently using Google Docs for document generation and considering DocuGenerate, the migration process is typically more straightforward than you might expect. Your existing Google Docs templates can be converted to Word format and enhanced with DocuGenerate’s merge tag syntax, and this process often reveals opportunities to simplify complex logic that was previously embedded in code.</p> <h3 id="resources">Resources</h3> <ul> <li><a href="https://developers.google.com/workspace/docs/api/how-tos/merge" target="_blank" rel="nofollow noopener">Google Docs Merge text into a document</a> for Google’s approach to document generation.</li> <li><a href="https://zapier.com/blog/create-autopopulate-google-docs-template/" target="_blank" rel="nofollow noopener">How to create and autopopulate a Google Docs template</a> Zapier tutorial.</li> <li><a href="https://www.docugenerate.com/templates/">DocuGenerate’s Template Library</a> with ready-to-use templates for common use cases.</li> <li><a href="https://www.docugenerate.com/help/">DocuGenerate’s Help Center</a> covering advanced DocuGenerate features and integration guides.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Compare"/> <category term="Google Docs"/> <category term="No-Code"/> <summary type="html"><![CDATA[Discover the key differences between Google Docs and DocuGenerate for automated document generation. Learn which solution is better for creating dynamic templates with lists, tables, images, and complex data merging for your business workflows.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/022-google-docs-compare/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/022-google-docs-compare/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Introducing Template Version History</title> <link href="https://www.docugenerate.com/blog/introducing-template-version-history/" rel="alternate" type="text/html" title="Introducing Template Version History"/> <published>2025-05-27T00:00:00+00:00</published> <updated>2025-05-27T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/introducing-template-version-history</id> <content type="html" xml:base="https://www.docugenerate.com/blog/introducing-template-version-history/"><![CDATA[<h2 id="what-is-version-history">What is Template Version History?</h2> <p>Template Version History is a powerful new feature that automatically saves previous versions of your templates whenever you make changes. This gives you a complete history of how your templates have evolved over time and allows you to restore previous versions if needed.</p> <p>Until now, whenever you updated a template file in DocuGenerate, the previous version was permanently overwritten. Many of our users were working around this limitation by manually tracking versions, adding suffixes like V1, V2, etc. or other numbering schemes to their template names. This approach worked but was cumbersome and prone to errors.</p> <p>Based on user feedback and feature requests, we’ve developed a robust version history system that automatically keeps track of all changes to your templates in DocuGenerate, eliminating the need for manual version tracking.</p> <h2 id="why-version-history-matters">Why Version History Matters</h2> <p>Template versioning solves several critical challenges that document creators face on a daily basis. As organizations increasingly rely on templates for consistency and efficiency in their document workflows, the need for reliable version control becomes essential. With this feature, you can maintain the integrity of your templates while accommodating necessary changes and improvements over time.</p> <p><strong>1. Protection Against Accidental Changes</strong><br/> Everyone makes mistakes. Whether it’s accidentally uploading the wrong file or making unintended changes to a template, version history provides a safety net, allowing you to quickly restore a previous version.</p> <p><strong>2. Template Evolution Tracking</strong><br/> As your business processes evolve, so do your templates. Version history gives you visibility into how your templates have changed over time, helping you understand the evolution of your document generation process.</p> <p><strong>3. Compliance and Audit Requirements</strong><br/> For organizations in regulated industries, having a record of template changes can be crucial for compliance and audit purposes. Version history provides documentation of what changed, and when it changed.</p> <h2 id="how-version-history-works">How Template Version History Works</h2> <h3 id="enabling-version-history">Enabling Version History</h3> <p>This feature is available exclusively in our new Premium and Business plans, as detailed in our <a href="https://www.docugenerate.com/pricing/">pricing page</a>. If you’re on an older plan, you can continue using it indefinitely. However, to benefit from template version history, you’ll need to upgrade to one of these newer plans.</p> <p>For existing templates, versioning is not enabled by default, but can be turned on through the <a href="https://www.docugenerate.com/help/articles/how-do-i-enable-the-version-history/">template settings</a> in the web app:</p> <p><img src="https://www.docugenerate.com/assets/posts/021-template-version-history/enable-versioning.png" alt="Enable versioning toggle in template settings" class="desktop-width-75"/></p> <p>Alternatively, if you’re using our API, you can enable versioning by setting the <code class="language-plaintext highlighter-rouge">versioning_enabled</code> parameter to <code class="language-plaintext highlighter-rouge">true</code> when <a href="https://api.docugenerate.com/#/Template/updateTemplate" target="_blank">updating a template</a>:</p> <p><img src="https://www.docugenerate.com/assets/posts/021-template-version-history/update-template-api.png" alt="Parameters for the update template endpoint"/></p> <p>For new templates, if your account has access to this feature, versioning is enabled by default. When <a href="https://api.docugenerate.com/#/Template/createTemplate" target="_blank">creating a template</a> via the API, you can explicitly set the <code class="language-plaintext highlighter-rouge">versioning_enabled</code> parameter to <code class="language-plaintext highlighter-rouge">true</code> or <code class="language-plaintext highlighter-rouge">false</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/021-template-version-history/create-template-api.png" alt="Parameters for the create template endpoint"/></p> <h3 id="when-versions-are-created">When New Versions Are Created</h3> <p>Once versioning is enabled for a template, a new version is automatically saved whenever you <strong>update the template file</strong>. It’s important to note that changes to template metadata (like the name or other settings) do not create new versions. Only actual changes to the template file itself trigger the creation of a new version.</p> <p>This focused approach ensures that your version history remains relevant and isn’t cluttered with minor metadata changes that don’t affect the document generation output. By tracking only substantive changes to the template content, we help you maintain a clean, meaningful version history that highlights actual evolution in your template design and functionality, making it easier to identify when and how important changes were implemented.</p> <h3 id="managing-template-versions">Managing Template Versions</h3> <p>In the template detail view, you’ll find a new <strong>Versions</strong> panel that displays all saved versions of your template. The current active version is highlighted with a star icon:</p> <p><img src="https://www.docugenerate.com/assets/posts/021-template-version-history/versions-panel.png" alt="Versions panel in template detail view" class="desktop-width-75"/></p> <p>Clicking on any version in the list will display a preview of that version in the left pane, allowing you to review the content before taking any action. For each version, you can perform the following actions:</p> <ul> <li> <p><strong>Restore:</strong> This action replaces the current template file with the selected version and also updates any template settings (name, delimiters, tags, etc.) associated with that version. After restoring, the selected version becomes the current active version.</p> </li> <li> <p><strong>Download:</strong> This action allows you to download a specific version of the template file to your local device. This is useful if you want to review or modify a previous version offline.</p> </li> <li> <p><strong>Delete:</strong> If you no longer need a specific version, you can easily remove it from your history. Note that this action is permanent and cannot be undone, so use it with caution.</p> </li> </ul> <p>There’s no limit to the number of versions that can be saved for a template, giving you comprehensive historical coverage of your template’s evolution.</p> <h2 id="multi-region-considerations">Multi-Region Considerations</h2> <p>If you’re using our <a href="https://www.docugenerate.com/blog/introducing-multi-region-processing-and-storage/">multi-region processing and storage</a> feature, it’s important to understand how template versioning interacts with region settings. This interaction affects where your historical template versions are stored and how they’re managed when you change your template’s region, which can impact compliance requirements and data governance policies.</p> <p>Template versions are always stored in the template’s current region. If you change a template’s region (e.g., from US to EU), only the current template file is moved to the new region. Previous versions remain in the original region.</p> <p>However, any new versions saved after the region change will be stored in the new region. This means that over time, your template’s version history may span multiple regions. This approach minimizes data transfer while ensuring that your current template is always in the region you’ve specified.</p> <h2 id="team-collaboration">Team Members Permissions</h2> <p>For users who share templates with <a href="https://www.docugenerate.com/help/articles/introduction-to-team-collaboration/">team members</a>, version history enhances collaboration in several ways, depending on the permission level:</p> <ul> <li> <p>Team members with <strong>write</strong> permission can update templates, restore previous versions, and delete versions from the history. They have comprehensive control over template management, similar to the template owner, with the sole exception that they cannot delete the template itself.</p> </li> <li> <p>Team members with <strong>read</strong> permission can only view and download template versions. They cannot make changes to the current template or restore previous versions. When viewing a template with read-only permission, they will see a simplified version of the versions panel as shown below:</p> <p><img src="https://www.docugenerate.com/assets/posts/021-template-version-history/team-member-read-v2.png" alt="Versions panel view for a team member with read-only permission" class="desktop-width-75"/></p> </li> </ul> <p>This permission-based approach ensures that team members have appropriate access to version history based on their role in the collaboration process. Team leaders can confidently delegate template editing responsibilities while maintaining oversight, and team members with read-only access can still benefit from seeing the template’s development history without the risk of making unintended changes.</p> <h2 id="api-limitations">API Limitations</h2> <p>To keep our API simple and focused, template version management is only available through the web app. When using the API, you’ll always interact with the current version of a template. This means:</p> <ul> <li>You cannot list, restore, or delete template versions via the API.</li> <li>Document generation always uses the latest version of the template.</li> <li>You can enable or disable versioning for a template via the API, but you cannot manage the versions themselves.</li> </ul> <p>This design decision keeps the API straightforward while still providing the flexibility to enable versioning for templates created or updated via the API.</p> <h2 id="use-case-scenarios">Use Case Scenarios</h2> <p>Let’s explore some real-world scenarios where template version history can provide significant value:</p> <h3 id="scenario-accidental-changes">Scenario 1: Recovering from Accidental Changes</h3> <p>A <strong>marketing team</strong> member accidentally uploads the wrong file when updating a critical customer communication template, overwriting the correct version with an incomplete draft.</p> <p>The team lead discovers the error and simply opens the template in DocuGenerate, navigates to the Versions panel, locates the last correct version, and clicks <strong>Restore</strong>. Within seconds, the template is back to its proper state, with <strong>no disruption</strong> to business operations.</p> <p>Without version history, the team would need to recreate the template from scratch or hope that someone has a local copy of the correct version, potentially causing delays in customer communications.</p> <h3 id="scenario-compliance">Scenario 2: Template Evolution and Compliance</h3> <p>A <strong>financial services</strong> company needs to maintain records of how their customer agreement templates have changed over time to satisfy regulatory compliance requirements.</p> <p>With versioning enabled, the compliance team can view the <strong>complete history</strong> of template changes, download specific versions for <strong>audit purposes</strong>, and demonstrate a clear timeline of template evolution to regulators.</p> <p>Without version history, the company would need to implement a manual process for tracking template changes, potentially storing copies of templates with different filenames or in different locations, making the audit process more complex and error-prone.</p> <h3 id="scenario-collaboration">Scenario 3: Collaborative Template Development</h3> <p>A <strong>legal team</strong> is collaboratively developing a new contract template, with multiple team members making contributions and refinements over several weeks.</p> <p>As team members <strong>make changes</strong>, each update is automatically saved as a new version. If a particular change introduces problems or doesn’t meet requirements, it’s easy to restore a <strong>previous version</strong>. The team can also review the evolution of the template over time to understand how it has developed.</p> <p>Without version history, the team would need to manually coordinate changes and possibly maintain multiple copies of the template with different filenames, creating confusion about which version is the latest or most accurate.</p> <h2 id="best-practices">Best Practices for Template Versioning</h2> <p>To get the most out of this feature, consider these best practices that will help you maintain an organized, efficient, and useful template version history:</p> <ol> <li> <p><strong>Enable Versioning for Critical Templates</strong><br/> While you might not need versioning for every template, it’s particularly valuable for templates that are used frequently, involve complex logic, or are critical to your business operations.</p> </li> <li> <p><strong>Use Meaningful Template Updates</strong><br/> When making changes to a template, try to group related changes together rather than making many small, incremental updates. This helps keep your version history clean and meaningful.</p> </li> <li> <p><strong>Review Version History Periodically</strong><br/> Take time to occasionally review your template version history to clean up unnecessary versions. While there’s currently no limit on the number of versions, keeping your history focused on significant changes makes it easier to navigate.</p> </li> <li> <p><strong>Document Major Changes</strong><br/> While DocuGenerate automatically tracks when changes were made, it doesn’t capture the purpose or intent behind those changes. Consider maintaining a separate change log or documentation for major template updates.</p> </li> <li> <p><strong>Use Team Permissions Thoughtfully</strong><br/> If you’re sharing templates with team members, carefully consider which members need “write” access that allows them to update templates and manage versions. For users who only need to generate documents, “read” access is sufficient.</p> </li> </ol> <h2 id="conclusion">Conclusion</h2> <p>Template Version History represents a significant enhancement to DocuGenerate’s template management capabilities. By automatically tracking changes and providing tools to <a href="https://www.docugenerate.com/help/articles/how-do-i-restore-a-template-version">restore previous versions</a>, this feature offers peace of mind, supports collaboration, and helps maintain the integrity of your document generation process.</p> <p>We’re excited to see how this feature enhances your document generation workflows and helps your team work more efficiently and confidently with templates. As always, we welcome your feedback and suggestions as we continue to improve and expand DocuGenerate’s capabilities.</p> <h3 id="resources">Resources</h3> <ul> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-enable-the-version-history/">How do I enable the version history?</a></li> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-restore-a-template-version">How do I restore a template version?</a></li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Product Update"/> <category term="Web App"/> <category term="Templates"/> <summary type="html"><![CDATA[The new template version history feature offers the ability to track, restore, and manage previous versions of your templates. This powerful addition helps prevent accidental changes, and provides a safety net for your important templates.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/021-template-version-history/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/021-template-version-history/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Automating Event RSVP Tickets with Xano and DocuGenerate</title> <link href="https://www.docugenerate.com/blog/automating-event-rsvp-tickets-with-xano-and-docugenerate/" rel="alternate" type="text/html" title="Automating Event RSVP Tickets with Xano and DocuGenerate"/> <published>2025-04-13T00:00:00+00:00</published> <updated>2025-04-13T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/automating-event-rsvp-tickets-with-xano-and-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/automating-event-rsvp-tickets-with-xano-and-docugenerate/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Managing event RSVPs is a common challenge for event organizers, and providing instant confirmation tickets enhances the attendee experience while keeping you organized. In this tutorial, you’ll learn how to build an automated event ticketing system using <a href="https://www.xano.com/" target="_blank" rel="noopener">Xano</a> for backend logic and <a href="https://www.docugenerate.com">DocuGenerate</a> for PDF generation. We’ll be working with Xano’s <a href="https://gitlab.com/xano-marketplace/xano-events" target="_blank" rel="nofollow noopener">Events</a> template from their marketplace, which provides a ready-to-use event management system with RSVP capabilities.</p> <p>By the end of this tutorial, your system will automatically generate personalized PDF tickets when someone RSVPs to an event, complete with event details and attendee information. This automated approach eliminates manual ticket creation and ensures consistent, professional-looking tickets for all your events. The workflow you’ll create follows this process:</p> <ol> <li>An attendee fills out an RSVP form for an event through a demo application.</li> <li>The RSVP data is stored in your Xano database.</li> <li>A database trigger detects the new RSVP record.</li> <li>The trigger fetches the event details and generates a PDF ticket using DocuGenerate.</li> <li>The generated ticket is ready for distribution to the attendee.</li> </ol> <p>The system can handle multiple events simultaneously, making it suitable for organizations managing several concurrent events.</p> <h2 id="installing-events-template">Installing the Xano Events Template</h2> <p>Xano’s marketplace provides pre-built templates that you can install directly into your workspace. The <strong>Events</strong> template provides a complete event management system designed for collecting and managing event RSVPs. It includes functionality for posting new events with banner images, descriptions, and dates, as well as collecting RSVP information such as attendee names and email addresses.</p> <p>To get started, navigate to the <strong>Marketplace</strong> page in your workspace and look for the <strong>Events</strong> template within <strong>Starter templates</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/xano-events-template.png" alt="The Events template from the Xano marketplace"/></p> <p>Click on <strong>Get Template</strong> to install the template in your workspace. You should see the success message confirming that the template is now available in your workspace.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/events-template-installed.png" alt="Events template installed in workspace"/></p> <p>Once you install the template, you’ll find the following components added to your workspace.</p> <h3 id="template-database-tables">Database Tables</h3> <ul> <li><code class="language-plaintext highlighter-rouge">event</code>: Stores event information including name, description, cover photo, start date, and end date. The template includes 6 sample event records.</li> <li><code class="language-plaintext highlighter-rouge">RSVP</code>: Stores attendee responses with name, email, and a reference to the event. The template includes 13 sample RSVP records.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/database-tables.png" alt="The Events database tables"/></p> <h3 id="template-api-endpoints">API Endpoints</h3> <p>The template creates an <strong>Events</strong> API Group with endpoints for managing both events and RSVPs. These endpoints handle all CRUD operations (Create, Read, Update, Delete) for your event data. You can view these endpoints in the <strong>events</strong> API Group within your Xano workspace, where you’ll also find a <strong>Copy base URL</strong> button that will be useful when connecting to the <a href="#demo-application">demo application</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/events-api-group.png" alt="The Events API Group with endpoints for /event and /rsvp resources"/></p> <h3 id="template-add-ons">Add-ons</h3> <p>The template includes an <code class="language-plaintext highlighter-rouge">rsvp_count</code> add-on that automatically calculates the number of RSVPs for each event, making it easy to track attendance.</p> <h2 id="demo-application">Exploring the Demo Application</h2> <p>After <a href="#installing-events-template">installation</a>, click <strong>Explore live demo</strong> to see the Events template in action. Xano provides the backend infrastructure, but you need a frontend application to interact with your API. The <a href="https://demo.xano.com/xano-events/" target="_blank" rel="nofollow noopener">demo app</a> built by Xano allows you to test the full functionality.</p> <p>To connect the demo app with your Xano backend, you’ll need to provide your API URL. Find this by navigating to the <strong>events</strong> <a href="#template-api-endpoints">API Group</a> in your workspace and clicking <strong>Copy base URL</strong>. Paste this URL into the demo app’s configuration field.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/xano-events-demo.png" alt="Events Demo app"/></p> <p>The demo app provides several key features: viewing all events in a card layout with infinite scroll, searching for events by name, creating new events with cover photos and descriptions, viewing complete event details, and submitting RSVPs with name and email. The app is fully functional and demonstrates how the API endpoints work together to create a cohesive event management system.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/xano-events-app.png" alt="Xano Events app showing event cards"/></p> <p>The events displayed in the demo app correspond directly to the records in your <code class="language-plaintext highlighter-rouge">event</code> <a href="#template-database-tables">database table</a>, which were pre-populated when you installed the template.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/event-database-table.png" alt="Event database table with sample records"/></p> <h2 id="understanding-rsvp-flow">Understanding the RSVP Flow</h2> <p>Click on any event to view its details. You’ll see information about the event along with a <strong>Details</strong> button for more information and an <strong>RSVP</strong> button for submitting your attendance.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/festival-event-details.png" alt="Details of the &quot;Festival&quot; event"/></p> <p>The RSVP form is intentionally simple, requesting only a name and email address. This minimal approach reduces friction and encourages more RSVPs. When someone submits this form, a new record is created in the <code class="language-plaintext highlighter-rouge">RSVP</code> <a href="#template-database-tables">database table</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/festival-event-rsvp.png" alt="RSVP form for the &quot;Festival&quot; event"/></p> <p>You can view all RSVP records in your Xano workspace by navigating to the <code class="language-plaintext highlighter-rouge">RSVP</code> <a href="#template-database-tables">database table</a>, which shows the pre-filled sample data from the template installation.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/rsvp-database-table.png" alt="RSVP database table with sample records"/></p> <p>Now that you understand how the Events template works, let’s enhance it by automatically generating PDF tickets when someone RSVPs to an event.</p> <h2 id="creating-database-trigger">Creating the Database Trigger</h2> <p><a href="https://docs.xano.com/the-function-stack/building-with-visual-development/triggers" target="_blank" rel="nofollow noopener">Triggers</a> in Xano allow you to execute custom workflows when specific database events occur. We’ll create a trigger that fires whenever a new RSVP record is inserted into the database. This trigger will handle all the logic for generating and potentially distributing event tickets. Note that database triggers are a premium feature in Xano and are not available on the free plan.</p> <p>To create a trigger, navigate to the <code class="language-plaintext highlighter-rouge">RSVP</code> table in your database view and click <strong>+ Trigger</strong>, then select <strong>+ Add database trigger and continue</strong>. Configure your trigger with the following settings:</p> <ul> <li><strong>Name</strong>: Enter “New RSVP Answer” for example</li> <li><strong>Data Sources</strong>: Leave empty (this means the trigger executes for all data sources)</li> <li><strong>Actions</strong>: Select only <strong>Inserts</strong> (the trigger should only fire when new RSVP records are created, not when they’re updated or deleted)</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/new-rsvp-answer-trigger-create.png" alt="Creating the &quot;New RSVP Answer&quot; trigger"/></p> <p>After creating the trigger, you’ll see a basic workflow containing only an <strong>Inputs</strong> function, which receives data about the new RSVP record whenever the trigger fires. You’ll build upon this foundation by adding functions that fetch event data and generate tickets.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/rsvp-trigger-created.png" alt="New RSVP Answer empty trigger"/></p> <h2 id="installing-docugenerate">Installing the DocuGenerate Snippet</h2> <p>To enable PDF generation capabilities in your Xano workspace, you need to install the <a href="https://www.xano.com/snippet/be03h9xT/" target="_blank" rel="nofollow noopener">DocuGenerate snippet</a> from the Xano marketplace. Snippets are pre-built functions that extend Xano’s capabilities by integrating with external services.</p> <p>Click <strong>Add to your Xano Account</strong> and follow the installation steps. Log in to your Xano account, select the instance where you want to add the snippet, and click <strong>Add to Instance</strong>. After confirming, you’ll be able to install the snippet directly to your workspace by selecting it from a list of available workspaces.</p> <p>Once installed, the DocuGenerate snippet provides a <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-xano/#generate-document">Generate Document</a> function that you can use in any workflow. This function connects to the DocuGenerate API to create documents from templates.</p> <h3 id="configuring-api-key">Configuring Your API Key</h3> <p>Before you can use the DocuGenerate snippet, you need to configure your <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a> in the workspace settings. Navigate to your workspace settings in Xano and find the <strong>Environment Variables</strong> section. Click on the <strong>Manage</strong> button, then enter your API Key in the <code class="language-plaintext highlighter-rouge">docugenerate_api_key</code> variable. Don’t forget to click <strong>Save</strong> for the changes to apply.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/docugenerate-api-key.png" alt="Configure the DocuGenerate API Key"/></p> <h2 id="creating-ticket-template">Creating the RSVP Event Ticket Template</h2> <p>Next, you’ll need to create a Word template for your event tickets in DocuGenerate. The template should include merge tags for all the data points you want to display on the ticket. For this tutorial, we’ll use the following merge tags:</p> <ul> <li><code class="language-plaintext highlighter-rouge">[event_name]</code>: The name of the event</li> <li><code class="language-plaintext highlighter-rouge">[start_at]</code>: The event start date and time</li> <li><code class="language-plaintext highlighter-rouge">[end_at]</code>: The event end date and time</li> <li><code class="language-plaintext highlighter-rouge">[event_photo]</code>: The event’s cover photo</li> <li><code class="language-plaintext highlighter-rouge">[rsvp_name]</code>: The attendee’s name</li> <li><code class="language-plaintext highlighter-rouge">[rsvp_email]</code>: The attendee’s email address</li> </ul> <p>Create a new template in DocuGenerate and upload your Word document. Make sure to enable the <a href="https://www.docugenerate.com/help/articles/how-do-i-enable-the-enhanced-syntax/">enhanced syntax</a> for this template, which allows you to use advanced features like the image resizing filter. Note that when using enhanced syntax, merge tag names cannot contain whitespace characters, which is why we use underscores instead of spaces.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/rsvp-event-ticket-template-v2.png" alt="RSVP Event Ticket template in DocuGenerate"/></p> <p>You can <a href="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/RSVP Event Ticket.docx" target="_blank">download the template</a> used in this tutorial and customize it for your own events. Once your template is created, copy its <a href="https://www.docugenerate.com/help/articles/how-do-i-get-the-template-id/">template ID</a> from the DocuGenerate interface, as you’ll need this when configuring the Generate Document function in Xano later on.</p> <h2 id="building-trigger-workflow">Building the Trigger Workflow</h2> <p>Now that your trigger is created and DocuGenerate is installed, you’re ready to build the workflow that generates tickets. This workflow will fetch the event details for the RSVP and use that data to generate a personalized PDF ticket.</p> <h3 id="configuring-document-generation">Configuring Document Generation</h3> <p>To add the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-xano/#generate-document">Generate Document</a> function to your workflow, click on <strong>Add function</strong>, search for “DocuGenerate” in the function library. Then select <strong>DocuGenerate/Generate Document</strong> from the results.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/search-generate-document-function-v2.png" alt="Adding the &quot;DocuGenerate/Generate Document&quot; function to the workflow"/></p> <p>The Generate Document function requires several input fields:</p> <ul> <li><strong>template_id</strong>: Paste the template ID from your <a href="#creating-ticket-template">RSVP Event Ticket</a> template</li> <li><strong>name</strong>: Set this to a dynamic value like <code class="language-plaintext highlighter-rouge">Ticket for %s</code> using the <code class="language-plaintext highlighter-rouge">sprintf</code> function to include the attendee’s name from <code class="language-plaintext highlighter-rouge">new.name</code></li> <li><strong>output_format</strong>: Set to <code class="language-plaintext highlighter-rouge">.pdf</code> to generate PDF tickets</li> <li><strong>data</strong>: For the <code class="language-plaintext highlighter-rouge">data</code> parameter, start by selecting the object type, then use the <code class="language-plaintext highlighter-rouge">set</code> filter multiple times to add key-value pairs. This object will contain the merge tag values for your template: <ul> <li><strong>rsvp_name</strong>: Set to <code class="language-plaintext highlighter-rouge">new.name</code> from the RSVP record</li> <li><strong>rsvp_email</strong>: Set to <code class="language-plaintext highlighter-rouge">new.email</code> from the RSVP record</li> </ul> </li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/configure-generate-document-function.png" alt="Configuring the &quot;DocuGenerate/Generate Document&quot; function"/></p> <p>With this configuration, the ticket will only be populated with the person’s data. We need to also include the event data on the ticket.</p> <h3 id="fetching-event-data">Fetching Event Data</h3> <p>The RSVP record contains an <code class="language-plaintext highlighter-rouge">event_id</code> field that references the associated event. You need to fetch the complete event details before generating the ticket. Add a <strong>Query all Records</strong> function to your trigger workflow before <a href="#configuring-document-generation">Generate Document</a> and configure it to query the <code class="language-plaintext highlighter-rouge">event</code> table.</p> <p>To fetch only the specific event for this RSVP, add a filter using a custom query: <code class="language-plaintext highlighter-rouge">db:event.id==input:new.event_id</code>. This condition matches the event ID from the database with the event ID in the new RSVP record. In the <strong>Return settings</strong>, change the return type to <strong>single</strong> instead of the default list, since you’re only expecting one event record. Finally, set the <strong>Return as</strong> value to <code class="language-plaintext highlighter-rouge">event</code> so you can reference this data later in the workflow.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/query-event-records-by-id.png" alt="Configuring the &quot;Query all Records&quot; function for the &quot;event&quot; table"/></p> <h3 id="adding-event-data">Adding Event Data to the Ticket</h3> <p>With the event data fetched in the <code class="language-plaintext highlighter-rouge">event</code> variable, we need to go back to configuring the <a href="#configuring-document-generation">Generate Document</a> function and add the following mappings to the <code class="language-plaintext highlighter-rouge">data</code> input:</p> <ul> <li><strong>event_name</strong>: Set to <code class="language-plaintext highlighter-rouge">event.name</code> from the event record you <a href="#fetching-event-data">fetched earlier</a></li> <li><strong>start_at</strong>: Set to <code class="language-plaintext highlighter-rouge">event.start_at</code> formatted using the <a href="https://docs.xano.com/the-function-stack/filters/timestamp" target="_blank" rel="nofollow noopener">format_timestamp</a> filter with the format <code class="language-plaintext highlighter-rouge">M j, Y h:i A</code> to display dates like “Oct 31, 2023 12:00 AM”</li> <li><strong>end_at</strong>: Set to <code class="language-plaintext highlighter-rouge">event.end_at</code> also formatted as <code class="language-plaintext highlighter-rouge">M j, Y h:i A</code></li> <li><strong>event_photo</strong>: Set to <code class="language-plaintext highlighter-rouge">event.cover_photo.url</code> to include the event’s cover image in the ticket</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/generate-document-all-params.png" alt="Configuring all parameters for the &quot;Generate Document&quot; function"/></p> <p>The <code class="language-plaintext highlighter-rouge">format_timestamp</code> filter is particularly useful here because it transforms Xano’s timestamp format into a human-readable format that looks professional on your tickets.</p> <h2 id="testing-workflow">Testing The Workflow End-to-End</h2> <p>With your trigger workflow complete, it’s time to test the entire system. Navigate back to the <a href="#demo-application">demo application</a> and submit a new RSVP for any event. When you submit the form, the trigger executes automatically in the background.</p> <p>For example, try RSVPing to the “2 Day Pokemon Dance Party” event with your name and email. Then navigate to your template in DocuGenerate and view its <a href="https://www.docugenerate.com/help/articles/where-do-i-find-the-generated-documents/">generated documents</a>. You should see a new document corresponding to your RSVP response.</p> <p><img src="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/generated-ticket-example.png" alt="Generated document &quot;Ticket for John Silver.pdf&quot; in DocuGenerate"/></p> <p>The ticket should include the attendee’s name, email, event information, dates, and the event’s cover photo. For reference, you can <a href="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/Ticket for John Silver.pdf" target="_blank">download</a> the example PDF ticket generated in this tutorial.</p> <h2 id="possible-enhancements">Possible Enhancements</h2> <p>The current workflow successfully generates tickets, but there are several ways you could enhance it to create an even more powerful event management system.</p> <p>One valuable enhancement would be automatically emailing the ticket to the attendee. Xano supports email integration through various providers, and you could add an email function after the document generation step. This would send the ticket URL or attach the PDF directly to a confirmation email, providing instant gratification to attendees and reducing your administrative workload.</p> <p>Another possibility is adding QR codes to your tickets using DocuGenerate’s <a href="https://www.docugenerate.com/help/articles/how-to-add-qr-codes-and-barcodes/">QR code feature</a>. You could encode the RSVP ID or a unique confirmation code in the QR code, making it easy to scan tickets at event check-in and verify attendance.</p> <p>For events with limited capacity, you could add logic to check the current RSVP count before generating tickets. If the event is at capacity, the workflow could either prevent new RSVPs or add attendees to a waiting list instead of immediately generating tickets.</p> <h2 id="conclusion">Conclusion</h2> <p>We’ve successfully built an automated event ticketing system that generates personalized PDF tickets when attendees RSVP to your events. This workflow demonstrates the power of combining Xano’s backend capabilities with DocuGenerate’s document generation features, all without writing traditional code.</p> <p>The system is both practical and extensible, and can adapt to other use cases beyond event tickets, such as generating certificates, invoices, or any other document that needs to be created automatically based on database changes. The key concept of using database triggers to initiate document generation workflows can be applied to countless scenarios.</p> <p>As you continue working with <a href="https://www.docugenerate.com/integrations/xano/">Xano and DocuGenerate</a>, consider how you might customize this workflow for your specific needs. Whether you’re managing small community events or large conferences, this automated ticketing system provides a solid foundation that can scale with your requirements.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.xano.com/snippet/be03h9xT/" target="_blank" rel="noopener">DocuGenerate Xano Snippet</a> for document generation capabilities.</li> <li>The <a href="https://demo.xano.com/xano-events/" target="_blank" rel="nofollow noopener">Events Demo App</a> for testing the event management system.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/RSVP Event Ticket.docx" target="_blank">RSVP Event Ticket</a> Word template used in this tutorial.</li> <li>An example of a <a href="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/Ticket for John Silver.pdf" target="_blank">generated PDF ticket</a> created by the workflow.</li> <li>The complete <a href="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/trigger-xanoscript.txt" target="_blank">XanoScript workflow</a> for the database trigger.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Tickets"/> <category term="Xano"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to automatically generate PDF event tickets when attendees RSVP to your events using Xano and DocuGenerate. This comprehensive tutorial walks you through setting up database triggers and building a complete event ticketing workflow.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/020-xano-events-rsvp/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">How to Create ZUGFeRD / Factur-X PDF Invoices with DocuGenerate</title> <link href="https://www.docugenerate.com/blog/how-to-create-zugferd-factur-x-pdf-invoices-with-docugenerate/" rel="alternate" type="text/html" title="How to Create ZUGFeRD / Factur-X PDF Invoices with DocuGenerate"/> <published>2025-03-08T00:00:00+00:00</published> <updated>2025-03-08T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/how-to-create-zugferd-factur-x-pdf-invoices-with-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/how-to-create-zugferd-factur-x-pdf-invoices-with-docugenerate/"><![CDATA[<h2 id="what-is-electronic-invoicing">What is Electronic Invoicing?</h2> <p><strong>Electronic invoicing (e-invoicing)</strong> is the exchange of invoice documents between suppliers and buyers in a structured electronic format. Unlike traditional paper invoices or simple PDF files sent via email, e-invoices contain structured data that can be automatically processed by accounting systems, reducing manual data entry and improving accuracy.</p> <p>The European Union has been driving the adoption of e-invoicing through various directives and standards. In Germany, e-invoicing becomes mandatory for B2B transactions starting January 1, 2025, while France will require it by September 2026. These regulations are designed to improve efficiency, reduce costs, and enhance tax compliance across the European market.</p> <p>E-invoices typically come in different formats, but one of the most popular approaches is the <strong>hybrid format</strong> that combines both human-readable and machine-readable elements in a single document. This approach ensures compatibility with existing workflows while enabling automated processing. E-invoice generation can be integrated into various business workflows:</p> <ul> <li><strong>ERP Integration</strong>: Trigger e-invoice generation when invoices are approved in your ERP system</li> <li><strong>E-commerce Platforms</strong>: Automatically generate e-invoices for online orders</li> <li><strong>Subscription Systems</strong>: Create recurring e-invoices for subscription-based services</li> <li><strong>Project Management</strong>: Generate e-invoices based on completed project milestones</li> </ul> <h2 id="understanding-hybrid-formats">Understanding Hybrid E-Invoice Formats</h2> <p>Hybrid e-invoice formats represent the best of both worlds: they maintain the familiar PDF presentation that humans can read and understand, while embedding structured XML data that machines can process automatically. The most prominent examples of this approach are <a href="https://www.mustangproject.org/zugferd/" target="_blank" rel="nofollow noopener">ZUGFeRD</a> (developed in Germany) and <a href="https://fnfe-mpe.org/factur-x/" target="_blank" rel="nofollow noopener">Factur-X</a> (developed in France), which have been harmonized and are now essentially the same standard.</p> <h3 id="key-components">Key Components of Hybrid E-Invoices</h3> <p>A hybrid e-invoice consists of several essential components:</p> <ul> <li> <p><strong>PDF/A-3 Document</strong>: The visual representation of the invoice that looks like a traditional invoice. PDF/A-3 is specifically chosen because it supports embedded file attachments while maintaining long-term archival capabilities.</p> </li> <li> <p><strong>Embedded XML File</strong>: Machine-readable structured data that contains all invoice information in a standardized format. This XML follows international standards like UN/CEFACT Cross Industry Invoice (CII).</p> </li> <li> <p><strong>Metadata</strong>: Special metadata embedded in the PDF that identifies the document as an e-invoice and provides information about the embedded XML structure.</p> </li> <li> <p><strong>Digital Signatures</strong>: Optional cryptographic signatures that ensure document integrity and authenticity.</p> </li> </ul> <h3 id="standards-and-naming">Standards and Naming Conventions</h3> <p>Different e-invoicing standards require specific naming conventions for the embedded XML files:</p> <ul> <li><strong>ZUGFeRD 1.0</strong>: The XML file must be named <code class="language-plaintext highlighter-rouge">ZUGFeRD-invoice.xml</code></li> <li><strong>ZUGFeRD 2.0</strong>: The XML file must be named <code class="language-plaintext highlighter-rouge">zugferd-invoice.xml</code></li> <li><strong>ZUGFeRD 2.1 and Factur-X</strong>: The XML file must be named <code class="language-plaintext highlighter-rouge">factur-x.xml</code></li> <li><strong>Italian FatturaPA</strong>: Must match the invoice ID, e.g., <code class="language-plaintext highlighter-rouge">IT01234567890_00001.xml</code></li> </ul> <p>For most European implementations, following the Factur-X standard with the filename <code class="language-plaintext highlighter-rouge">factur-x.xml</code> provides the broadest compatibility.</p> <h2 id="docugenerate-approach">The DocuGenerate Approach to E-Invoicing</h2> <p>DocuGenerate provides a practical solution for generating e-invoices by focusing on the <a href="https://www.docugenerate.com/pdf-generation-api/">PDF generation</a> aspect while supporting <a href="https://www.docugenerate.com/help/articles/is-it-possible-to-add-attachments-to-pdfs/">XML attachments</a> through its API. This approach recognizes that while the PDF can be dynamically generated from templates, the XML structure often requires specialized validation and compliance checking that is best handled by dedicated systems.</p> <h3 id="two-step-process">Two-Step Process</h3> <p>Creating compliant e-invoices with DocuGenerate involves a two-step process:</p> <p><strong>1. Generate the XML Structure</strong>: Use specialized e-invoicing libraries or services to create compliant XML data that follows the required standards (ZUGFeRD, Factur-X, etc.).</p> <p><strong>2. Generate the PDF with Embedded XML</strong>: Use DocuGenerate to create the PDF invoice while attaching the pre-generated XML file.</p> <p>This separation of concerns ensures that both components meet their respective requirements: the XML maintains strict compliance with e-invoicing standards, while the PDF provides professional presentation and branding flexibility.</p> <h3 id="xml-generation-considerations">XML Generation Considerations</h3> <p>The XML component of an e-invoice must be carefully crafted to ensure compliance with the chosen standard. Key considerations include:</p> <ul> <li><strong>Data Accuracy</strong>: All values in the XML must exactly match those displayed in the PDF.</li> <li><strong>Validation</strong>: The XML should be validated against the appropriate XSD schema and Schematron rules.</li> <li><strong>Profile Selection</strong>: Choose the appropriate profile (Minimum, Basic, EN16931, Extended) based on your requirements.</li> <li><strong>Code Lists</strong>: Use the correct code lists for countries, currencies, tax categories, and other standardized values.</li> </ul> <h2 id="implementing-generation">Implementing E-Invoice Generation</h2> <p>Let’s walk through a practical implementation of e-invoice generation using DocuGenerate’s API with PDF attachments.</p> <h3 id="prepare-template">Step 1: Prepare Your Invoice Template</h3> <p>Create a professional invoice template in Microsoft Word or another supported format. The template should include <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> for all the dynamic content that will be populated from your data source. As shown in the template below, you’ll need to strategically place merge tags throughout the document to capture all necessary invoice information.</p> <p><img src="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/invoice-template.png" alt="Word template of the invoice"/></p> <p>The <a href="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/Factur-X Invoice.docx">invoice template</a> featured in this tutorial includes the following merge tags:</p> <p><strong>Customer Information:</strong></p> <ul> <li><code class="language-plaintext highlighter-rouge">[Company Name]</code> - The customer’s company name</li> <li><code class="language-plaintext highlighter-rouge">[Street Address]</code> - Customer’s street address</li> <li><code class="language-plaintext highlighter-rouge">[City]</code> - Customer’s city</li> <li><code class="language-plaintext highlighter-rouge">[State]</code> - Customer’s state or region</li> <li><code class="language-plaintext highlighter-rouge">[Zip Code]</code> - Customer’s postal code</li> </ul> <p><strong>Invoice Details:</strong></p> <ul> <li><code class="language-plaintext highlighter-rouge">[Invoice No]</code> - Unique invoice identifier</li> <li><code class="language-plaintext highlighter-rouge">[Invoice Date]</code> - Date the invoice was issued</li> </ul> <p><strong>Line Items (using list syntax):</strong></p> <ul> <li><code class="language-plaintext highlighter-rouge">[#Items]...[/]</code> - Loop structure for multiple invoice line items</li> <li><code class="language-plaintext highlighter-rouge">[Description]</code> - Product or service description</li> <li><code class="language-plaintext highlighter-rouge">[Quantity]</code> - Number of items</li> <li><code class="language-plaintext highlighter-rouge">[Price]</code> - Unit price per item</li> <li><code class="language-plaintext highlighter-rouge">[Amount]</code> - Total amount for the line item</li> </ul> <p><strong>Totals:</strong></p> <ul> <li><code class="language-plaintext highlighter-rouge">[Sub Total]</code> - Sum of all line items before tax</li> <li><code class="language-plaintext highlighter-rouge">[Tax Rate]</code> - Tax percentage rate</li> <li><code class="language-plaintext highlighter-rouge">[Tax Total]</code> - Total tax amount</li> <li><code class="language-plaintext highlighter-rouge">[Total]</code> - Final invoice total including tax</li> </ul> <h3 id="prepare-data">Step 2: Prepare Your Invoice Data</h3> <p>Before generating the invoice, you need to prepare your data in JSON format. The JSON keys must exactly match the merge tags in your template for proper substitution. Each key corresponds to a merge tag in the template - for example, the JSON key <code class="language-plaintext highlighter-rouge">"Company Name"</code> will replace the <code class="language-plaintext highlighter-rouge">[Company Name]</code> merge tag in the document.</p> <p>Here’s the sample <a href="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/invoice-data.json">JSON data</a> that corresponds to our invoice template:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
  </span><span class="p">{</span><span class="w">
    </span><span class="nl">"Company Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"TechGear Solutions"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Invoice No"</span><span class="p">:</span><span class="w"> </span><span class="s2">"INV-2025-001"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Street Address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"82 Bashford Avenue"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"City"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Chicago"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"State"</span><span class="p">:</span><span class="w"> </span><span class="s2">"IL"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Zip Code"</span><span class="p">:</span><span class="w"> </span><span class="s2">"60652"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Invoice Date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"March 8, 2025"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Items"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Wireless Mouse"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Quantity"</span><span class="p">:</span><span class="w"> </span><span class="s2">"5"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Price"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$29.99"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Amount"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$149.95"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"USB-C Cable (2m)"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Quantity"</span><span class="p">:</span><span class="w"> </span><span class="s2">"10"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Price"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$12.50"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Amount"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$125.00"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Description"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Laptop Stand"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Quantity"</span><span class="p">:</span><span class="w"> </span><span class="s2">"3"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Price"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$45.00"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Amount"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$135.00"</span><span class="w">
      </span><span class="p">}</span><span class="w">
    </span><span class="p">],</span><span class="w">
    </span><span class="nl">"Sub Total"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$409.95"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tax Rate"</span><span class="p">:</span><span class="w"> </span><span class="s2">"20"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Tax Total"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$81.99"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Total"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$491.94"</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div> <p>Notice how the <code class="language-plaintext highlighter-rouge">Items</code> array contains multiple objects, each representing a line item on the invoice. This structure works with the <code class="language-plaintext highlighter-rouge">[#Items]...[/]</code> loop syntax in the template to generate <a href="https://www.docugenerate.com/help/articles/how-to-add-tables-to-a-template/">multiple rows</a> in the invoice table.</p> <h3 id="generate-xml">Step 3: Generate Compliant XML</h3> <p>Before creating the PDF, you need to generate the XML structure that will be embedded in the PDF. All values in the XML file must match the corresponding values in your JSON dataset that populates the PDF, such as invoice numbers, amounts, dates, line items, and totals. Any discrepancies between the PDF and XML data can cause validation failures or processing issues with recipient systems.</p> <p>Here’s a simplified example of what a Factur-X XML structure might look like:</p> <div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="nt">&lt;rsm:CrossIndustryInvoice</span> <span class="na">xmlns:rsm=</span><span class="s">"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"</span>
                          <span class="na">xmlns:a=</span><span class="s">"urn:un:unece:uncefact:data:standard:QualifiedDataType:100"</span>
                          <span class="na">xmlns:qdt=</span><span class="s">"urn:un:unece:uncefact:data:standard:QualifiedDataType:10"</span>
                          <span class="na">xmlns:ram=</span><span class="s">"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"</span>
                          <span class="na">xmlns:udt=</span><span class="s">"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"</span>
                          <span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;rsm:ExchangedDocumentContext&gt;</span>
        <span class="nt">&lt;ram:GuidelineSpecifiedDocumentContextParameter&gt;</span>
            <span class="nt">&lt;ram:ID&gt;</span>urn:cen.eu:en16931:2017<span class="nt">&lt;/ram:ID&gt;</span>
        <span class="nt">&lt;/ram:GuidelineSpecifiedDocumentContextParameter&gt;</span>
    <span class="nt">&lt;/rsm:ExchangedDocumentContext&gt;</span>
    <span class="nt">&lt;rsm:ExchangedDocument&gt;</span>
        <span class="nt">&lt;ram:ID&gt;</span>INV-2025-001<span class="nt">&lt;/ram:ID&gt;</span>
        <span class="nt">&lt;ram:TypeCode&gt;</span>380<span class="nt">&lt;/ram:TypeCode&gt;</span>
        <span class="nt">&lt;ram:IssueDateTime&gt;</span>
            <span class="nt">&lt;udt:DateTimeString</span> <span class="na">format=</span><span class="s">"102"</span><span class="nt">&gt;</span>20250308<span class="nt">&lt;/udt:DateTimeString&gt;</span>
        <span class="nt">&lt;/ram:IssueDateTime&gt;</span>
    <span class="nt">&lt;/rsm:ExchangedDocument&gt;</span>
    <span class="nt">&lt;rsm:SupplyChainTradeTransaction&gt;</span>
        <span class="nt">&lt;ram:IncludedSupplyChainTradeLineItem&gt;</span>
            <span class="nt">&lt;ram:AssociatedDocumentLineDocument&gt;</span>
                <span class="nt">&lt;ram:LineID&gt;</span>1<span class="nt">&lt;/ram:LineID&gt;</span>
            <span class="nt">&lt;/ram:AssociatedDocumentLineDocument&gt;</span>
            <span class="nt">&lt;ram:SpecifiedTradeProduct&gt;</span>
                <span class="nt">&lt;ram:Name&gt;</span>Wireless Mouse<span class="nt">&lt;/ram:Name&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedTradeProduct&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeAgreement&gt;</span>
                <span class="nt">&lt;ram:NetPriceProductTradePrice&gt;</span>
                    <span class="nt">&lt;ram:ChargeAmount&gt;</span>29.99<span class="nt">&lt;/ram:ChargeAmount&gt;</span>
                <span class="nt">&lt;/ram:NetPriceProductTradePrice&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeAgreement&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeDelivery&gt;</span>
                <span class="nt">&lt;ram:BilledQuantity</span> <span class="na">unitCode=</span><span class="s">"C62"</span><span class="nt">&gt;</span>5.0000<span class="nt">&lt;/ram:BilledQuantity&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeDelivery&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeSettlement&gt;</span>
                <span class="nt">&lt;ram:ApplicableTradeTax&gt;</span>
                    <span class="nt">&lt;ram:TypeCode&gt;</span>VAT<span class="nt">&lt;/ram:TypeCode&gt;</span>
                    <span class="nt">&lt;ram:CategoryCode&gt;</span>S<span class="nt">&lt;/ram:CategoryCode&gt;</span>
                    <span class="nt">&lt;ram:RateApplicablePercent&gt;</span>20<span class="nt">&lt;/ram:RateApplicablePercent&gt;</span>
                <span class="nt">&lt;/ram:ApplicableTradeTax&gt;</span>
                <span class="nt">&lt;ram:SpecifiedTradeSettlementLineMonetarySummation&gt;</span>
                    <span class="nt">&lt;ram:LineTotalAmount&gt;</span>149.95<span class="nt">&lt;/ram:LineTotalAmount&gt;</span>
                <span class="nt">&lt;/ram:SpecifiedTradeSettlementLineMonetarySummation&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeSettlement&gt;</span>
        <span class="nt">&lt;/ram:IncludedSupplyChainTradeLineItem&gt;</span>
        <span class="nt">&lt;ram:IncludedSupplyChainTradeLineItem&gt;</span>
            <span class="nt">&lt;ram:AssociatedDocumentLineDocument&gt;</span>
                <span class="nt">&lt;ram:LineID&gt;</span>2<span class="nt">&lt;/ram:LineID&gt;</span>
            <span class="nt">&lt;/ram:AssociatedDocumentLineDocument&gt;</span>
            <span class="nt">&lt;ram:SpecifiedTradeProduct&gt;</span>
                <span class="nt">&lt;ram:Name&gt;</span>USB-C Cable (2m)<span class="nt">&lt;/ram:Name&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedTradeProduct&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeAgreement&gt;</span>
                <span class="nt">&lt;ram:NetPriceProductTradePrice&gt;</span>
                    <span class="nt">&lt;ram:ChargeAmount&gt;</span>12.50<span class="nt">&lt;/ram:ChargeAmount&gt;</span>
                <span class="nt">&lt;/ram:NetPriceProductTradePrice&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeAgreement&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeDelivery&gt;</span>
                <span class="nt">&lt;ram:BilledQuantity</span> <span class="na">unitCode=</span><span class="s">"C62"</span><span class="nt">&gt;</span>10.0000<span class="nt">&lt;/ram:BilledQuantity&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeDelivery&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeSettlement&gt;</span>
                <span class="nt">&lt;ram:ApplicableTradeTax&gt;</span>
                    <span class="nt">&lt;ram:TypeCode&gt;</span>VAT<span class="nt">&lt;/ram:TypeCode&gt;</span>
                    <span class="nt">&lt;ram:CategoryCode&gt;</span>S<span class="nt">&lt;/ram:CategoryCode&gt;</span>
                    <span class="nt">&lt;ram:RateApplicablePercent&gt;</span>20<span class="nt">&lt;/ram:RateApplicablePercent&gt;</span>
                <span class="nt">&lt;/ram:ApplicableTradeTax&gt;</span>
                <span class="nt">&lt;ram:SpecifiedTradeSettlementLineMonetarySummation&gt;</span>
                    <span class="nt">&lt;ram:LineTotalAmount&gt;</span>125.00<span class="nt">&lt;/ram:LineTotalAmount&gt;</span>
                <span class="nt">&lt;/ram:SpecifiedTradeSettlementLineMonetarySummation&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeSettlement&gt;</span>
        <span class="nt">&lt;/ram:IncludedSupplyChainTradeLineItem&gt;</span>
        <span class="nt">&lt;ram:IncludedSupplyChainTradeLineItem&gt;</span>
            <span class="nt">&lt;ram:AssociatedDocumentLineDocument&gt;</span>
                <span class="nt">&lt;ram:LineID&gt;</span>3<span class="nt">&lt;/ram:LineID&gt;</span>
            <span class="nt">&lt;/ram:AssociatedDocumentLineDocument&gt;</span>
            <span class="nt">&lt;ram:SpecifiedTradeProduct&gt;</span>
                <span class="nt">&lt;ram:Name&gt;</span>Laptop Stand<span class="nt">&lt;/ram:Name&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedTradeProduct&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeAgreement&gt;</span>
                <span class="nt">&lt;ram:NetPriceProductTradePrice&gt;</span>
                    <span class="nt">&lt;ram:ChargeAmount&gt;</span>45.00<span class="nt">&lt;/ram:ChargeAmount&gt;</span>
                <span class="nt">&lt;/ram:NetPriceProductTradePrice&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeAgreement&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeDelivery&gt;</span>
                <span class="nt">&lt;ram:BilledQuantity</span> <span class="na">unitCode=</span><span class="s">"C62"</span><span class="nt">&gt;</span>3.0000<span class="nt">&lt;/ram:BilledQuantity&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeDelivery&gt;</span>
            <span class="nt">&lt;ram:SpecifiedLineTradeSettlement&gt;</span>
                <span class="nt">&lt;ram:ApplicableTradeTax&gt;</span>
                    <span class="nt">&lt;ram:TypeCode&gt;</span>VAT<span class="nt">&lt;/ram:TypeCode&gt;</span>
                    <span class="nt">&lt;ram:CategoryCode&gt;</span>S<span class="nt">&lt;/ram:CategoryCode&gt;</span>
                    <span class="nt">&lt;ram:RateApplicablePercent&gt;</span>20<span class="nt">&lt;/ram:RateApplicablePercent&gt;</span>
                <span class="nt">&lt;/ram:ApplicableTradeTax&gt;</span>
                <span class="nt">&lt;ram:SpecifiedTradeSettlementLineMonetarySummation&gt;</span>
                    <span class="nt">&lt;ram:LineTotalAmount&gt;</span>135.00<span class="nt">&lt;/ram:LineTotalAmount&gt;</span>
                <span class="nt">&lt;/ram:SpecifiedTradeSettlementLineMonetarySummation&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedLineTradeSettlement&gt;</span>
        <span class="nt">&lt;/ram:IncludedSupplyChainTradeLineItem&gt;</span>
        <span class="nt">&lt;ram:ApplicableHeaderTradeAgreement&gt;</span>
            <span class="nt">&lt;ram:SellerTradeParty&gt;</span>
                <span class="nt">&lt;ram:Name&gt;</span>DocuGenerate<span class="nt">&lt;/ram:Name&gt;</span>
                <span class="nt">&lt;ram:PostalTradeAddress&gt;</span>
                    <span class="nt">&lt;ram:PostcodeCode&gt;</span>90013<span class="nt">&lt;/ram:PostcodeCode&gt;</span>
                    <span class="nt">&lt;ram:LineOne&gt;</span>93 East Lassen Street<span class="nt">&lt;/ram:LineOne&gt;</span>
                    <span class="nt">&lt;ram:CityName&gt;</span>Los Angeles<span class="nt">&lt;/ram:CityName&gt;</span>
                    <span class="nt">&lt;ram:CountryID&gt;</span>US<span class="nt">&lt;/ram:CountryID&gt;</span>
                <span class="nt">&lt;/ram:PostalTradeAddress&gt;</span>
                <span class="nt">&lt;ram:SpecifiedTaxRegistration&gt;</span>
                    <span class="nt">&lt;ram:ID</span> <span class="na">schemeID=</span><span class="s">"VA"</span><span class="nt">&gt;</span>US12367623<span class="nt">&lt;/ram:ID&gt;</span>
                <span class="nt">&lt;/ram:SpecifiedTaxRegistration&gt;</span>
            <span class="nt">&lt;/ram:SellerTradeParty&gt;</span>
            <span class="nt">&lt;ram:BuyerTradeParty&gt;</span>
                <span class="nt">&lt;ram:Name&gt;</span>TechGear Solutions<span class="nt">&lt;/ram:Name&gt;</span>
                <span class="nt">&lt;ram:PostalTradeAddress&gt;</span>
                    <span class="nt">&lt;ram:PostcodeCode&gt;</span>60652<span class="nt">&lt;/ram:PostcodeCode&gt;</span>
                    <span class="nt">&lt;ram:LineOne&gt;</span>82 Bashford Avenue<span class="nt">&lt;/ram:LineOne&gt;</span>
                    <span class="nt">&lt;ram:CityName&gt;</span>Chicago<span class="nt">&lt;/ram:CityName&gt;</span>
                    <span class="nt">&lt;ram:CountryID&gt;</span>US<span class="nt">&lt;/ram:CountryID&gt;</span>
                <span class="nt">&lt;/ram:PostalTradeAddress&gt;</span>
            <span class="nt">&lt;/ram:BuyerTradeParty&gt;</span>
        <span class="nt">&lt;/ram:ApplicableHeaderTradeAgreement&gt;</span>
        <span class="nt">&lt;ram:ApplicableHeaderTradeDelivery&gt;</span>
            <span class="nt">&lt;ram:ActualDeliverySupplyChainEvent&gt;</span>
                <span class="nt">&lt;ram:OccurrenceDateTime&gt;</span>
                    <span class="nt">&lt;udt:DateTimeString</span> <span class="na">format=</span><span class="s">"102"</span><span class="nt">&gt;</span>20250308<span class="nt">&lt;/udt:DateTimeString&gt;</span>
                <span class="nt">&lt;/ram:OccurrenceDateTime&gt;</span>
            <span class="nt">&lt;/ram:ActualDeliverySupplyChainEvent&gt;</span>
        <span class="nt">&lt;/ram:ApplicableHeaderTradeDelivery&gt;</span>
        <span class="nt">&lt;ram:ApplicableHeaderTradeSettlement&gt;</span>
            <span class="nt">&lt;ram:InvoiceCurrencyCode&gt;</span>USD<span class="nt">&lt;/ram:InvoiceCurrencyCode&gt;</span>
            <span class="nt">&lt;ram:ApplicableTradeTax&gt;</span>
                <span class="nt">&lt;ram:CalculatedAmount&gt;</span>81.99<span class="nt">&lt;/ram:CalculatedAmount&gt;</span>
                <span class="nt">&lt;ram:TypeCode&gt;</span>VAT<span class="nt">&lt;/ram:TypeCode&gt;</span>
                <span class="nt">&lt;ram:BasisAmount&gt;</span>409.95<span class="nt">&lt;/ram:BasisAmount&gt;</span>
                <span class="nt">&lt;ram:CategoryCode&gt;</span>S<span class="nt">&lt;/ram:CategoryCode&gt;</span>
                <span class="nt">&lt;ram:RateApplicablePercent&gt;</span>20<span class="nt">&lt;/ram:RateApplicablePercent&gt;</span>
            <span class="nt">&lt;/ram:ApplicableTradeTax&gt;</span>
            <span class="nt">&lt;ram:SpecifiedTradePaymentTerms&gt;</span>
                <span class="nt">&lt;ram:DueDateDateTime&gt;</span>
                    <span class="nt">&lt;udt:DateTimeString</span> <span class="na">format=</span><span class="s">"102"</span><span class="nt">&gt;</span>20250308<span class="nt">&lt;/udt:DateTimeString&gt;</span>
                <span class="nt">&lt;/ram:DueDateDateTime&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedTradePaymentTerms&gt;</span>
            <span class="nt">&lt;ram:SpecifiedTradeSettlementHeaderMonetarySummation&gt;</span>
                <span class="nt">&lt;ram:LineTotalAmount&gt;</span>409.95<span class="nt">&lt;/ram:LineTotalAmount&gt;</span>
                <span class="nt">&lt;ram:TaxBasisTotalAmount&gt;</span>409.95<span class="nt">&lt;/ram:TaxBasisTotalAmount&gt;</span>
                <span class="nt">&lt;ram:TaxTotalAmount</span> <span class="na">currencyID=</span><span class="s">"USD"</span><span class="nt">&gt;</span>81.99<span class="nt">&lt;/ram:TaxTotalAmount&gt;</span>
                <span class="nt">&lt;ram:GrandTotalAmount&gt;</span>491.94<span class="nt">&lt;/ram:GrandTotalAmount&gt;</span>
                <span class="nt">&lt;ram:DuePayableAmount&gt;</span>491.94<span class="nt">&lt;/ram:DuePayableAmount&gt;</span>
            <span class="nt">&lt;/ram:SpecifiedTradeSettlementHeaderMonetarySummation&gt;</span>
        <span class="nt">&lt;/ram:ApplicableHeaderTradeSettlement&gt;</span>
    <span class="nt">&lt;/rsm:SupplyChainTradeTransaction&gt;</span>
<span class="nt">&lt;/rsm:CrossIndustryInvoice&gt;</span>
</code></pre></div></div> <p>You can enhance both your template and XML with additional business information such as:</p> <ul> <li><strong>Payment Information</strong>: IBAN account details, ACH routing numbers, payment terms</li> <li><strong>Contact Details</strong>: Contact persons for both buyer and seller parties</li> <li><strong>Reference Numbers</strong>: Purchase order numbers, delivery note references, contract numbers</li> <li><strong>Additional Addresses</strong>: Delivery addresses, billing addresses different from company address</li> <li><strong>Tax Details</strong>: Multiple tax rates, tax exemptions, reverse charge indicators</li> </ul> <h3 id="create-pdf-xml">Step 4: Create the PDF with Embedded XML</h3> <p>Once you have your XML file ready, you can attach it to the PDF using DocuGenerate’s <a href="https://www.docugenerate.com/help/articles/is-it-possible-to-add-attachments-to-pdfs/">PDF attachments feature</a>. The API supports two methods for providing the XML file:</p> <ol> <li><strong>Direct URL</strong>: If your XML file is hosted online, you can provide the direct URL</li> <li><strong>Base64 data URI</strong>: For local files or when you want to embed the content directly</li> </ol> <p>For the Base64 approach, the data URI format should be <code class="language-plaintext highlighter-rouge">data:text/xml;name=factur-x.xml;base64,{BASE64_ENCODED_XML}</code> and you can use various <a href="https://www.base64encode.org/" target="_blank" rel="nofollow noopener">online tools</a> or command-line utilities to convert your XML file to Base64. For the sample XML shown above, you can use the pre-encoded <a href="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/factur-x-base64.txt">Base64 XML file</a> that corresponds to our example data.</p> <p>Here’s how to use DocuGenerate’s API to generate the PDF invoice with the XML attached:</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl <span class="nt">-X</span> <span class="s1">'POST'</span> <span class="se">\</span>
  <span class="s1">'https://api.docugenerate.com/v1/document'</span> <span class="se">\</span>
  <span class="nt">-H</span> <span class="s1">'accept: application/json'</span> <span class="se">\</span>
  <span class="nt">-H</span> <span class="s1">'Authorization: 491c000c5fad32ed7787005b0723ad55'</span> <span class="se">\</span>
  <span class="nt">-H</span> <span class="s1">'Content-Type: application/json'</span> <span class="se">\</span>
  <span class="nt">-d</span> <span class="s1">'{
  "template_id": "7VYocxLnIupLU3YT4iLr",
  "data": [{
    "Company Name": "TechGear Solutions",
    "Invoice No": "INV-2025-001",
    "Street Address": "82 Bashford Avenue",
    "City": "Chicago",
    "State": "IL",
    "Zip Code": "60652",
    "Invoice Date": "March 8, 2025",
    "Items": [
      {
        "Description": "Wireless Mouse",
        "Quantity": "5",
        "Price": "$29.99",
        "Amount": "$149.95"
      },
      {
        "Description": "USB-C Cable (2m)",
        "Quantity": "10",
        "Price": "$12.50",
        "Amount": "$125.00"
      },
      {
        "Description": "Laptop Stand",
        "Quantity": "3",
        "Price": "$45.00",
        "Amount": "$135.00"
      }
    ],
    "Sub Total": "$409.95",
    "Tax Rate": "20",
    "Tax Total": "$81.99",
    "Total": "$491.94"
  }],
  "output_format": ".pdf/a-3b",
  "attach": "data:text/xml;name=factur-x.xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHJzbTpDcm9zc0luZHVzdHJ5SW52b2ljZSB4bWxuczpyc209InVybjp1bjp1bmVjZTp1bmNlZmFjdDpkYXRhOnN0YW5kYXJkOkNyb3NzSW5kdXN0cnlJbnZvaWNlOjEwMCIKICAgICAgICAgICAgICAgICAgICAgICAgICB4bWxuczphPSJ1cm46dW46dW5lY2U6dW5jZWZhY3Q6ZGF0YTpzdGFuZGFyZDpRdWFsaWZpZWREYXRhVHlwZToxMDAiCiAgICAgICAgICAgICAgICAgICAgICAgICAgeG1sbnM6cWR0PSJ1cm46dW46dW5lY2U6dW5jZWZhY3Q6ZGF0YTpzdGFuZGFyZDpRdWFsaWZpZWREYXRhVHlwZToxMCIKICAgICAgICAgICAgICAgICAgICAgICAgICB4bWxuczpyYW09InVybjp1bjp1bmVjZTp1bmNlZmFjdDpkYXRhOnN0YW5kYXJkOlJldXNhYmxlQWdncmVnYXRlQnVzaW5lc3NJbmZvcm1hdGlvbkVudGl0eToxMDAiCiAgICAgICAgICAgICAgICAgICAgICAgICAgeG1sbnM6dWR0PSJ1cm46dW46dW5lY2U6dW5jZWZhY3Q6ZGF0YTpzdGFuZGFyZDpVbnF1YWxpZmllZERhdGFUeXBlOjEwMCIKICAgICAgICAgICAgICAgICAgICAgICAgICB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIj4KICAgIDxyc206RXhjaGFuZ2VkRG9jdW1lbnRDb250ZXh0PgogICAgICAgIDxyYW06R3VpZGVsaW5lU3BlY2lmaWVkRG9jdW1lbnRDb250ZXh0UGFyYW1ldGVyPgogICAgICAgICAgICA8cmFtOklEPnVybjpjZW4uZXU6ZW4xNjkzMToyMDE3PC9yYW06SUQ+CiAgICAgICAgPC9yYW06R3VpZGVsaW5lU3BlY2lmaWVkRG9jdW1lbnRDb250ZXh0UGFyYW1ldGVyPgogICAgPC9yc206RXhjaGFuZ2VkRG9jdW1lbnRDb250ZXh0PgogICAgPHJzbTpFeGNoYW5nZWREb2N1bWVudD4KICAgICAgICA8cmFtOklEPklOVi0yMDI1LTAwMTwvcmFtOklEPgogICAgICAgIDxyYW06VHlwZUNvZGU+MzgwPC9yYW06VHlwZUNvZGU+CiAgICAgICAgPHJhbTpJc3N1ZURhdGVUaW1lPgogICAgICAgICAgICA8dWR0OkRhdGVUaW1lU3RyaW5nIGZvcm1hdD0iMTAyIj4yMDI1MDMwODwvdWR0OkRhdGVUaW1lU3RyaW5nPgogICAgICAgIDwvcmFtOklzc3VlRGF0ZVRpbWU+CiAgICA8L3JzbTpFeGNoYW5nZWREb2N1bWVudD4KICAgIDxyc206U3VwcGx5Q2hhaW5UcmFkZVRyYW5zYWN0aW9uPgogICAgICAgIDxyYW06SW5jbHVkZWRTdXBwbHlDaGFpblRyYWRlTGluZUl0ZW0+CiAgICAgICAgICAgIDxyYW06QXNzb2NpYXRlZERvY3VtZW50TGluZURvY3VtZW50PgogICAgICAgICAgICAgICAgPHJhbTpMaW5lSUQ+MTwvcmFtOkxpbmVJRD4KICAgICAgICAgICAgPC9yYW06QXNzb2NpYXRlZERvY3VtZW50TGluZURvY3VtZW50PgogICAgICAgICAgICA8cmFtOlNwZWNpZmllZFRyYWRlUHJvZHVjdD4KICAgICAgICAgICAgICAgIDxyYW06TmFtZT5XaXJlbGVzcyBNb3VzZTwvcmFtOk5hbWU+CiAgICAgICAgICAgIDwvcmFtOlNwZWNpZmllZFRyYWRlUHJvZHVjdD4KICAgICAgICAgICAgPHJhbTpTcGVjaWZpZWRMaW5lVHJhZGVBZ3JlZW1lbnQ+CiAgICAgICAgICAgICAgICA8cmFtOk5ldFByaWNlUHJvZHVjdFRyYWRlUHJpY2U+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpDaGFyZ2VBbW91bnQ+MjkuOTk8L3JhbTpDaGFyZ2VBbW91bnQ+CiAgICAgICAgICAgICAgICA8L3JhbTpOZXRQcmljZVByb2R1Y3RUcmFkZVByaWNlPgogICAgICAgICAgICA8L3JhbTpTcGVjaWZpZWRMaW5lVHJhZGVBZ3JlZW1lbnQ+CiAgICAgICAgICAgIDxyYW06U3BlY2lmaWVkTGluZVRyYWRlRGVsaXZlcnk+CiAgICAgICAgICAgICAgICA8cmFtOkJpbGxlZFF1YW50aXR5IHVuaXRDb2RlPSJDNjIiPjUuMDAwMDwvcmFtOkJpbGxlZFF1YW50aXR5PgogICAgICAgICAgICA8L3JhbTpTcGVjaWZpZWRMaW5lVHJhZGVEZWxpdmVyeT4KICAgICAgICAgICAgPHJhbTpTcGVjaWZpZWRMaW5lVHJhZGVTZXR0bGVtZW50PgogICAgICAgICAgICAgICAgPHJhbTpBcHBsaWNhYmxlVHJhZGVUYXg+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpUeXBlQ29kZT5WQVQ8L3JhbTpUeXBlQ29kZT4KICAgICAgICAgICAgICAgICAgICA8cmFtOkNhdGVnb3J5Q29kZT5TPC9yYW06Q2F0ZWdvcnlDb2RlPgogICAgICAgICAgICAgICAgICAgIDxyYW06UmF0ZUFwcGxpY2FibGVQZXJjZW50PjIwPC9yYW06UmF0ZUFwcGxpY2FibGVQZXJjZW50PgogICAgICAgICAgICAgICAgPC9yYW06QXBwbGljYWJsZVRyYWRlVGF4PgogICAgICAgICAgICAgICAgPHJhbTpTcGVjaWZpZWRUcmFkZVNldHRsZW1lbnRMaW5lTW9uZXRhcnlTdW1tYXRpb24+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpMaW5lVG90YWxBbW91bnQ+MTQ5Ljk1PC9yYW06TGluZVRvdGFsQW1vdW50PgogICAgICAgICAgICAgICAgPC9yYW06U3BlY2lmaWVkVHJhZGVTZXR0bGVtZW50TGluZU1vbmV0YXJ5U3VtbWF0aW9uPgogICAgICAgICAgICA8L3JhbTpTcGVjaWZpZWRMaW5lVHJhZGVTZXR0bGVtZW50PgogICAgICAgIDwvcmFtOkluY2x1ZGVkU3VwcGx5Q2hhaW5UcmFkZUxpbmVJdGVtPgogICAgICAgIDxyYW06SW5jbHVkZWRTdXBwbHlDaGFpblRyYWRlTGluZUl0ZW0+CiAgICAgICAgICAgIDxyYW06QXNzb2NpYXRlZERvY3VtZW50TGluZURvY3VtZW50PgogICAgICAgICAgICAgICAgPHJhbTpMaW5lSUQ+MjwvcmFtOkxpbmVJRD4KICAgICAgICAgICAgPC9yYW06QXNzb2NpYXRlZERvY3VtZW50TGluZURvY3VtZW50PgogICAgICAgICAgICA8cmFtOlNwZWNpZmllZFRyYWRlUHJvZHVjdD4KICAgICAgICAgICAgICAgIDxyYW06TmFtZT5VU0ItQyBDYWJsZSAoMm0pPC9yYW06TmFtZT4KICAgICAgICAgICAgPC9yYW06U3BlY2lmaWVkVHJhZGVQcm9kdWN0PgogICAgICAgICAgICA8cmFtOlNwZWNpZmllZExpbmVUcmFkZUFncmVlbWVudD4KICAgICAgICAgICAgICAgIDxyYW06TmV0UHJpY2VQcm9kdWN0VHJhZGVQcmljZT4KICAgICAgICAgICAgICAgICAgICA8cmFtOkNoYXJnZUFtb3VudD4xMi41MDwvcmFtOkNoYXJnZUFtb3VudD4KICAgICAgICAgICAgICAgIDwvcmFtOk5ldFByaWNlUHJvZHVjdFRyYWRlUHJpY2U+CiAgICAgICAgICAgIDwvcmFtOlNwZWNpZmllZExpbmVUcmFkZUFncmVlbWVudD4KICAgICAgICAgICAgPHJhbTpTcGVjaWZpZWRMaW5lVHJhZGVEZWxpdmVyeT4KICAgICAgICAgICAgICAgIDxyYW06QmlsbGVkUXVhbnRpdHkgdW5pdENvZGU9IkM2MiI+MTAuMDAwMDwvcmFtOkJpbGxlZFF1YW50aXR5PgogICAgICAgICAgICA8L3JhbTpTcGVjaWZpZWRMaW5lVHJhZGVEZWxpdmVyeT4KICAgICAgICAgICAgPHJhbTpTcGVjaWZpZWRMaW5lVHJhZGVTZXR0bGVtZW50PgogICAgICAgICAgICAgICAgPHJhbTpBcHBsaWNhYmxlVHJhZGVUYXg+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpUeXBlQ29kZT5WQVQ8L3JhbTpUeXBlQ29kZT4KICAgICAgICAgICAgICAgICAgICA8cmFtOkNhdGVnb3J5Q29kZT5TPC9yYW06Q2F0ZWdvcnlDb2RlPgogICAgICAgICAgICAgICAgICAgIDxyYW06UmF0ZUFwcGxpY2FibGVQZXJjZW50PjIwPC9yYW06UmF0ZUFwcGxpY2FibGVQZXJjZW50PgogICAgICAgICAgICAgICAgPC9yYW06QXBwbGljYWJsZVRyYWRlVGF4PgogICAgICAgICAgICAgICAgPHJhbTpTcGVjaWZpZWRUcmFkZVNldHRsZW1lbnRMaW5lTW9uZXRhcnlTdW1tYXRpb24+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpMaW5lVG90YWxBbW91bnQ+MTI1LjAwPC9yYW06TGluZVRvdGFsQW1vdW50PgogICAgICAgICAgICAgICAgPC9yYW06U3BlY2lmaWVkVHJhZGVTZXR0bGVtZW50TGluZU1vbmV0YXJ5U3VtbWF0aW9uPgogICAgICAgICAgICA8L3JhbTpTcGVjaWZpZWRMaW5lVHJhZGVTZXR0bGVtZW50PgogICAgICAgIDwvcmFtOkluY2x1ZGVkU3VwcGx5Q2hhaW5UcmFkZUxpbmVJdGVtPgogICAgICAgIDxyYW06SW5jbHVkZWRTdXBwbHlDaGFpblRyYWRlTGluZUl0ZW0+CiAgICAgICAgICAgIDxyYW06QXNzb2NpYXRlZERvY3VtZW50TGluZURvY3VtZW50PgogICAgICAgICAgICAgICAgPHJhbTpMaW5lSUQ+MzwvcmFtOkxpbmVJRD4KICAgICAgICAgICAgPC9yYW06QXNzb2NpYXRlZERvY3VtZW50TGluZURvY3VtZW50PgogICAgICAgICAgICA8cmFtOlNwZWNpZmllZFRyYWRlUHJvZHVjdD4KICAgICAgICAgICAgICAgIDxyYW06TmFtZT5MYXB0b3AgU3RhbmQ8L3JhbTpOYW1lPgogICAgICAgICAgICA8L3JhbTpTcGVjaWZpZWRUcmFkZVByb2R1Y3Q+CiAgICAgICAgICAgIDxyYW06U3BlY2lmaWVkTGluZVRyYWRlQWdyZWVtZW50PgogICAgICAgICAgICAgICAgPHJhbTpOZXRQcmljZVByb2R1Y3RUcmFkZVByaWNlPgogICAgICAgICAgICAgICAgICAgIDxyYW06Q2hhcmdlQW1vdW50PjQ1LjAwPC9yYW06Q2hhcmdlQW1vdW50PgogICAgICAgICAgICAgICAgPC9yYW06TmV0UHJpY2VQcm9kdWN0VHJhZGVQcmljZT4KICAgICAgICAgICAgPC9yYW06U3BlY2lmaWVkTGluZVRyYWRlQWdyZWVtZW50PgogICAgICAgICAgICA8cmFtOlNwZWNpZmllZExpbmVUcmFkZURlbGl2ZXJ5PgogICAgICAgICAgICAgICAgPHJhbTpCaWxsZWRRdWFudGl0eSB1bml0Q29kZT0iQzYyIj4zLjAwMDA8L3JhbTpCaWxsZWRRdWFudGl0eT4KICAgICAgICAgICAgPC9yYW06U3BlY2lmaWVkTGluZVRyYWRlRGVsaXZlcnk+CiAgICAgICAgICAgIDxyYW06U3BlY2lmaWVkTGluZVRyYWRlU2V0dGxlbWVudD4KICAgICAgICAgICAgICAgIDxyYW06QXBwbGljYWJsZVRyYWRlVGF4PgogICAgICAgICAgICAgICAgICAgIDxyYW06VHlwZUNvZGU+VkFUPC9yYW06VHlwZUNvZGU+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpDYXRlZ29yeUNvZGU+UzwvcmFtOkNhdGVnb3J5Q29kZT4KICAgICAgICAgICAgICAgICAgICA8cmFtOlJhdGVBcHBsaWNhYmxlUGVyY2VudD4yMDwvcmFtOlJhdGVBcHBsaWNhYmxlUGVyY2VudD4KICAgICAgICAgICAgICAgIDwvcmFtOkFwcGxpY2FibGVUcmFkZVRheD4KICAgICAgICAgICAgICAgIDxyYW06U3BlY2lmaWVkVHJhZGVTZXR0bGVtZW50TGluZU1vbmV0YXJ5U3VtbWF0aW9uPgogICAgICAgICAgICAgICAgICAgIDxyYW06TGluZVRvdGFsQW1vdW50PjEzNS4wMDwvcmFtOkxpbmVUb3RhbEFtb3VudD4KICAgICAgICAgICAgICAgIDwvcmFtOlNwZWNpZmllZFRyYWRlU2V0dGxlbWVudExpbmVNb25ldGFyeVN1bW1hdGlvbj4KICAgICAgICAgICAgPC9yYW06U3BlY2lmaWVkTGluZVRyYWRlU2V0dGxlbWVudD4KICAgICAgICA8L3JhbTpJbmNsdWRlZFN1cHBseUNoYWluVHJhZGVMaW5lSXRlbT4KICAgICAgICA8cmFtOkFwcGxpY2FibGVIZWFkZXJUcmFkZUFncmVlbWVudD4KICAgICAgICAgICAgPHJhbTpTZWxsZXJUcmFkZVBhcnR5PgogICAgICAgICAgICAgICAgPHJhbTpOYW1lPkRvY3VHZW5lcmF0ZTwvcmFtOk5hbWU+CiAgICAgICAgICAgICAgICA8cmFtOlBvc3RhbFRyYWRlQWRkcmVzcz4KICAgICAgICAgICAgICAgICAgICA8cmFtOlBvc3Rjb2RlQ29kZT45MDAxMzwvcmFtOlBvc3Rjb2RlQ29kZT4KICAgICAgICAgICAgICAgICAgICA8cmFtOkxpbmVPbmU+OTMgRWFzdCBMYXNzZW4gU3RyZWV0PC9yYW06TGluZU9uZT4KICAgICAgICAgICAgICAgICAgICA8cmFtOkNpdHlOYW1lPkxvcyBBbmdlbGVzPC9yYW06Q2l0eU5hbWU+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpDb3VudHJ5SUQ+VVM8L3JhbTpDb3VudHJ5SUQ+CiAgICAgICAgICAgICAgICA8L3JhbTpQb3N0YWxUcmFkZUFkZHJlc3M+CiAgICAgICAgICAgICAgICA8cmFtOlNwZWNpZmllZFRheFJlZ2lzdHJhdGlvbj4KICAgICAgICAgICAgICAgICAgICA8cmFtOklEIHNjaGVtZUlEPSJWQSI+VVMxMjM2NzYyMzwvcmFtOklEPgogICAgICAgICAgICAgICAgPC9yYW06U3BlY2lmaWVkVGF4UmVnaXN0cmF0aW9uPgogICAgICAgICAgICA8L3JhbTpTZWxsZXJUcmFkZVBhcnR5PgogICAgICAgICAgICA8cmFtOkJ1eWVyVHJhZGVQYXJ0eT4KICAgICAgICAgICAgICAgIDxyYW06TmFtZT5UZWNoR2VhciBTb2x1dGlvbnM8L3JhbTpOYW1lPgogICAgICAgICAgICAgICAgPHJhbTpQb3N0YWxUcmFkZUFkZHJlc3M+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpQb3N0Y29kZUNvZGU+NjA2NTI8L3JhbTpQb3N0Y29kZUNvZGU+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpMaW5lT25lPjgyIEJhc2hmb3JkIEF2ZW51ZTwvcmFtOkxpbmVPbmU+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpDaXR5TmFtZT5DaGljYWdvPC9yYW06Q2l0eU5hbWU+CiAgICAgICAgICAgICAgICAgICAgPHJhbTpDb3VudHJ5SUQ+VVM8L3JhbTpDb3VudHJ5SUQ+CiAgICAgICAgICAgICAgICA8L3JhbTpQb3N0YWxUcmFkZUFkZHJlc3M+CiAgICAgICAgICAgIDwvcmFtOkJ1eWVyVHJhZGVQYXJ0eT4KICAgICAgICA8L3JhbTpBcHBsaWNhYmxlSGVhZGVyVHJhZGVBZ3JlZW1lbnQ+CiAgICAgICAgPHJhbTpBcHBsaWNhYmxlSGVhZGVyVHJhZGVEZWxpdmVyeT4KICAgICAgICAgICAgPHJhbTpBY3R1YWxEZWxpdmVyeVN1cHBseUNoYWluRXZlbnQ+CiAgICAgICAgICAgICAgICA8cmFtOk9jY3VycmVuY2VEYXRlVGltZT4KICAgICAgICAgICAgICAgICAgICA8dWR0OkRhdGVUaW1lU3RyaW5nIGZvcm1hdD0iMTAyIj4yMDI1MDMwODwvdWR0OkRhdGVUaW1lU3RyaW5nPgogICAgICAgICAgICAgICAgPC9yYW06T2NjdXJyZW5jZURhdGVUaW1lPgogICAgICAgICAgICA8L3JhbTpBY3R1YWxEZWxpdmVyeVN1cHBseUNoYWluRXZlbnQ+CiAgICAgICAgPC9yYW06QXBwbGljYWJsZUhlYWRlclRyYWRlRGVsaXZlcnk+CiAgICAgICAgPHJhbTpBcHBsaWNhYmxlSGVhZGVyVHJhZGVTZXR0bGVtZW50PgogICAgICAgICAgICA8cmFtOkludm9pY2VDdXJyZW5jeUNvZGU+VVNEPC9yYW06SW52b2ljZUN1cnJlbmN5Q29kZT4KICAgICAgICAgICAgPHJhbTpBcHBsaWNhYmxlVHJhZGVUYXg+CiAgICAgICAgICAgICAgICA8cmFtOkNhbGN1bGF0ZWRBbW91bnQ+ODEuOTk8L3JhbTpDYWxjdWxhdGVkQW1vdW50PgogICAgICAgICAgICAgICAgPHJhbTpUeXBlQ29kZT5WQVQ8L3JhbTpUeXBlQ29kZT4KICAgICAgICAgICAgICAgIDxyYW06QmFzaXNBbW91bnQ+NDA5Ljk1PC9yYW06QmFzaXNBbW91bnQ+CiAgICAgICAgICAgICAgICA8cmFtOkNhdGVnb3J5Q29kZT5TPC9yYW06Q2F0ZWdvcnlDb2RlPgogICAgICAgICAgICAgICAgPHJhbTpSYXRlQXBwbGljYWJsZVBlcmNlbnQ+MjA8L3JhbTpSYXRlQXBwbGljYWJsZVBlcmNlbnQ+CiAgICAgICAgICAgIDwvcmFtOkFwcGxpY2FibGVUcmFkZVRheD4KICAgICAgICAgICAgPHJhbTpTcGVjaWZpZWRUcmFkZVBheW1lbnRUZXJtcz4KICAgICAgICAgICAgICAgIDxyYW06RHVlRGF0ZURhdGVUaW1lPgogICAgICAgICAgICAgICAgICAgIDx1ZHQ6RGF0ZVRpbWVTdHJpbmcgZm9ybWF0PSIxMDIiPjIwMjUwMzA4PC91ZHQ6RGF0ZVRpbWVTdHJpbmc+CiAgICAgICAgICAgICAgICA8L3JhbTpEdWVEYXRlRGF0ZVRpbWU+CiAgICAgICAgICAgIDwvcmFtOlNwZWNpZmllZFRyYWRlUGF5bWVudFRlcm1zPgogICAgICAgICAgICA8cmFtOlNwZWNpZmllZFRyYWRlU2V0dGxlbWVudEhlYWRlck1vbmV0YXJ5U3VtbWF0aW9uPgogICAgICAgICAgICAgICAgPHJhbTpMaW5lVG90YWxBbW91bnQ+NDA5Ljk1PC9yYW06TGluZVRvdGFsQW1vdW50PgogICAgICAgICAgICAgICAgPHJhbTpUYXhCYXNpc1RvdGFsQW1vdW50PjQwOS45NTwvcmFtOlRheEJhc2lzVG90YWxBbW91bnQ+CiAgICAgICAgICAgICAgICA8cmFtOlRheFRvdGFsQW1vdW50IGN1cnJlbmN5SUQ9IlVTRCI+ODEuOTk8L3JhbTpUYXhUb3RhbEFtb3VudD4KICAgICAgICAgICAgICAgIDxyYW06R3JhbmRUb3RhbEFtb3VudD40OTEuOTQ8L3JhbTpHcmFuZFRvdGFsQW1vdW50PgogICAgICAgICAgICAgICAgPHJhbTpEdWVQYXlhYmxlQW1vdW50PjQ5MS45NDwvcmFtOkR1ZVBheWFibGVBbW91bnQ+CiAgICAgICAgICAgIDwvcmFtOlNwZWNpZmllZFRyYWRlU2V0dGxlbWVudEhlYWRlck1vbmV0YXJ5U3VtbWF0aW9uPgogICAgICAgIDwvcmFtOkFwcGxpY2FibGVIZWFkZXJUcmFkZVNldHRsZW1lbnQ+CiAgICA8L3JzbTpTdXBwbHlDaGFpblRyYWRlVHJhbnNhY3Rpb24+CjwvcnNtOkNyb3NzSW5kdXN0cnlJbnZvaWNlPg=="
}'</span>
</code></pre></div></div> <p>The <code class="language-plaintext highlighter-rouge">name=factur-x.xml</code> value is an important part of the <code class="language-plaintext highlighter-rouge">attach</code> parameter as it specifies the attachment filename to match the Factur-X <a href="#standards-and-naming">naming scheme</a> required by the standard. Additionally, using the <code class="language-plaintext highlighter-rouge">.pdf/a-3b</code> output format is necessary for creating a PDF/A-3 compliant document, which is required for e-invoicing standards as it supports embedded file attachments while maintaining long-term archival capabilities.</p> <h3 id="validate-result">Step 5: Validate the Result</h3> <p>After generation, the <a href="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/Factur-X Invoice.pdf">resulting PDF</a> contains a professional invoice matching your template, along with the embedded XML file. You can verify the attachment by opening the PDF in a viewer that supports attachments, such as Adobe Acrobat Reader, where you’ll see the <code class="language-plaintext highlighter-rouge">factur-x.xml</code> file listed in the <strong>Attachments</strong> panel.</p> <p><img src="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/generated-invoice.png" alt="Generated PDF with XML attachment visible"/></p> <h2 id="best-practices">Best Practices for E-Invoice Implementation</h2> <h3 id="data-consistency">Data Consistency</h3> <p>Maintaining perfect synchronization between your PDF presentation and embedded XML data is one of the most critical aspects of e-invoice implementation. Since recipients may use either the visual PDF or the structured XML for processing, any inconsistencies can lead to payment delays, compliance issues, or outright rejection by automated systems.</p> <p>Ensure that all amounts, dates, and other critical information are identical between the PDF and the embedded XML. Pay special attention to calculations, tax amounts, and totals, as these are often the first elements validated by recipient systems. Any discrepancies can cause validation failures or processing issues.</p> <h3 id="error-handling">Error Handling</h3> <p>Robust error handling is essential for maintaining system reliability and ensuring smooth operations when processing high volumes of invoices. E-invoicing systems face unique challenges because they must coordinate between multiple components (XML generation, PDF creation, and attachment processes) while maintaining strict compliance requirements. Implement comprehensive error handling for both XML generation and PDF creation, with proper logging and recovery mechanisms. Common issues include:</p> <ul> <li>Invalid XML structure or missing required fields</li> <li>Calculation errors between PDF and XML amounts</li> <li>Incorrect file naming or attachment parameters</li> <li>Template rendering errors</li> </ul> <h3 id="testing-validation">Testing and Validation</h3> <p>Thorough testing is crucial for e-invoicing systems because compliance failures can result in legal issues, payment delays, and damaged business relationships. Unlike traditional document generation, e-invoices must pass multiple validation layers including technical XML validation, business rule checking, and regulatory compliance verification. Before deploying your e-invoicing system, establish a comprehensive testing strategy that covers both technical and business scenarios:</p> <ul> <li>Validate XML files against official XSD schemas and Schematron rules</li> <li>Test with various invoice scenarios (different currencies, tax rates, line items)</li> <li>Verify PDF/A-3b compliance using validation tools</li> <li>Test with recipient systems to ensure proper processing</li> </ul> <h2 id="future-proofing">Future-Proofing Your E-Invoice System</h2> <h3 id="standards-evolution">Standards Evolution</h3> <p>E-invoicing standards continue to evolve rapidly as governments and international organizations refine their requirements. Regular updates to code lists and validation rules occur bi-annually in many jurisdictions, while new profile requirements and optional features are introduced to support industry needs and cross-border interoperability. Digital signature and security enhancements are also being developed to address cybersecurity threats and ensure document authenticity.</p> <h3 id="regulatory-changes">Regulatory Changes</h3> <p>Governments worldwide are implementing e-invoicing mandates at different paces, with Germany’s B2B requirement starting in 2025 and France following in 2026. Changes to tax reporting requirements often accompany these mandates, requiring real-time transmission of invoice data to tax authorities. New compliance and archival obligations are being introduced, while cross-border trade facilitation measures require systems to support multiple standards simultaneously.</p> <h3 id="technology-improvements">Technology Improvements</h3> <p>Emerging technologies are reshaping the e-invoicing landscape with new automation, security, and efficiency opportunities. Blockchain-based verification systems provide immutable audit trails, while AI-powered data extraction tools improve processing accuracy and reduce manual intervention. Real-time tax calculation capabilities enable automatic compliance across multiple jurisdictions, and enhanced mobile solutions offer more flexible invoicing options. Designing systems with extensibility in mind allows easier incorporation of these advances as they mature.</p> <h2 id="conclusion">Conclusion</h2> <p>Building a robust e-invoicing system with DocuGenerate provides a practical path to compliance with European and global e-invoicing requirements. By separating <a href="#generate-xml">XML creation</a> from <a href="#create-pdf-xml">PDF generation</a>, you can ensure both technical compliance and presentation flexibility. This hybrid approach of combining structured XML data with professional PDF presentation offers the best user experience while meeting regulatory requirements.</p> <p>Whether you’re implementing e-invoicing for a small business or a large enterprise, the principles and patterns outlined in this guide provide a solid foundation for success. As e-invoicing becomes mandatory across more markets, having a scalable and compliant system in place will provide significant competitive advantages. Remember to stay current with evolving standards, validate your implementations thoroughly, and design for scalability from the beginning.</p> <h3 id="resources">Resources</h3> <ul> <li><a href="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/Factur-X Invoice.docx">Invoice Template</a> - Download the Word template used in this tutorial.</li> <li><a href="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/invoice-data.json">Sample JSON Data</a> - Download the sample invoice data used in this tutorial.</li> <li><a href="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/factur-x.xml">Sample XML File</a> - Download the XML file used in this tutorial.</li> <li><a href="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/Factur-X Invoice.pdf">Generated PDF Example</a> - Download the complete PDF with embedded XML attachment.</li> <li><a href="https://www.docugenerate.com/help/articles/is-it-possible-to-add-attachments-to-pdfs/">PDF Attachments Documentation</a> - Learn how to embed files in PDFs.</li> <li><a href="https://www.docugenerate.com/help/articles/can-i-create-factur-x-compliant-pdfs/">Factur-X PDFs Documentation</a> - Learn how to create Factur-X compliant PDFs.</li> <li><a href="https://www.mustangproject.org/zugferd/" target="_blank" rel="nofollow noopener">ZUGFeRD Specification</a> - Official ZUGFeRD documentation.</li> <li><a href="https://fnfe-mpe.org/factur-x/" target="_blank" rel="nofollow noopener">Factur-X Standard</a> - French-German hybrid format specifications.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Invoices"/> <category term="E-Invoicing"/> <category term="XML"/> <summary type="html"><![CDATA[Learn how to create compliant Factur-X hybrid PDF invoices with embedded XML files. Discover the requirements, standards, and implementation approaches for ZUGFeRD, Factur-X, and other e-invoicing formats used across Europe and globally.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/019-e-invoice-pdf-xml/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Automate Pleading Papers Creation with Make and DocuGenerate</title> <link href="https://www.docugenerate.com/blog/automate-pleading-papers-creation-with-make-and-docugenerate/" rel="alternate" type="text/html" title="Automate Pleading Papers Creation with Make and DocuGenerate"/> <published>2025-02-21T00:00:00+00:00</published> <updated>2025-02-21T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/automate-pleading-papers-creation-with-make-and-docugenerate</id> <content type="html" xml:base="https://www.docugenerate.com/blog/automate-pleading-papers-creation-with-make-and-docugenerate/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Legal professionals face a constant challenge: the time-consuming process of converting client information into properly formatted court documents. One of the most fundamental documents in civil litigation is the pleading paper, which serves as the foundation for presenting cases to the court. Creating these documents manually from client intake forms involves repetitive data entry, formatting, and a significant risk of human error.</p> <p>A pleading paper is a court document filed at the beginning of a case that outlines your client’s position, whether it’s a claim or defense. This document clearly demonstrates to the court and opposing parties what allegedly occurred, providing the factual foundation for your case. While pleading papers don’t contain all the evidence you’ll present at trial, they establish the essential framework that defines what must be proven should the matter proceed to court.</p> <p>This tutorial will show you how to create an automated workflow that transforms client intake data directly into professionally formatted pleading papers. We’ll use three powerful tools: <a href="https://www.typeform.com/" target="_blank" rel="nofollow noopener">Typeform</a> for client data collection, <a href="https://www.make.com/en?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">Make</a> for workflow automation, and <a href="https://www.docugenerate.com/">DocuGenerate</a> for document generation. The resulting system will automatically create PDF pleading papers and store them in Dropbox for easy access and client distribution.</p> <p>While real-world implementations might integrate with specialized legal case management systems, this tutorial uses accessible tools that demonstrate the core principles. The automation workflow we’ll build can easily be adapted to work with more sophisticated legal software platforms or modified to output documents to different storage systems based on your firm’s specific needs.</p> <h2 id="pleading-paper-basics">Understanding Pleading Paper Requirements</h2> <p>Before diving into automation, it’s important to understand the various types of pleading papers and when they’re used in civil litigation. Different phases of a case require different pleading documents, each serving a specific legal purpose.</p> <p>The most common pleading papers include <strong>Complaints</strong>, which present the plaintiff’s case with detailed descriptions of the defendant’s actions and requests for damages; <strong>Answers</strong>, which respond to complaints within specified timeframes and may include affirmative defenses; <strong>Counterclaims</strong>, where defendants pursue their own damages from the same incident; and various <strong>Pre-Trial Motions</strong> that address evidentiary matters or seek case dismissal.</p> <p>Each pleading paper must follow strict formatting requirements that vary by jurisdiction but generally include specific <strong>font</strong> (Times New Roman), <strong>margins</strong> (1-inch on all sides for proper spacing), <strong>line spacing</strong> (double-spaced for easy reading and annotation), and other structural elements such as <strong>line numbers</strong>. Understanding these requirements is crucial for creating templates that will be accepted by the court.</p> <h2 id="creating-template">Creating the Pleading Paper Template</h2> <p>The foundation of our automated system is a properly structured pleading paper template that includes <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> for dynamic data insertion. Creating this template requires attention to both legal formatting standards and technical implementation details.</p> <p>For this tutorial, we’ll use a standard Microsoft Word <a href="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/Pleading Paper.docx">Pleading Paper</a> that will be manually uploaded to <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">create a template</a> on DocuGenerate.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/pleading-paper-template.png" alt="Pleading Paper Template Structure"/></p> <p>The template structure includes specific merge tags that will be populated with data from our client intake form. The key tags in our template include:</p> <ul> <li><code class="language-plaintext highlighter-rouge">[ATTORNEY NAME]</code>, <code class="language-plaintext highlighter-rouge">[ATTORNEY ADDRESS]</code>, <code class="language-plaintext highlighter-rouge">[ZIP CODE]</code>, <code class="language-plaintext highlighter-rouge">[COUNTY]</code>, <code class="language-plaintext highlighter-rouge">[EMAIL]</code>, <code class="language-plaintext highlighter-rouge">[PHONE]</code>, and <code class="language-plaintext highlighter-rouge">[FAX]</code> for the attorney contact information;</li> <li><code class="language-plaintext highlighter-rouge">[COURT NAME]</code> and <code class="language-plaintext highlighter-rouge">[JURISDICTION]</code> for the court details;</li> <li><code class="language-plaintext highlighter-rouge">[PLAINTIFFS NAME]</code> and <code class="language-plaintext highlighter-rouge">[DEFENDANTS NAME]</code> for the party identification;</li> <li><code class="language-plaintext highlighter-rouge">[NUMBER]</code> for the case number;</li> <li><code class="language-plaintext highlighter-rouge">[PLEADING TITLE]</code> for the specific type of pleading;</li> <li><code class="language-plaintext highlighter-rouge">[BODY OF PLEADING]</code> for the main content;</li> <li><code class="language-plaintext highlighter-rouge">[DATE]</code> for the filing date.</li> </ul> <p>This template structure ensures that all essential legal document elements are present while maintaining the flexibility to handle various types of pleading papers. The attorney information fields will typically contain static data that remains consistent across all documents generated by your firm, while the case-specific fields will be populated dynamically from the client intake form responses.</p> <h2 id="typeform-setup">Setting Up the Client Intake Form with Typeform</h2> <p>The next step in our automation workflow is creating a client intake form that captures all the information needed to generate pleading papers. We’ll use Typeform’s AI-powered form creation feature to quickly build a professional intake form that corresponds to our template’s merge tags.</p> <h3 id="typeform-ai-builder">Using Typeform’s AI Form Builder</h3> <p>Typeform offers an <a href="https://help.typeform.com/hc/en-us/articles/14955071444244-Use-AI-to-create-forms" target="_blank" rel="nofollow noopener">AI form creation tool</a> that can generate forms based on natural language descriptions. This approach is particularly useful for legal professionals who want to focus on content rather than form design mechanics. The AI form creation process involves three steps where you can specify your requirements through descriptive prompts.</p> <p>For the first step, <strong>Describe your form</strong>, we’ll use the following prompt: <em>“I want to create a Client Intake Form for my law firm. The form will be used to create a Pleading Paper based on the input values.”</em><br/> This gives the context it needs to understand the form’s legal purpose and intended use case.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/typeform-ai-form-v2.png" alt="Typeform AI Form Creation Interface"/></p> <p>In the second step, <strong>Add important topics</strong>, we’ll specify the exact fields needed: <em>“The Pleading Paper template will have the following fields: PLEADING TITLE, COURT NAME, JURISDICTION, PLAINTIFFS NAME, DEFENDANTS NAME, NUMBER, BODY OF PLEADING, DATE. Can you make the form to have inputs/questions for each one of these fields?”</em></p> <p>Notice that we deliberately exclude attorney contact information fields from the intake form. This information typically remains static for each law firm and can be hardcoded into our automation workflow rather than collected from clients, thus reducing form complexity while maintaining data accuracy.</p> <h3 id="form-structure-testing">Client Intake Form Structure and Testing</h3> <p>Typeform’s AI successfully generates a comprehensive intake form with appropriate field types for each data point. Most fields use <strong>Short Text</strong> input types for names, numbers, and titles, while the <strong>Body of Pleading</strong> field uses a <strong>Long Text</strong> input type to accommodate multi-paragraph legal content that may span several lines.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/client-intake-form.png" alt="Generated Client Intake Form Structure"/></p> <p>The resulting form provides a user-friendly interface for clients to submit their case information. Each question is clearly labeled and corresponds directly to the merge tags in our pleading paper template. You can test the form functionality using this <a href="https://form.typeform.com/to/U7qVSqcZ" target="_blank" rel="nofollow noopener">Client Intake Form</a> link.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/client-intake-form-v2.gif" alt="Client Intake Form Completion Process"/></p> <p>The form’s design emphasizes clarity and ease of use, which is crucial when collecting information from clients who may not be familiar with legal terminology. Each field includes helpful context to ensure clients provide the information in the correct format expected by the court system.</p> <h2 id="make-scenario">Building the Make Automation Scenario</h2> <p>Now we’ll create the Make automation scenario that connects all our components together. This workflow will automatically detect new Typeform submissions, generate pleading papers using DocuGenerate, and store the resulting documents in Dropbox. The complete scenario involves four main components working in sequence to create a fully automated document generation pipeline.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/make-scenario.png" alt="Complete Make Automation Scenario"/></p> <h3 id="typeform-trigger">Setting Up the Typeform Trigger</h3> <p>The automation begins with the <strong>Watch Responses</strong> trigger from the <a href="https://www.make.com/en/integrations/typeform?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">Typeform integration</a>. This trigger monitors your <a href="#form-structure-testing">Client Intake Form</a> for new submissions and initiates the workflow whenever a client completes the form. Setting up this trigger is straightforward and requires connecting your Typeform account to Make.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/typeform-trigger-add.png" alt="Adding Typeform Trigger to Make Scenario"/></p> <p>After establishing the Typeform connection, configure the <strong>Watch Responses</strong> trigger by selecting your <strong>Client Intake Form</strong> from the <strong>Form ID</strong> dropdown. The other parameters can remain at their default values, which will monitor for new responses in real-time. Click <strong>Save</strong> to complete the trigger configuration.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/typeform-trigger-configure.png" alt="Configuring Typeform Watch Responses Trigger"/></p> <h3 id="docugenerate-setup">Configuring the Document Generation Action</h3> <p>The next component in our workflow is the <strong>Generate Document</strong> action from the <a href="https://www.make.com/en/integrations/docugenerate?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank">DocuGenerate module</a>. This step transforms the collected form data into a professionally formatted pleading paper. Before configuring this action, you’ll need to establish a connection to your DocuGenerate account by providing your <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a>, which can be found in your DocuGenerate settings page.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/docugenerate-create-connection.png" alt="Creating DocuGenerate Connection in Make"/></p> <p>The DocuGenerate action configuration requires several key parameters that control document generation. First, select your <strong>Pleading Paper</strong> template from the <strong>Template</strong> dropdown. For the document <strong>Name</strong>, create a dynamic filename by combining the case number and pleading title from the form response. Set the <strong>Format</strong> to <strong>PDF (.pdf)</strong> since this is the standard format accepted by court systems.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/docugenerate-action-config.png" alt="DocuGenerate Action Configuration"/></p> <p>The <strong>Data</strong> parameter requires careful configuration as it maps form responses to <a href="#creating-template">template merge tags</a>. This JSON structure combines dynamic values from the Typeform submission with static attorney information that remains consistent across all documents.</p> <h3 id="multi-line-data">Handling Multi-Line Data Values</h3> <p>When testing our scenario with sample data from the Typeform questionnaire, you may encounter a specific error related to multi-line content in the <strong>Body of Pleading</strong> field. This is a common challenge when working with legal documents that contain paragraph breaks and line formatting. The error typically appears as:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[400] data must be a valid JSON object or array. Bad control character in string literal in JSON 
at position 591 while parsing near "...JUDGE OF SAID COURT:nnCOMES NOW, MICHAEL..."
</code></pre></div></div> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/multi-line-data-error.gif" alt="Multi-Line Data Error in Make"/></p> <p>This error occurs because the <strong>Body of Pleading</strong> field can contain multiple lines and paragraph breaks that interfere with JSON parsing. When clients enter detailed pleading content with line breaks, these characters can break the JSON structure that Make uses to pass data between modules.</p> <p>The solution involves preprocessing the multi-line text data before passing it to DocuGenerate. We need to escape newline characters to ensure they’re properly handled within the JSON structure. Make provides text manipulation functions specifically for this purpose.</p> <p>To implement this fix, we’ll add a text processing step that uses the <code class="language-plaintext highlighter-rouge">replace</code> function from Make’s <strong>Text and binary functions</strong> category. This function will replace actual <code class="language-plaintext highlighter-rouge">newline</code> characters with escaped newline sequences <code class="language-plaintext highlighter-rouge">\n</code> that are safe for JSON transmission while preserving the original formatting in the final document.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/replace-newlines-function.png" alt="Using Replace Function to Handle Newlines"/></p> <p>After implementing this preprocessing step, the <strong>Generate Document</strong> module executes successfully without JSON parsing errors. The resulting <a href="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/DC-24-08756 - COMPLAINT FOR PERSONAL INJURY.pdf" target="_blank">Pleading Paper</a> preserves the original line breaks and formatting from the client’s input.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/generate-document-success.png" alt="Successful Document Generation"/></p> <h3 id="http-retrieval">Retrieving the Generated Document</h3> <p>The final components of our automation workflow involve retrieving the <a href="#docugenerate-setup">generated PDF</a> document and storing it in Dropbox for easy access and client distribution. First, we need to fetch the generated PDF file using the <strong>Get a file</strong> action from Make’s native <a href="https://www.make.com/en/integrations/http?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">HTTP module</a>.</p> <p>In the <strong>URL</strong> field, specify the <code class="language-plaintext highlighter-rouge">Document URL</code> value that was returned from the previous DocuGenerate step. This dynamic URL points to the newly generated pleading paper PDF. The HTTP module will download the file content and make it available for the next step in our workflow.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/http-getfile-config-v3.png" alt="HTTP Get File Configuration"/></p> <h3 id="dropbox-upload">Saving the PDF File to Dropbox</h3> <p>The final step involves uploading the retrieved PDF to Dropbox using the <strong>Upload a File</strong> action from the <a href="https://www.make.com/en/integrations/dropbox?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">Dropbox integration</a>. Dropbox is widely used in legal practices for secure document storage and client file sharing, making it an ideal choice for storing generated pleading papers.</p> <p>Before configuring the upload action, ensure you have established a Dropbox connection in Make. This requires authenticating with your Dropbox account and granting Make permission to access your files. Once connected, configure the upload parameters to organize your generated documents effectively.</p> <p>For the <strong>Folder</strong> parameter, specify a dedicated directory such as <code class="language-plaintext highlighter-rouge">/Pleading Papers/</code> to keep generated documents organized and easily accessible. The <strong>File</strong> parameter should reference the file data from the <a href="#http-retrieval">previous step</a>, specifically the <strong>HTTP - Get a file</strong> output. This ensures that the complete PDF content is uploaded to your Dropbox storage.</p> <p><img src="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/dropbox-config.png" alt="Dropbox Upload Configuration"/></p> <p>With this configuration, your automation workflow is complete. Each time a client submits the intake form, the system will automatically generate a properly formatted pleading paper and store it in your designated Dropbox folder, ready for review, editing, and filing with the appropriate court.</p> <h2 id="benefits-applications">Benefits and Real-World Applications</h2> <p>This automated pleading paper generation system delivers significant advantages for legal practices of all sizes. The primary benefit is the dramatic reduction in document preparation time. What previously required manual data entry, formatting, and proofreading can now be accomplished automatically within minutes of receiving client information.</p> <p>The automation also improves accuracy by eliminating manual transcription errors. Client information flows directly from the intake form to the final document without human intervention, reducing the risk of typos or data entry mistakes that could potentially impact legal proceedings. This consistency is particularly valuable when handling multiple cases simultaneously.</p> <p>The workflow can be easily adapted for different types of legal documents beyond pleading papers. The same automation principles apply to generating answers, counterclaims, motions, and other court documents. For larger firms, this system can integrate with existing case management software. Rather than using Typeform for intake, the workflow can be triggered by new entries in legal practice management systems, creating a more comprehensive automation solution.</p> <p>The cost benefits are substantial as well. Reduced time spent on document preparation allows attorneys to focus on higher-value legal work, potentially increasing billable hour efficiency. For firms that handle high volumes of similar cases, the time savings can translate directly to improved profitability.</p> <h2 id="conclusion">Conclusion</h2> <p>By combining Typeform’s intuitive form building, Make’s powerful <a href="https://www.docugenerate.com/integrations/#make">automation capabilities</a>, and DocuGenerate’s professional document generation, legal practices can create robust systems that handle routine document preparation automatically. This approach not only saves time and reduces errors but also allows legal professionals to focus on the strategic and analytical aspects of their work that truly require human expertise.</p> <p>The system we’ve built today can serve as a foundation for more comprehensive automation initiatives. As your practice grows and your automation needs evolve, the same principles can be applied to other document types, integrated with more sophisticated legal software, or enhanced with additional workflow steps like email notifications, calendar scheduling, or client portal updates.</p> <p>Legal professionals who implement these types of automation systems often find that the initial time investment pays dividends quickly through improved efficiency, reduced administrative overhead, and enhanced client satisfaction. In an increasingly competitive legal market, these operational improvements can provide significant advantages while maintaining the high standards of accuracy and professionalism that legal practice demands.</p> <h2 id="resources">Resources</h2> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/Pleading Paper.docx" target="_blank">Pleading Paper</a> template used in this tutorial.</li> <li>An example of <a href="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/DC-24-08756 - COMPLAINT FOR PERSONAL INJURY.pdf" target="_blank">Generated PDF</a> with the Client Intake Form data.</li> <li>The interactive <a href="https://form.typeform.com/to/U7qVSqcZ" target="_blank" rel="nofollow noopener">Client Intake Form</a> created on Typeform.</li> <li>The official Make <a href="https://www.make.com/en/integrations/typeform?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">Typeform Integration</a> page.</li> <li>The official Make <a href="https://www.make.com/en/integrations/docugenerate?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank">DocuGenerate Integration</a> page.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="LegalTech"/> <category term="Make"/> <category term="No-Code"/> <summary type="html"><![CDATA[Transform your legal practice with automated pleading paper generation. Learn how to build an efficient workflow using Make, Typeform, and DocuGenerate that converts client intake data into properly formatted pleading papers that follow professional standards.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/018-make-pleading-papers/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Recognized as Winter 2025 Top Performer by SourceForge</title> <link href="https://www.docugenerate.com/blog/recognized-as-winter-2025-top-performer-by-sourceforge/" rel="alternate" type="text/html" title="Recognized as Winter 2025 Top Performer by SourceForge"/> <published>2025-01-24T00:00:00+00:00</published> <updated>2025-01-24T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/recognized-as-winter-2025-top-performer-by-sourceforge</id> <content type="html" xml:base="https://www.docugenerate.com/blog/recognized-as-winter-2025-top-performer-by-sourceforge/"><![CDATA[<h2 id="top-performer">Top Performer in PDF Generators</h2> <p>DocuGenerate is proud to be named a <strong>Winter 2025 Top Performer</strong> in the <strong>PDF Generators</strong> category by SourceForge, the world’s largest software review and comparison website. This award recognizes exceptional companies and products with a high volume of recent excellent user reviews that puts them in the top tenth percentile of highly reviewed products on SourceForge.</p> <p>To win the Winter 2025 Top Performer award, each award recipient had to receive enough high-rated user reviews to place the winning product in the <strong>top 10%</strong> of <strong>favorably reviewed products</strong> out of the 100,000 products on SourceForge, which demonstrates the utmost quality that DocuGenerate delivers to customers.</p> <h2 id="why-choose-docugenerate">Why Choose DocuGenerate for PDF Generation?</h2> <p>DocuGenerate is a powerful document generation tool designed to help businesses and professionals create <strong>high-quality PDFs</strong> with ease. Whether you need to generate contracts, invoices, agreements, or reports, DocuGenerate allows you to automate the process using Word templates and dynamic data. With a focus on <strong>reliability and scalability</strong>, DocuGenerate is ideal for teams looking to streamline their document workflows without manual editing.</p> <p>DocuGenerate is built for automation, enabling users to process large volumes of documents efficiently. It also offers seamless integrations with no-code platforms like <a href="/integrations/make/">Make</a>, <a href="/integrations/zapier/">Zapier</a>, and <a href="/integrations/bubble/">Bubble</a>, as well as backend services like <a href="/integrations/xano/">Xano</a>. Additionally, our product supports advanced formatting options, batch generation, and PDF/A export for long-term document preservation.</p> <p>Whether you’re a startup, a legal firm, or an enterprise managing thousands of documents per month, DocuGenerate provides a flexible and <strong>cost-effective solution</strong> to meet your document generation needs.</p> <h2 id="user-reviews">What Our Users Are Saying</h2> <p>DocuGenerate has earned an overall <strong>5-star</strong> rating from users on SourceForge:</p> <p><img src="https://www.docugenerate.com/assets/posts/017-sourceforge-top-performer/docugenerate-review.png" alt="5-Star Rating on SourceForge"/></p> <div class="ud-blog-quote"> <i class="lni lni-quotation"></i> <p> The software is straightforward and does its job perfectly. Its fast and easy - no learning curve. Support was also fantastic when I had any questions. </p> <h6> Source: <a href="https://sourceforge.net/software/product/DocuGenerate/#review-6789eab3a8cb1d9217711d42" target="_blank"> SourceForge </a> </h6> </div> <div class="ud-blog-quote"> <i class="lni lni-quotation"></i> <p> Some of the best customer service and technical support I've EVER experienced... It's great to have that 'warm fuzzy feeling' that a partner whose infrastructure you're relying on to deliver to your own customers, cares about the service they deliver. </p> <h6> Source: <a href="https://sourceforge.net/software/product/DocuGenerate/#review-677ead59bf467c8617412b27" target="_blank"> SourceForge </a> </h6> </div> <div class="ud-blog-quote"> <i class="lni lni-quotation"></i> <p> The interface is intuitive and user-friendly, making it easy to learn and navigate even for beginners. DocuGenerate has become a core part of our day to day work and i can't imagine what i would do without it. </p> <h6> Source: <a href="https://sourceforge.net/software/product/DocuGenerate/#review-671fcf6f8c9144fa306b2bb1" target="_blank"> SourceForge </a> </h6> </div> <p>If DocuGenerate has helped streamline your document workflows, we’d love to hear your feedback! Share your experience on SourceForge <a href="https://sourceforge.net/software/product/DocuGenerate/reviews/new" target="_blank" rel="nofollow noopener">here</a>.</p> <h2 id="about-sourceforge">About SourceForge</h2> <p><a href="https://sourceforge.net/" target="_blank" rel="nofollow noopener">SourceForge.net</a> is the world’s largest software comparison directory, serving nearly 20 million users every month and featuring user reviews, product comparisons, software guides, and more. SourceForge’s mission is to help businesses find the best software to fit their needs and their budget. There are a variety of software tools available to businesses, and there are tools in almost every category and niche, each serving a slightly different purpose.</p>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="PDF Generators"/> <category term="Award"/> <category term="SourceForge"/> <summary type="html"><![CDATA[DocuGenerate is proud to be a winner of Top Performer award in the PDF Generators category from SourceForge, the world’s largest software review and comparison website. We’re honored to be valued by our customers and to be recognized by this award.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/017-sourceforge-top-performer/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/017-sourceforge-top-performer/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Building a Simplified Version of DocuGenerate with Bubble</title> <link href="https://www.docugenerate.com/blog/building-a-simplified-version-of-docugenerate-with-bubble/" rel="alternate" type="text/html" title="Building a Simplified Version of DocuGenerate with Bubble"/> <published>2024-12-18T00:00:00+00:00</published> <updated>2024-12-18T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/building-a-simplified-version-of-docugenerate-with-bubble</id> <content type="html" xml:base="https://www.docugenerate.com/blog/building-a-simplified-version-of-docugenerate-with-bubble/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Automating document generation can significantly boost your productivity, especially when managing multiple templates and datasets. While DocuGenerate’s <a href="https://app.docugenerate.com/" target="_blank">web app</a> provides a comprehensive solution, you might want to integrate document generation capabilities into your own Bubble application.</p> <p>That’s why we’ve created a <a href="https://www.docugenerate.com/integrations/bubble/">Bubble plugin</a> that lets you harness the power of DocuGenerate’s API directly within your Bubble apps. In this tutorial, we’ll walk through how we built a simplified version of DocuGenerate using Bubble and our plugin - no coding required!</p> <h2 id="how-the-app-works">How the App Works</h2> <p>To get a better sense of what we’ll be building, you can check out the Bubble <a href="https://docugenerate-demo-app.bubbleapps.io/version-test/" target="_blank">demo app</a>. The animation below demonstrates a complete user journey through the application, from template creation to document generation and download.</p> <p><img src="https://www.docugenerate.com/assets/images/integrations/bubble/bubble-test-app-v2.gif" alt="Demo app showcasing DocuGenerate's plugin on Bubble"/></p> <p>The typical user journey follows these steps:</p> <ol> <li><strong>Template Creation</strong>: Upload a Word template with merge tags and give it a name.</li> <li><strong>Browsing Templates</strong>: From the dashboard, browse all available templates.</li> <li><strong>Template Selection</strong>: Click on a template to view its details and previously generated documents.</li> <li><strong>Document Generation</strong>: Using the “+” button, navigate to the document generation form.</li> <li><strong>Data Entry</strong>: Provide a document name, select an output format, and enter the JSON data.</li> <li><strong>Generation</strong>: After clicking “Generate,” the document is created using the DocuGenerate API.</li> <li><strong>Document Access</strong>: Return to the template detail page and view the new document.</li> </ol> <p>This workflow mirrors the core functionality of DocuGenerate’s web app but is implemented entirely within Bubble. The seamless integration between Bubble’s visual development platform and DocuGenerate’s API creates a powerful yet accessible document generation solution.</p> <h2 id="setting-up">Setting Up Your Bubble Project</h2> <p>Before we start building our app, you’ll need to prepare your development environment. Bubble’s visual platform makes this process straightforward, but there are a few essential steps to complete:</p> <ol> <li>Sign up for a <a href="https://bubble.io/" target="_blank" rel="nofollow noopener">Bubble account</a> if you don’t already have one.</li> <li><a href="https://manual.bubble.io/help-guides/getting-started/creating-and-managing-apps" target="_blank" rel="nofollow noopener">Create an app</a> in Bubble and give it a name.</li> <li>Install the <a href="https://bubble.io/plugin/docugenerate-1730225425528x319288222630019100" target="_blank">DocuGenerate plugin</a> in your new app.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#install-the-plugin">Configure</a> the plugin with your DocuGenerate <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">API Key</a>.</li> </ol> <p><img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/install-new-plugin.png" alt="Install the DocuGenerate API Key in Bubble"/></p> <h2 id="docugenerate-plugin">What’s Included in the DocuGenerate Plugin?</h2> <p>The DocuGenerate Bubble plugin provides a comprehensive set of API calls that mirror our REST API functionality. These are categorized into two types:</p> <h3 id="data-calls">Data Calls</h3> <p>These are used to retrieve information from your DocuGenerate account:</p> <ul> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#list-templates">List Templates</a>: Returns all templates available in your account.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#get-template">Get Template</a>: Retrieves detailed information about a specific template.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#list-documents">List Documents</a>: Returns all documents generated from a specific template.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#get-document">Get Document</a>: Retrieves detailed information about a specific document.</li> </ul> <h3 id="actions">Actions</h3> <p>These are used to create, modify, or delete resources in your DocuGenerate account:</p> <ul> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#create-template">Create Template</a>: Uploads a new template file.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#update-template">Update Template</a>: Modifies an existing template.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#delete-template">Delete Template</a>: Removes a template from your account.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#generate-document">Generate Document</a>: Creates a new document from a template and data.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#update-document">Update Document</a>: Modifies document properties.</li> <li><a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#delete-document">Delete Document</a>: Removes a document from your account.</li> </ul> <p>Understanding these API calls is essential as they form the backbone of our demo application. Throughout this tutorial, we’ll be using most of these calls to create a fully functional document generation workflow.</p> <h2 id="page-navigation">Designing the App Navigation</h2> <p>Before diving into each page, let’s set up the navigation structure that will connect all parts of our application. A consistent navigation system is crucial for providing a smooth user experience across the app. We created a simple navigation bar that appears at the top of every page, which includes:</p> <ul> <li>The DocuGenerate logo on the left side, which serves as a home button pointing to the <a href="#dashboard-page">dashboard</a>.</li> <li>A <strong>New Template</strong> button on the right side that takes users directly to the <a href="#new-template-page">template creation</a> page.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/navigation-bar.png" alt="Navigation bar showing logo and New Template button"/></p> <p>This navigation structure mirrors the approach used in the actual DocuGenerate web app, providing a familiar experience for users who have used our main platform. The familiar layout helps users intuitively understand how to navigate the application without requiring additional instructions.</p> <h2 id="dashboard-page">The Dashboard Page</h2> <p>The dashboard page serves as the central hub of our application, providing users with an immediate overview of all their available templates. This is the first screen users see when they open the app, so it’s designed to be both informative and intuitive, allowing for quick access to the most important functionality.</p> <p><img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/index-page.png" alt="Dashboard page showing templates in a grid view"/></p> <p>Much like DocuGenerate’s web interface, we’ve organized templates in a visually appealing grid layout that showcases template previews alongside their names. This visual approach makes it easy for users to quickly identify the template they’re looking for, even when managing dozens of different templates.</p> <h3 id="how-to-build-it">How to Build It:</h3> <ol> <li><strong>Create a RepeatingGroup element</strong> to display the templates.</li> <li><strong>Set the Data Source</strong> to the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#list-templates">List Templates</a> data call from the DocuGenerate plugin. <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/dashboard-repeating-group.png" alt="RepeatingGroup element for displaying the templates"/></li> <li><strong>Design each grid item</strong> to include: <ul> <li>A text element for the template name</li> <li>An image element for the template preview <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/dashboard-template-image.png" alt="Image element for the template preview"/></li> </ul> </li> <li><strong>Add a workflow</strong> to the image element so that when clicked, it navigates to the template detail page and passes the template ID as a URL parameter. <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/workflow-template-image.png" alt="Workflow click template image"/></li> </ol> <p>The key component here is the RepeatingGroup, which automatically populates with all templates from your DocuGenerate account. This dynamic approach ensures that the dashboard always shows the most up-to-date list of templates without requiring any manual updates.</p> <p>Each template in the grid is clickable and navigates to a <a href="#template-detail-page">detailed view</a> of that specific template. This interaction pattern creates a natural flow through the application, guiding users from the overview to more detailed information with a single click.</p> <p>The dashboard also integrates seamlessly with our navigation bar, which includes the “New Template” button for quick access to <a href="#new-template-page">template creation</a>. This ensures that users can easily start the document generation process from this central location.</p> <h2 id="new-template-page">The Template Creation Page</h2> <p>This page is where users begin the document generation process by uploading a Word document that will serve as a template. This critical step lays the foundation for all subsequent document generation, as the uploaded template contains the structure, formatting, and merge tags that will be used when generating documents.</p> <p>We’ve designed this page to be straightforward and focused, eliminating unnecessary distractions and guiding users through the template creation process. The interface clearly communicates what’s required (a Word document and a name) and provides immediate feedback when the template is successfully created.</p> <p><img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/new-template-page.png" alt="New template page with file uploader and form"/></p> <h3 id="how-to-build-it-1">How to Build It:</h3> <ol> <li><strong>Add a FileUploader element</strong> to let users select their Word document. <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/new-template-file-uploader.png" alt="FileUploader element to let users select their Word document"/></li> <li><strong>Add an input field</strong> for entering the template name.</li> <li><strong>Add a “Create Template” button</strong> with the following workflow: <ul> <li>When clicked, call the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#create-template">Create Template</a> action from the DocuGenerate plugin</li> <li>Pass the file from the FileUploader as the <code class="language-plaintext highlighter-rouge">file</code> parameter using the dynamic link option</li> <li>Pass the name from the input field as the <code class="language-plaintext highlighter-rouge">name</code> parameter <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/new-template-workflow-create-template.png" alt="Workflow step create template"/></li> <li>After the template is created, navigate to the template detail page with the new template ID <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/new-template-workflow-template-detail.png" alt="Workflow step go to template detail"/></li> </ul> </li> </ol> <p>This streamlined form handles everything needed to create a template in DocuGenerate. The FileUploader component provides a native way for users to select files from their device, complete with drag-and-drop support and clear visual feedback. This makes the process intuitive even for non-technical users who may be unfamiliar with document automation.</p> <p>After the template is created, the automatic navigation to the <a href="#template-detail-page">template detail</a> page creates a seamless transition to the next step in the workflow. This thoughtful user journey eliminates the need for users to manually navigate between pages, reducing friction and improving the overall experience.</p> <h2 id="template-detail-page">The Template Detail Page</h2> <p>The Template Detail page serves as the central hub for managing a specific template and all documents generated from it. This page brings together essential template information with document management capabilities, providing a comprehensive view of each template’s usage and output.</p> <p>Unlike the simpler pages we’ve created so far, the Template Detail page integrates multiple data sources and interactive elements to create a more complex and functional interface. We’ve carefully organized these elements to maintain clarity despite the increased complexity, ensuring that users can easily find and use the features they need.</p> <p><img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/template-detail-page.png" alt="Template detail page showing preview and documents list"/></p> <h3 id="how-to-build-it-2">How to Build It:</h3> <ol> <li><strong>Create a Group element</strong> as the container for the page content.</li> <li><strong>Set the Group’s Data Source</strong> to the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#get-template">Get Template</a> data call from the DocuGenerate plugin, with the <code class="language-plaintext highlighter-rouge">id</code> parameter set to the template_id from the URL. <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/template-detail-group-content.png" alt="RepeatingGroup element for displaying the page content"/></li> <li><strong>Add a text element</strong> to display the template name.</li> <li><strong>Add an image element</strong> to display the template preview. <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/template-detail-template-image.png" alt="Image element for displaying the template preview"/></li> <li><strong>Add a RepeatingGroup</strong> for the documents list with: <ul> <li>Data source set to the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#list-documents">List Documents</a> call with the <code class="language-plaintext highlighter-rouge">template_id</code> parameter</li> <li>Each item displaying the document name as a link to the <code class="language-plaintext highlighter-rouge">document_uri</code> for downloading <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/template-detail-document-repeating-group.png" alt="RepeatingGroup for displaying the documents list"/></li> </ul> </li> <li><strong>Add a “+” button</strong> that navigates to the new document page. <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/template-detail-workflow-new-document.png" alt="Workflow for navigating to the new document page"/></li> </ol> <p>The most powerful aspect of this page is how it uses the Group element’s data source to make all template data available to child elements. This pattern, sometimes called “data inheritance” in Bubble, ensures that all elements on the page automatically update when a different template is selected. This approach simplifies the page’s logic and improves performance by reducing redundant API calls.</p> <p>The documents list provides a chronological view of all documents generated from this template, with the most recent documents appearing at the top. Each document entry includes a direct download link, allowing users to quickly access their generated files without navigating to additional pages.</p> <p>The prominent “+” button serves as a clear call-to-action, guiding users toward the document generation process. When clicked, this button navigates to the <a href="#new-document-page">document generation</a> page, passing along the template ID to maintain context. This thoughtful interaction design ensures that users can easily move between viewing template details and generating new documents.</p> <h2 id="new-document-page">The Document Generation Page</h2> <p>This is where the true power of document generation comes to life, allowing users to connect their data with templates to produce customized documents. We’ve designed this page to be powerful yet approachable, balancing advanced functionality with a clear interface.</p> <p>This page maintains visual consistency with the <a href="#template-detail-page">template detail</a> page, showing the same template information at the top to provide context. This helps users confirm they’re working with the correct template before proceeding with document generation, preventing potential errors or confusion.</p> <p><img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/new-document-page.png" alt="New document page with JSON data input form"/></p> <h3 id="how-to-build-it-3">How to Build It:</h3> <ol> <li><strong>Display the template information</strong> (name and preview) similar to the template detail page.</li> <li><strong>Create a form with:</strong> <ul> <li>A text input for the document name</li> <li>A dropdown for selecting the output format (PDF, DOCX, DOC, ODT, TXT, HTML, PNG)</li> <li>A MultiLine Input for entering the JSON data <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/new-document-form.png" alt="Form for generating documents"/></li> </ul> </li> <li><strong>Add a “Generate” button</strong> that: <ul> <li>Calls the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/#generate-document">Generate Document</a> action from the DocuGenerate plugin</li> <li>Passes all form values as parameters, along with the <code class="language-plaintext highlighter-rouge">template_id</code> from the URL <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/new-document-workflow-generate-document.png" alt="Workflow step to generate a document"/></li> <li>After generation, navigates back to the template detail page <img src="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/new-document-workflow-template-detail.png" alt="Workflow step go to template detail"/></li> </ul> </li> </ol> <p>The MultiLine Input field is particularly important as it provides a flexible way for users to enter their JSON data. This approach supports both simple data structures for basic documents and complex nested objects or arrays for more sophisticated generation scenarios. For advanced users, this direct JSON editing capability offers precise control over the data being merged into their templates.</p> <p>The output format dropdown demonstrates one of DocuGenerate’s key advantages: the ability to generate documents in multiple formats from a single template. Users can choose the format that best suits their needs, whether it’s a PDF for formal distribution, a DOCX for further editing, or another format for specific use cases.</p> <p>After the document is generated, the page automatically navigates back to the <a href="#template-detail-page">template detail</a> page, where the newly created document appears at the top of the list. This immediate feedback confirms that the generation was successful and provides quick access to the generated document.</p> <h2 id="enhancement-opportunities">Enhancement Opportunities</h2> <p>While our demo app provides the essential functionality for document generation, there are many ways it could be enhanced to create an even more powerful and user-friendly application:</p> <ul> <li><strong>PDF Preview</strong>: Replace static images with embedded <a href="https://www.docugenerate.com/help/articles/how-do-i-view-a-generated-document/">PDF previews</a> of templates and documents.</li> <li><strong>Alternative Views</strong>: Add options to view templates <a href="https://www.docugenerate.com/help/articles/how-do-i-toggle-view-options/#list-view">as a list</a> instead of a grid.</li> <li><strong>Template Editing</strong>: Allow users to <a href="https://www.docugenerate.com/help/articles/how-do-i-update-a-template/">update templates</a> with new files or change settings.</li> <li><strong>Template Navigation</strong>: Add a dropdown or a <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">search bar</a> to easily navigate between templates.</li> <li><strong>Spreadsheet Support</strong>: Add the ability to upload <a href="https://www.docugenerate.com/help/articles/generate-documents-from-an-excel-or-csv-file/">Excel or CSV</a> files for document generation.</li> </ul> <p>These enhancements would transform our demo app from a proof of concept into a fully-featured document generation solution, tailored to specific business needs. The beauty of using Bubble’s visual development platform is that these features can be added incrementally, allowing the application to evolve alongside user requirements.</p> <h2 id="conclusion">Conclusion</h2> <p>Building a document generation app with Bubble and the DocuGenerate plugin demonstrates the power of <a href="https://www.docugenerate.com/integrations/">no-code development</a> combined with specialized APIs. The demo app we’ve built serves as both a proof of concept and a starting point for your own document automation projects. By leveraging Bubble’s visual development platform and DocuGenerate’s document generation capabilities, you can create custom solutions tailored to your specific needs without writing a single line of code.</p> <p>This approach is particularly valuable for businesses without dedicated development teams or those looking to quickly prototype and iterate on document generation workflows. The visual nature of Bubble makes it accessible to business analysts, operations specialists, and other non-technical team members, empowering them to create solutions that directly address their document automation challenges.</p> <p>Whether you’re building internal tools for your team or customer-facing applications, this approach offers a fast and flexible way to implement document generation functionality. The combination of Bubble’s intuitive interface and DocuGenerate’s powerful API creates a synergy that brings sophisticated document automation within reach of organizations of all sizes.</p> <h3 id="resources">Resources</h3> <ul> <li>Live version of the <a href="https://docugenerate-demo-app.bubbleapps.io/version-test/" target="_blank">Bubble Demo App</a> that we built in this tutorial.</li> <li>Install link for the <a href="https://bubble.io/plugin/docugenerate-1730225425528x319288222630019100" target="_blank">DocuGenerate Plugin</a> in the Bubble marketplace.</li> <li>Step-by-step instructions from our Help Center for <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-bubble/">configuring the plugin</a>.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Web App"/> <category term="Bubble"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to build a simplified document generation app using Bubble and the DocuGenerate plugin. This step-by-step tutorial shows you how to create a working demo that lets you upload templates, generate documents, and manage your document library.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/016-bubble-demo-app/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Save Generated Files to Dropbox using Zapier</title> <link href="https://www.docugenerate.com/blog/save-generated-files-to-dropbox-using-zapier/" rel="alternate" type="text/html" title="Save Generated Files to Dropbox using Zapier"/> <published>2024-11-11T00:00:00+00:00</published> <updated>2024-11-11T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/save-generated-files-to-dropbox-using-zapier</id> <content type="html" xml:base="https://www.docugenerate.com/blog/save-generated-files-to-dropbox-using-zapier/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>In today’s digital workplace, automating document workflows saves valuable time and ensures consistency across your organization. Whether you’re generating employment certificates, contracts, invoices, or other business documents, having them automatically saved to cloud storage eliminates manual file management and creates a reliable backup system.</p> <p>This tutorial demonstrates how to build a powerful automation that generates employment certificates using DocuGenerate and automatically saves them to Dropbox through Zapier. By connecting these three tools, you’ll create a seamless workflow that transforms data into professional documents and stores them in organized cloud folders.</p> <p><a href="https://zapier.com/" target="_blank" rel="nofollow noopener">Zapier</a> serves as the automation bridge, connecting different apps without requiring any coding knowledge. <a href="https://www.docugenerate.com/">DocuGenerate</a> handles the document generation from your templates and data, while <a href="https://www.dropbox.com/" target="_blank" rel="nofollow noopener">Dropbox</a> provides secure cloud storage with easy sharing capabilities.</p> <h2 id="zapier-table">Setting Up Your Data Source with Zapier Tables</h2> <p>For this tutorial, we’ll use the <strong>Certificate of Employment</strong> template from DocuGenerate’s <a href="https://www.docugenerate.com/templates/">Template Library</a>. This template includes both a Word document template and sample data that we’ll import into Zapier Tables for easy automation.</p> <p>We’ll start by creating a data table in Zapier that contains employee information needed for generating certificates. Zapier Tables provides a convenient way to store and manage structured data that can trigger automations when records are added or updated.</p> <p>First, navigate to <a href="https://tables.zapier.com/" target="_blank" rel="nofollow noopener">Zapier Tables</a> and create a new table. We’ll import our sample data from a <a href="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/Certificate of Employment.csv">CSV file</a> that contains the following columns:</p> <ul> <li><strong>Company Name</strong>: The organization issuing the certificate</li> <li><strong>First Name</strong>: Employee’s first name</li> <li><strong>Last Name</strong>: Employee’s last name</li> <li><strong>Job Title</strong>: Employee’s position</li> <li><strong>Start Date</strong>: Employment start date</li> <li><strong>End Date</strong>: Employment end date (if applicable)</li> <li><strong>Certificate Date</strong>: Date the certificate is issued</li> </ul> <p>To import the data, click on <strong>Import data</strong> and select <strong>Start with data from a CSV file or another platform</strong>. Upload the CSV file containing your employee data, and Zapier will automatically create the table structure and populate it with your records.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/zapier-csv-import.png" alt="Import CSV data into Zapier Tables"/></p> <p>Once imported, your table should contain 10 sample records with employee information. Give your table a descriptive name like “Certificate of Employment” to make it easy to identify in your Zaps.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/zapier-data-table.png" alt="Certificate of Employment table in Zapier"/></p> <p>This table will serve as the trigger for our automation - whenever a new record is added or an existing record is updated, our Zap will automatically generate a certificate and save it to Dropbox.</p> <h2 id="create-template">Creating the Template in DocuGenerate</h2> <p>Before setting up the Zapier automation, we need to prepare our document template in DocuGenerate. Log in to your DocuGenerate account and <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">create a new template</a> using the <a href="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/Certificate of Employment.docx">Certificate of Employment</a> Word document.</p> <p>The template contains merge tags that correspond to the column names in our <a href="#zapier-table">Zapier Table</a>. They are automatically detected by DocuGenerate, making it easy to map the data during document generation.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/docugenerate-template.png" alt="Certificate of Employment template in DocuGenerate"/></p> <p>The <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> in the template include <code class="language-plaintext highlighter-rouge">[Company Name]</code>, <code class="language-plaintext highlighter-rouge">[First Name]</code>, <code class="language-plaintext highlighter-rouge">[Last Name]</code>, <code class="language-plaintext highlighter-rouge">[Start Date]</code>, <code class="language-plaintext highlighter-rouge">[End Date]</code>, <code class="language-plaintext highlighter-rouge">[Job Title]</code> and <code class="language-plaintext highlighter-rouge">[Certificate Date]</code>. These tags will be replaced with actual employee data when the document is generated through our Zapier automation.</p> <h2 id="tables-trigger">Setting Up the Zapier Tables Trigger</h2> <p>Now we’ll create our Zap to automate the entire process. Start by creating a new Zap in Zapier and select <strong>Zapier Tables</strong> as the trigger app. Choose the <strong>New or Updated Record</strong> trigger event. This ensures our automation runs whenever employee data is added or modified in our table.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/trigger-new-record.png" alt="New or Updated Record trigger in Zapier Tables"/></p> <p>In the trigger configuration, connect to your Zapier Tables account if you haven’t already, then select the <strong>Certificate of Employment</strong> table we <a href="#zapier-table">created earlier</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/trigger-table-selection.png" alt="Configure Zapier Tables trigger"/></p> <p>Test the trigger to ensure it’s working correctly. Zapier will show you the most recent records from your table, allowing you to select one for testing the subsequent steps in your Zap.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/trigger-test-data.png" alt="Test Zapier Tables trigger"/></p> <p>Select one of the employee records and continue. This test record will be used to preview data mapping in the following steps of our automation.</p> <h2 id="generate-document">Configuring the Generate Document Action</h2> <p>Next, we’ll add DocuGenerate to our Zap to handle document generation. Search for the <a href="https://zapier.com/apps/docugenerate/integrations" target="_blank" rel="noopener">DocuGenerate app</a> and add the <strong>Generate Document</strong> action.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/docugenerate-account.png" alt="Add Generate Document action"/></p> <p>If this is your first time connecting DocuGenerate to Zapier, you’ll need to authenticate using your <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-zapier/#connect-to-zapier">DocuGenerate API Key</a>. You can find your API key in your DocuGenerate account settings.</p> <p>In the action configuration, select the <strong>Certificate of Employment</strong> template from the dropdown list. For the document name, we’ll use dynamic values from our Zapier Table: <code class="language-plaintext highlighter-rouge">Certificate of [First Name] [Last Name]</code>. This way, the generated document’s name will be personalized with the person’s name. Set the export format to <strong>PDF</strong> to ensure the certificates are generated in a professional, print-ready format.</p> <p>The most important part is mapping the data from your <a href="#tables-trigger">Zapier Table</a> to the template merge tags. In the <strong>Data</strong> field, make sure to select the actual field values from the previous step for each key. The dynamic field insertion will populate these values automatically when the Zap runs.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/docugenerate-configure.png" alt="Configure Generate Document parameters"/></p> <p>Test this step to ensure the document generation works correctly. If successful, you’ll see a JSON response from DocuGenerate containing the document details, like the document ID, name, format and <strong>Document URL</strong>, which points to the generated PDF file that we’ll use in the next step. You’ll notice that the document name and file name are personalized with the selected record’s values as intended.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/docugenerate-test.png" alt="Test Generate Document action"/></p> <h2 id="dropbox-upload">Adding the Dropbox Upload Action</h2> <p>The final step in our automation is to save the generated certificate to Dropbox. Add the <a href="https://zapier.com/apps/dropbox/integrations" target="_blank" rel="noopener">Dropbox app</a> to your Zap and select the <strong>Upload File</strong> action. Connect your Dropbox account to Zapier if you haven’t already. This will allow Zapier to upload files to your Dropbox storage.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/dropbox-upload-file.png" alt="Add Dropbox Upload File action"/></p> <p>In the action configuration, you’ll need to specify two key parameters:</p> <ul> <li> <p><strong>Folder</strong>: Choose where to save the certificates in your Dropbox. For this tutorial, we’ll use the static path <code class="language-plaintext highlighter-rouge">/DocuGenerate/Certificates</code>. This creates an organized folder structure for easy document management. You can also use dynamic folder names based on data from your table, such as organizing by company name or date.</p> </li> <li> <p><strong>File</strong>: This is where we specify the file to upload. Select the <strong>Document URL</strong> from the DocuGenerate step. This tells Dropbox to download the file from DocuGenerate’s storage and save it to your specified folder.</p> </li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/dropbox-configure.png" alt="Configure Dropbox upload parameters"/></p> <p>Leave the <strong>Specify File Name</strong> and <strong>Specify File Extension</strong> fields empty. This allows Dropbox to use the original filename and extension from the generated document, which for the sample selected record is <code class="language-plaintext highlighter-rouge">Certificate of Conrado Fearnyhough.pdf</code>.</p> <p>Test this step to verify that the file uploads successfully to your Dropbox folder.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/dropbox-test.png" alt="Test Dropbox upload"/></p> <p>If the test is successful, you’ll see confirmation that the file has been uploaded to your specified Dropbox folder. You can verify this by checking your Dropbox account directly.</p> <p><img src="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/dropbox-file.png" alt="Dropbox files in the &quot;Certificates&quot; folder"/></p> <h2 id="enhancements">Enhancing Your Automation</h2> <p>Once your basic automation is working, consider these enhancements to make it even more powerful. These additional features can help you create more sophisticated workflows and better organize your document management system.</p> <h3 id="dynamic-folders">Dynamic Folder Organization</h3> <p>Instead of using a static folder path, you can organize certificates by company, department, or date. For example:</p> <ul> <li><code class="language-plaintext highlighter-rouge">/DocuGenerate/Certificates/[Company Name]</code></li> <li><code class="language-plaintext highlighter-rouge">/DocuGenerate/Certificates/[Certificate Date]</code></li> <li><code class="language-plaintext highlighter-rouge">/DocuGenerate/Certificates/[Job Title]</code></li> </ul> <h3 id="conditional-logic">Conditional Logic</h3> <p>Use Zapier’s <a href="https://zapier.com/blog/filter-by-zapier-guide/" target="_blank" rel="nofollow noopener">Filter</a> or <a href="https://zapier.com/features/paths" target="_blank" rel="nofollow noopener">Paths</a> features to handle different document types or approval workflows:</p> <ul> <li>Generate different certificate templates based on job title</li> <li>Route documents through approval processes before final storage</li> <li>Apply different folder structures for different company divisions</li> </ul> <h3 id="notifications">Notification Systems</h3> <p>Add email notifications to inform HR managers when certificates are generated and saved. You can use <a href="https://zapier.com/apps/email/integrations" target="_blank" rel="nofollow noopener">Zapier’s Email</a> or <a href="https://zapier.com/apps/gmail/integrations" target="_blank" rel="nofollow noopener">Gmail</a> actions to send automated notifications.</p> <h2 id="security-compliance">Security and Compliance Considerations</h2> <p>When automating document workflows, especially for HR documents like employment certificates, consider these security aspects:</p> <h3 id="data-privacy">Data Privacy</h3> <ul> <li>Ensure your Zapier Tables contain only necessary employee information</li> <li>Consider data retention policies for both generated documents and source data</li> <li>Review Dropbox sharing settings to prevent unauthorized access</li> </ul> <h3 id="access-control">Access Control</h3> <ul> <li>Limit access to your Zapier automations to authorized personnel only</li> <li>Use Dropbox’s team features to control who can access certificate folders</li> <li>Regularly audit user permissions and remove access for former employees</li> </ul> <h3 id="audit-trails">Audit Trails</h3> <ul> <li>Zapier automatically maintains logs of all automation runs</li> <li>Consider adding additional logging or notification steps for compliance requirements</li> <li>Document your automation process for internal auditing purposes</li> </ul> <h2 id="conclusion">Conclusion</h2> <p>Automating document generation and cloud storage with DocuGenerate, Zapier, and Dropbox creates a powerful workflow that saves time while ensuring consistent, professional results. This automation eliminates manual file management, reduces errors, and creates an organized system for document storage and retrieval.</p> <p>By following this tutorial, you’ve created a foundation that can be adapted for many different document types and business processes. Whether you’re managing HR documents, sales proposals, or administrative paperwork, this automation approach can streamline your workflows and improve operational efficiency.</p> <p>Consider expanding this automation to handle other document types or integrate with additional business tools. The flexibility of Zapier makes it easy to add new steps, connect different apps, or create more sophisticated workflows as your needs evolve.</p> <h3 id="resources">Resources</h3> <ul> <li>Download the <a href="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/Certificate of Employment.docx">Certificate of Employment template</a> used in this tutorial</li> <li>Access the <a href="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/Certificate of Employment.csv">sample CSV data</a> for importing into Zapier Tables</li> <li>Learn more about <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-zapier/">DocuGenerate’s Zapier integration</a> in our Help Center</li> <li>Explore <a href="https://community.zapier.com/p/zapier-tables" target="_blank" rel="nofollow noopener">Zapier Tables documentation</a> for advanced data management features</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Dropbox"/> <category term="Zapier"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to automate document generation and file storage by connecting DocuGenerate with Dropbox through Zapier. This guide walks you through creating certificates of employment and automatically saving them to organized folders in Dropbox.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/015-zapier-save-to-dropbox/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Why use Word-based Templates instead of HTML-based?</title> <link href="https://www.docugenerate.com/blog/why-use-word-based-templates-instead-of-html-based/" rel="alternate" type="text/html" title="Why use Word-based Templates instead of HTML-based?"/> <published>2024-10-14T00:00:00+00:00</published> <updated>2024-10-14T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/why-use-word-based-templates-instead-of-html-based</id> <content type="html" xml:base="https://www.docugenerate.com/blog/why-use-word-based-templates-instead-of-html-based/"><![CDATA[<h2 id="document-generation-landscape">The Document Generation Landscape</h2> <p>When it comes to document generation solutions, businesses often face a critical choice between platforms that use Word templates and those based on HTML templates. This decision might seem trivial at first glance, but it can significantly impact your workflow efficiency, document quality, and long-term flexibility.</p> <p>DocuGenerate is built around Microsoft Word templates, but there are other solutions on the market that use HTML-based approaches. While both have their merits, there are compelling reasons why Word-based templates often provide superior results for businesses of all sizes.</p> <p>In this article, we’ll explore the key differences between Word and HTML templates, examine the advantages of each approach, and explain why having ownership of your templates matters for business continuity and flexibility.</p> <h2 id="fundamental-differences">Understanding the Fundamental Differences</h2> <p>Before diving into the advantages and disadvantages, let’s clarify the key differences between Word-based and HTML-based document generation systems:</p> <p><strong>Word-Based Templates</strong> use standard document formats (DOCX, ODT) as templates, compatible with both <a href="https://www.microsoft.com/fr-fr/microsoft-365/word" target="_blank">Microsoft Word</a> and <a href="https://www.libreoffice.org/" target="_blank">LibreOffice</a>. They leverage the full formatting capabilities of these powerful word processors and allow direct editing with familiar tools most business users already know. They support complex document structures and can generate output in multiple formats (DOCX, PDF, etc.).</p> <p><strong>HTML-Based Templates</strong> use HTML and CSS for template design and often require knowledge of web development technologies. They typically include a WYSIWYG editor (stands for <em>“What You See Is What You Get”</em>), focus primarily on PDF output, and may use template languages like <a href="https://handlebarsjs.com/" target="_blank" rel="nofollow noopener">Handlebars</a>, <a href="https://mustache.github.io/" target="_blank" rel="nofollow noopener">Mustache</a>, or <a href="https://jinja.palletsprojects.com/en/stable/" target="_blank" rel="nofollow noopener">Jinja</a>.</p> <p>With these differences in mind, let’s explore why Word templates often provide a superior solution for businesses.</p> <h2 id="template-ownership">Template Ownership and Portability</h2> <p>One of the most significant advantages of Word-based templates is true ownership of your document designs. With DocuGenerate and other Word-based solutions, your templates are standard DOCX files that you can download, edit offline, and even use with different systems if needed.</p> <p>This provides important benefits like avoiding vendor lock-in, future-proofing your template investment, offline access for editing, and easy sharing with colleagues or clients as standard Word documents.</p> <p>HTML-based solutions often store your templates in proprietary formats that can only be edited and used within their specific platform. This creates challenges including migration difficulties (recreating all templates when switching providers), limited control (only making changes their editor allows), dependency risks (if the provider changes their system), and hidden costs when recreating templates.</p> <h2 id="formatting-capabilities">Superior Formatting Capabilities</h2> <p>Microsoft Word has been refined over decades to provide precise document formatting control. HTML-based solutions, while improving, still can’t match Word’s comprehensive formatting capabilities.</p> <h3 id="complex-layouts">Complex Document Layouts</h3> <p>Word excels at handling complex document formats that are common in business settings. It provides sophisticated control over headers and footers across multiple sections, complex page numbering schemes, multi-column layouts, advanced table formatting, precise text wrapping around images, and section breaks that allow different page orientations within a single document.</p> <p><img src="https://www.docugenerate.com/assets/posts/014-word-html-templates/word-layout-tab.png" alt="Word Layout Menu"/></p> <h3 id="typography">Typography and Branding</h3> <p>Word offers superior typographic controls essential for maintaining brand consistency. These include comprehensive font management with access to any <a href="https://www.docugenerate.com/help/articles/how-do-i-use-custom-fonts/">installed fonts</a>, advanced typography features like ligatures and small caps, precise control over character spacing, and style systems that ensure consistent formatting throughout documents.</p> <h3 id="pixel-perfect">Pixel-Perfect Precision</h3> <p>When it comes to document generation, precision matters—especially for legal documents, contracts, and formal business correspondence. Word templates provide pixel-perfect control that HTML templates often struggle to match consistently across different output formats.</p> <h2 id="ease-of-use">Ease of Use and Adoption</h2> <p>Perhaps one of the most compelling advantages of Word-based templates is familiarity and ease of use. Most business professionals are already accustomed to Microsoft Word. This existing skill set means minimal training is required, more staff can contribute to template creation and maintenance, and organizations can implement document generation solutions more quickly.</p> <p>HTML-based solutions often require knowledge of web technologies that many business users don’t possess. While WYSIWYG editors attempt to bridge this gap, they typically offer limited formatting control compared to what’s available in the underlying HTML and CSS.</p> <p>Consider <a href="https://ckeditor.com/" target="_blank" rel="nofollow noopener">CKEditor</a>, one of the most popular WYSIWYG editors used by web applications. While it provides a rich and user-friendly interface, it still falls short of Word’s comprehensive functionality. Users often encounter limitations with complex formatting, table handling, and page layout control.</p> <p><img src="https://www.docugenerate.com/assets/posts/014-word-html-templates/ck-editor.png" alt="CKEditor Interface"/></p> <p>Even with advanced WYSIWYG editors like this, users typically have access to only a subset of the formatting capabilities available in Word. The editing experience feels constrained compared to a dedicated word processor, and the final output may not always match what users see in the editor.</p> <h2 id="practical-examples">Some Practical Examples</h2> <p>Different types of business documents have varying requirements for formatting and structure. Let’s examine how Word and HTML templates compare for common document types.</p> <p><strong>Legal Documents</strong> often have strict formatting requirements, including complex numbering schemes, precise paragraph indentation, specific line spacing, section and page numbering conventions, and careful placement of signature blocks. Word templates excel at maintaining these precise formatting requirements consistently, while HTML-based systems often struggle with the exact spacing and formatting needs of legal documents.</p> <p><img src="https://www.docugenerate.com/assets/posts/014-word-html-templates/legal-document.png" alt="Superior Court Pleading Templates"/></p> <p><strong>Invoices and Statements</strong> can be handled by both approaches, but Word templates offer advantages for complex layouts with precise positioning of elements, complex table structures for line items, conditional sections based on business rules, and consistent pagination for multi-page invoices.</p> <p><strong>Long-Form Documents</strong> like reports benefit significantly from Word’s essential features such as automatically generated and updated tables of contents, dynamic cross-references to other sections, better control over page breaks and section formatting, and the ability to have different headers and footers for different sections.</p> <h2 id="technical-considerations">Technical Considerations</h2> <p>Beyond the user experience, several technical factors differentiate Word and HTML templates. While both approaches can produce professional-looking documents, the underlying technologies affect everything from output options to how content flows across pages. Understanding these differences helps you choose the solution that best aligns with your organization’s specific requirements.</p> <h3 id="output-formats">Output Format Flexibility</h3> <p>One significant advantage of Word-based templates is the ability to generate documents in <a href="https://www.docugenerate.com/help/articles/select-the-merge-export-format/">multiple formats</a>, including editable Word documents (DOCX), PDFs for final distribution, and other formats. This versatility allows businesses to distribute content in whatever format best suits their needs while maintaining the ability to edit documents after generation.</p> <p>HTML-based systems typically focus primarily on PDF output, which limits flexibility when recipients need to edit or repurpose content. When changes are required, the entire document generation process must be repeated rather than simply editing the output file. This can create inefficiencies in workflows where documents frequently need modifications or when content needs to be extracted for other purposes.</p> <h3 id="page-breaks">Page Breaks and Document Structure</h3> <p>Controlling how content flows across pages is crucial for professional documents. Word handles page breaks, section breaks, and content flow naturally, while HTML-based systems often struggle with these concepts since HTML was designed for flowing content rather than paginated documents.</p> <p>This becomes particularly important when documents need specific page numbering schemes, different sections require different layouts or orientations, headers and footers need to vary throughout the document, or content needs to avoid breaking across pages.</p> <h3 id="customizing-syntax">Customizing Delimiters and Template Syntax</h3> <p>With HTML-based template systems, you’re typically locked into their specific template language and syntax. Most use fixed delimiters like <code class="language-plaintext highlighter-rouge">{{ }}</code> or <code class="language-plaintext highlighter-rouge">{% %}</code> for variables and logic.</p> <p>DocuGenerate allows you to <a href="https://www.docugenerate.com/help/articles/how-do-i-update-the-tag-delimiters/">customize your template delimiters</a>, which helps you avoid conflicts with other syntax in your documents, create templates that match your team’s preferences, simplify the template creation process, and support migration from other systems by matching their syntax.</p> <p><img src="https://www.docugenerate.com/assets/posts/014-word-html-templates/tag-delimiters.png" alt="Customizable Delimiters" class="desktop-width-75"/></p> <h2 id="making-the-right-choice">Making the Right Choice for Your Business</h2> <p>When evaluating document generation solutions, consider these key factors:</p> <ol> <li><strong>Template Ownership</strong>: Do you want to own your templates in a standard format?</li> <li><strong>Formatting Requirements</strong>: How complex are your document formatting needs?</li> <li><strong>User Skills</strong>: What is your team’s technical expertise?</li> <li><strong>Output Flexibility</strong>: Do you need editable documents or just PDFs?</li> <li><strong>Integration</strong>: How does the solution fit with your existing document workflows?</li> </ol> <p>For many businesses, Word-based document generation offers the optimal balance of power, flexibility, and ease of use. It integrates seamlessly with existing business processes, offering features like tracked changes for collaborative editing, comments for feedback, document comparison tools, and compatibility with many e-signature platforms that work directly with Word files.</p> <h2 id="conclusion">Conclusion</h2> <p>While both Word-based and HTML-based document generation solutions have their place, Word templates offer significant advantages for most business scenarios including true ownership of your templates, superior formatting capabilities, familiar editing experience, output format flexibility, and post-generation editing options.</p> <p>DocuGenerate builds on these advantages with additional features like customizable delimiters, and an intuitive approach to template creation. As you evaluate document generation solutions for your business, consider not just the immediate functionality but also the long-term implications for template ownership, user adoption, and workflow integration. The right choice can save your team countless hours and ensure your documents always meet your exact standards.</p> <h3 id="resources">Resources</h3> <ul> <li><a href="https://www.docugenerate.com/templates/">Template Library</a> - Browse professionally designed templates ready for use</li> <li><a href="https://www.docugenerate.com/help/articles/select-the-merge-export-format/">Export Formats Guide</a> - Explore the different output formats available</li> <li><a href="https://www.docugenerate.com/help/articles/how-do-i-update-the-tag-delimiters/">Customizing Tag Delimiters</a> - Learn how to set your own custom delimiters</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Templates"/> <category term="Microsoft Word"/> <category term="HTML"/> <summary type="html"><![CDATA[Discover why Word-based templates offer significant advantages over HTML-based alternatives for document generation. Learn how template ownership, formatting control, and document editing flexibility can benefit your business workflow.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/014-word-html-templates/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/014-word-html-templates/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Introducing Multi-Region Processing and Storage</title> <link href="https://www.docugenerate.com/blog/introducing-multi-region-processing-and-storage/" rel="alternate" type="text/html" title="Introducing Multi-Region Processing and Storage"/> <published>2024-09-30T00:00:00+00:00</published> <updated>2024-09-30T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/introducing-multi-region-processing-and-storage</id> <content type="html" xml:base="https://www.docugenerate.com/blog/introducing-multi-region-processing-and-storage/"><![CDATA[<h2 id="what-is-multi-region">What is Multi-Region Processing and Storage?</h2> <p>At its core, multi-region processing and storage is the ability to choose where your data is handled. Whether for compliance with regulations like GDPR, improving performance for users in different regions, or simply offering greater control over data locality, this new feature is a game-changer.</p> <p>Prior to this update, all templates and documents were stored and processed in a single region (the United States), which served as the default for all users. Now, you can choose the physical location where your templates and their associated documents are processed and stored, enhancing security and speed. The <a href="https://www.docugenerate.com/pdf-generation-api/#regions">available regions</a> are:</p> <ul> <li><strong>United States</strong></li> <li><strong>European Union</strong></li> <li><strong>United Kingdom</strong></li> <li><strong>Australia</strong></li> </ul> <p>You can <a href="#web-account-region">choose a default region</a> for your account, and also <a href="#web-template-region">configure regions at the template level</a>. For advanced users leveraging our API, it’s possible to specify the processing region through API calls and use <a href="#api-endpoints-region">regional endpoints</a> for document generation. We’ll walk you through everything you need to know about this update and how you can <a href="#migration-guide">migrate your existing templates</a> to benefit from this feature.</p> <h2 id="web-app-changes">Changes in the Web App</h2> <p>Our goal with this update is to make region selection as straightforward as possible for web app users. We’ve introduced a couple of key changes to streamline the process of selecting regions, both at the account level and at the template level.</p> <h3 id="web-account-region">Account-Level Region Defaults</h3> <p>To simplify the process of managing multiple templates, you can now <a href="https://www.docugenerate.com/help/articles/how-to-select-the-account-region">set a default region</a> in the account settings. This default setting applies to all newly created templates, ensuring that they are processed and stored in the region of your choice without having to select the region each time you create a new template.</p> <p><img src="https://www.docugenerate.com/assets/posts/013-multi-region-processing/account-region-v2.png" alt="Updating the account default region"/></p> <p>By default, the region is set to the <strong>United States</strong>, but you can change it to whatever region you prefer, depending on your needs. This feature is ideal for users who operate in a specific region and want to ensure that all their templates and documents are handled accordingly.</p> <p>For example, if you operate primarily in Europe and select <strong>European Union</strong> as your default region, all new templates will automatically be processed and stored in the EU. Of course, you can still override this setting on a per-template basis, but having a default in place can save you time and streamline your workflow.</p> <h3 id="web-template-region">Region Selection for Templates</h3> <p>When you create or edit a template in the web app, you’ll now see a region dropdown that allows you to <a href="https://www.docugenerate.com/help/articles/how-do-i-update-a-template-region">choose the physical location</a> where your template and its documents are processed and stored. This selection ensures that all documents generated from that template will be handled within the selected region.</p> <p><img src="https://www.docugenerate.com/assets/posts/013-multi-region-processing/template-region.png" alt="Updating the template storing and processing region"/></p> <p>For instance, if you select the <strong>European Union</strong>, not only will the template itself be stored in our EU data center, but all documents generated from that template will also be processed and stored there. This is particularly important for users who need to comply with regional regulations, such as GDPR, which mandates that data belonging to european residents must remain within the EU.</p> <p>If you decide to change the region of an existing template, rest assured that only new documents generated after the change will be affected. Your existing documents will remain in the region where they were originally stored.</p> <h2 id="api-changes">Changes at the API Level</h2> <p>For our more advanced users who interact with DocuGenerate via the API, we’ve introduced several key updates that will give you greater control over how and where your data is processed. Whether you’re creating, updating, or generating documents, the API has been updated to support multi-region functionality.</p> <h3 id="api-endpoints-region">Multi-Region API Endpoints</h3> <p>In addition to the main API endpoint you’ve been using, we’ve rolled out several <a href="https://www.docugenerate.com/help/articles/can-i-use-regional-api-endpoints">regional API endpoints</a> to allow you to process and store your data in specific geographic locations. These new endpoints include:</p> <ul> <li><strong>United States</strong> (hosted in San Francisco): <a href="https://api.docugenerate.com/" target="_blank">https://api.docugenerate.com/</a></li> <li><strong>European Union</strong> (hosted in Frankfurt): <a href="https://api.eu.docugenerate.com/" target="_blank">https://api.eu.docugenerate.com/</a></li> <li><strong>United Kingdom</strong> (hosted in London): <a href="https://api.uk.docugenerate.com/" target="_blank">https://api.uk.docugenerate.com/</a></li> <li><strong>Australia</strong> (hosted in Sydney): <a href="https://api.au.docugenerate.com/" target="_blank">https://api.au.docugenerate.com/</a></li> </ul> <p>By using these regional endpoints, you can ensure that all document generation and template storage occurs within the region of your choice. This is particularly useful for compliance purposes, ensuring that your data is handled entirely within a specific jurisdiction.</p> <p>Switching to a regional endpoint is simple—you just need to modify the base URL in your API calls to the appropriate regional endpoint. For example, if you need your documents to be processed in the EU, you would use <a href="https://api.eu.docugenerate.com/" target="_blank">https://api.eu.docugenerate.com/</a> instead of the default endpoint.</p> <h3 id="api-template-region">Region Specification for Templates</h3> <p>Another key API update allows you to specify the region when creating or updating a template. When you <a href="https://api.docugenerate.com/#/Template/createTemplate" target="_blank">create a new template</a> via the API, you can include the<code class="language-plaintext highlighter-rouge">region</code> field in your request payload to determine where that template and its documents will be stored.</p> <p><img src="https://www.docugenerate.com/assets/posts/013-multi-region-processing/api-create-template.png" alt="Specify the region when creating a template using the API"/></p> <p>Similarly, you can <a href="https://api.docugenerate.com/#/Template/updateTemplate" target="_blank">update a template’s region</a> using the API. Just like in the web app, changing the template’s region will only affect documents generated after the change, leaving previously generated documents in their original region.</p> <p><img src="https://www.docugenerate.com/assets/posts/013-multi-region-processing/api-update-template.png" alt="Specify the region when updating a template using the API"/></p> <h2 id="migration-guide">Migration Guide</h2> <p>To make the transition to multi-region processing as smooth as possible, we’ve prepared a migration guide for both web app and API users. Here’s how you can ensure that your templates and documents take full advantage of this new feature.</p> <h3 id="migration-web-app">For Web App Users</h3> <p>If you’re primarily using the web app, here’s what you need to do:</p> <ol> <li> <p><strong>Set Your Account-Level Region:</strong><br/> Go to your account settings and <a href="#web-account-region">select the default region</a> where new templates will be stored and processed. This setting will automatically apply to all templates created after the change.</p> </li> <li> <p><strong>Update Existing Templates (Optional):</strong><br/> If you want to move existing templates to a new region, go to the template settings and <a href="#web-template-region">select a new region for the template</a>. Remember, this will only impact documents generated after the change. Existing documents will remain in their original region.</p> </li> </ol> <h3 id="migration-api">For API Users</h3> <p>If you’re using the API, follow these steps to migrate smoothly:</p> <ol> <li> <p><strong>Switch to a Regional API Endpoint:</strong><br/> Update your API base URL to the appropriate regional endpoint (e.g., <a href="https://api.eu.docugenerate.com/" target="_blank">https://api.eu.docugenerate.com/</a> for EU processing). This ensures that your templates and documents are processed in the region that best meets your needs.</p> </li> <li> <p><strong>Update Existing Templates (Optional):</strong><br/> Use the API to update your template’s region by including the <code class="language-plaintext highlighter-rouge">region</code> field in your API requests. Any new documents generated after this update will be stored in the new template’s region.</p> </li> </ol> <h2 id="why-this-matters">Why This Matters</h2> <p>The introduction of multi-region processing and storage brings significant benefits to our users. Here are a few reasons why this feature is important:</p> <p><strong>1. Compliance with Local Regulations</strong><br/> If you operate in regions with strict data residency laws (e.g., the European Union’s GDPR), this feature allows you to ensure that your data remains within the required jurisdiction. You now have control over where your templates and documents are processed, helping you stay compliant with local laws.</p> <p><strong>2. Improved Performance</strong><br/> By processing and storing data closer to where your users are located, you can reduce latency and improve the overall performance of document generation. For example, if most of your users are in Europe, storing templates and processing documents in the EU will result in faster response times.</p> <p><strong>3. Greater Flexibility and Control</strong><br/> Whether you’re a small business operating in a specific region or a global enterprise with users around the world, this feature gives you the flexibility to tailor your data storage and processing needs according to your unique circumstances.</p> <h2 id="use-case-scenarios">Use Case Scenarios</h2> <p><strong>1. Small Business with Local Clients</strong><br/> If you’re a small business operating solely in the UK, you can now select the <strong>United Kingdom</strong> as your default region. This ensures that your templates and documents are processed and stored within the UK, providing your clients with reassurance about data residency and helping you comply with local data protection laws.</p> <p><strong>2. European Union-based Company with International Clients</strong><br/> A company based in the <strong>European Union</strong> with clients around the globe can set up different templates for different regions. For instance, you may store templates and process documents for European clients in the EU, while choosing the <strong>United States</strong> region for North American clients. This flexibility not only optimizes performance but also ensures compliance with GDPR regulations for your European clients.</p> <p><strong>3. Global Enterprise with Users on Multiple Continents</strong><br/> For a global company serving clients across continents, multi-region processing enables efficient document generation. You can set your default account region to <strong>Australia</strong> for Asia-Pacific operations, while utilizing <strong>European Union</strong> and <strong>United States</strong> regions for specific customer needs in those areas. This reduces latency and ensures document processing is localized for better performance.</p> <h2 id="conclusion">Conclusion</h2> <p>Multi-region processing and storage is a powerful new feature that offers flexibility, compliance, and performance improvements for all DocuGenerate users. Whether you’re using our web app or API, we’ve made it simple to select the region that best suits your needs and ensure that your templates and documents are processed accordingly. We encourage you to explore this new feature and start taking advantage of the benefits it brings.</p>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Product Update"/> <category term="API"/> <category term="Templates"/> <summary type="html"><![CDATA[It is now possible to choose the physical location where your templates and documents are processed and stored by DocuGenerate. Find out how this powerful new feature can help you meet local compliance regulations and enhance performance.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/013-multi-region-processing/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/013-multi-region-processing/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Streamline NDA eSignatures with DocuGenerate and SignRequest</title> <link href="https://www.docugenerate.com/blog/streamline-nda-esignatures-with-docugenerate-and-signrequest/" rel="alternate" type="text/html" title="Streamline NDA eSignatures with DocuGenerate and SignRequest"/> <published>2024-08-11T00:00:00+00:00</published> <updated>2024-08-11T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/streamline-nda-esignatures-with-docugenerate-and-signrequest</id> <content type="html" xml:base="https://www.docugenerate.com/blog/streamline-nda-esignatures-with-docugenerate-and-signrequest/"><![CDATA[<h2 id="what-is-an-nda">What is an NDA?</h2> <p>A <strong>Non-Disclosure Agreement (NDA)</strong> is a legally binding contract that establishes a confidential relationship between parties. NDAs are essential in protecting sensitive information, ensuring that parties involved in business negotiations, partnerships, or employment relationships do not disclose proprietary information to unauthorized third parties.</p> <p>Managing NDAs has been a manual, time-consuming process that involves printing, signing, scanning, and emailing documents back and forth. However, with the advent of advanced <a href="https://www.docugenerate.com/document-generation/">document generation</a> and electronic signature technologies, this process can be automated and streamlined. In this blog post, we will explore how to automate NDA eSignatures using <a href="https://www.docugenerate.com/">DocuGenerate</a> and <a href="https://signrequest.com/" target="_blank" rel="nofollow noopener">SignRequest</a>, an electronic signature solution designed to make signing documents easy, fast, secure and legally binding.</p> <h2 id="key-elements">Key Elements of an NDA</h2> <ul> <li> <p><strong>Definition of Confidential Information</strong>: Clearly specifies what constitutes confidential information. This includes trade secrets, business plans, financial records, customer lists, proprietary technology, and other sensitive data that is not publicly known. It should cover all forms of information, such as written documents, electronic files, and verbal communications.</p> </li> <li> <p><strong>Obligations of the Receiving Party</strong>: Outlines the responsibilities of the party receiving the confidential information. This includes using the information only for the purposes specified in the NDA, limiting access to authorized individuals, and taking reasonable steps to protect the information from unauthorized access or disclosure. Security measures like encryption and secure storage may be specified.</p> </li> <li> <p><strong>Exclusions from Confidential Information</strong>: Defines what information is not considered confidential. Common exclusions include information that is publicly known, already known to the receiving party, independently developed by the receiving party, or disclosed by a third party without confidentiality obligations.</p> </li> <li> <p><strong>Term of the Agreement</strong>: Indicates the duration for which the confidentiality obligations apply. This can vary but is often specified as a fixed period, such as one to five years, or may continue indefinitely until the confidential information no longer qualifies as such.</p> </li> <li> <p><strong>Consequences of Breach</strong>: Specifies the penalties for violating the terms of the NDA. This can include legal actions, monetary damages, and injunctions to prevent further disclosure. Clearly outlining the consequences helps deter breaches and provides a clear course of action if a breach occurs.</p> </li> </ul> <h2 id="automation-benefits">The Benefits of Automating NDA eSignatures</h2> <p>Handling NDAs manually can be cumbersome and prone to errors. The traditional process involves several steps: drafting the NDA, printing and signing it, scanning and sending it, and then storing the document. This manual process is not only time-consuming but also increases the risk of errors, such as missing signatures or lost documents.</p> <p>Automating the NDA process with eSignature technology offers numerous benefits. First and foremost, it saves time by reducing the steps required to generate, sign, and store NDAs. Automation also minimizes errors, ensuring that all necessary fields are completed and signatures are obtained. This improved efficiency allows your team to focus on more strategic tasks. Additionally, electronic signatures provide a secure and tamper-evident way to sign documents, enhancing overall security. Finally, reducing the need for paper documents supports eco-friendly business practices.</p> <h2 id="nda-template">Creating the NDA Template in DocuGenerate</h2> <p>For the purpose of this tutorial, we’ll be using the <a href="https://www.docugenerate.com/assets/posts/012-nda-e-signature/Non Disclosure Agreement.docx">NDA Template</a> from the<a href="https://www.docugenerate.com/templates/#contracts">Template Library</a>. This template includes all the necessary sections and placeholders for dynamic information, ensuring each generated NDA is complete and accurate.</p> <p><img src="https://www.docugenerate.com/assets/posts/012-nda-e-signature/nda-template.png" alt="NDA template on DocuGenerate"/></p> <h2 id="zapier-integration">Integrating DocuGenerate with SignRequest via Zapier</h2> <p>To automate the NDA signing process, we’ll use Zapier, a no-code automation tool that will allow us to integrate <a href="https://zapier.com/apps/docugenerate/integrations" target="_blank" rel="noopener">DocuGenerate</a> with <a href="https://zapier.com/apps/signrequest/integrations" target="_blank" rel="noopener">SignRequest</a> seamlessly. Its Zapier app offers flexibility in sending documents for eSignature, which makes it a great fit for our use case. While other eSignature apps require creating a template and generating a document based on that template, SignRequest allows to specify the document to be signed as a URL, which is very convenient.</p> <p>This integration automates the entire NDA signing process without needing to write any code. We’ll set up a Zap with the following steps:</p> <h3 id="new-document-trigger">1. New Document (Trigger)</h3> <p>The workflow begins with the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-zapier/#new-document-trigger">New Document</a> trigger in DocuGenerate, which activates whenever a new document is generated from the NDA template. This ensures the process starts as soon as the NDA is ready.</p> <p><img src="https://www.docugenerate.com/assets/posts/012-nda-e-signature/new-document-trigger.png" alt="New Document Trigger on DocuGenerate"/></p> <p>While this tutorial focuses on a simple workflow, you can enhance it further by adding steps to fetch form responses, generate the document, and send the sign request within the same flow. Instead of using the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-zapier/#new-document-trigger">New Document</a> trigger in DocuGenerate, you could use the <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-zapier/#generate-document-action">Generate Document</a> action for a more integrated automation.</p> <h3 id="text-formatter-action">2. Text Formatter (Action)</h3> <p>Since we’re simplifying the workflow by skipping the initial form submission and document generation steps, we need a way to get the email address of the NDA recipient. One method is to include the email address in the document name, such as <em>“NDA - john.smith@gmail.com”</em>. The <a href="https://zapier.com/apps/formatter/integrations" target="_blank" rel="nofollow noopener">Text Formatter</a> action by Zapier can then extract the email address from the document name by removing the <em>“NDA - “</em> part. We can name this action <strong>Extract email address</strong> for example:</p> <p><img src="https://www.docugenerate.com/assets/posts/012-nda-e-signature/text-formatter-action.png" alt="Text Formatter action to Extract Email Address"/></p> <h3 id="send-signrequest-action">3. Send SignRequest (Action)</h3> <p>Use the <strong>Send SignRequest</strong> action in SignRequest to send the NDA for eSignature. Set up the parameters as follows:</p> <ul> <li><code class="language-plaintext highlighter-rouge">File From URL</code> receives the <code class="language-plaintext highlighter-rouge">Document URL</code> from DocuGenerate.</li> <li><code class="language-plaintext highlighter-rouge">SignRequest Name</code> receives the <code class="language-plaintext highlighter-rouge">File Name</code> from DocuGenerate.</li> <li><code class="language-plaintext highlighter-rouge">Signer Email</code> receives the <code class="language-plaintext highlighter-rouge">Output</code> from the Text Formatter.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/012-nda-e-signature/signrequest-action.gif" alt="Send SignRequest action configuration"/></p> <p>This setup ensures that as soon as an NDA is generated, it is automatically sent for eSignature, streamlining the process and reducing manual intervention.</p> <h2 id="email-and-signing-process">Email and Signing Process</h2> <p>Once the workflow is activated, the recipient will receive an email with the NDA ready for eSignature. Let’s walk through how the document appears on the SignRequest dashboard, the email received by the recipient, and the signing process itself.</p> <h3 id="signrequest-dashboard">1. SignRequest Dashboard View</h3> <p>After the document is generated and sent for signature, it will appear on your <a href="https://signrequest.com/#/documents" target="_blank" rel="nofollow noopener">SignRequest dashboard</a> . Here, you can easily track the status of all your documents, see who has signed, and who still needs to sign. This dashboard provides a centralized view, making it easy to manage all your signed documents.</p> <p><img src="https://www.docugenerate.com/assets/posts/012-nda-e-signature/signrequest-dashboard.png" alt="Screenshot of the SignRequest dashboard showing the NDA document"/></p> <h3 id="recipient-email">2. Recipient Email Notification</h3> <p>The recipient will receive an email notification from SignRequest, informing them that they have a document waiting for their signature. This email includes a secure link to the document, ensuring that only the intended recipient can access and sign the NDA.</p> <p><img src="https://www.docugenerate.com/assets/posts/012-nda-e-signature/signrequest-email.png" alt="Screenshot of the email received by the recipient"/></p> <h3 id="signing-process">3. Signing Process</h3> <p>Clicking the link in the email will take the recipient to the SignRequest platform, where they can review and sign the NDA. The signing process is intuitive and straightforward, requiring only a few clicks. The recipient can sign the document electronically, and once signed, both parties will receive a copy of the signed NDA.</p> <p><img src="https://www.docugenerate.com/assets/posts/012-nda-e-signature/signrequest-signature.gif" alt="Animation of the signing process"/></p> <p>This seamless experience ensures that the NDA is signed quickly and securely, without the need for printing, scanning, or mailing physical documents.</p> <h2 id="example-use-cases">Example Use Cases</h2> <p>Automating NDA generation and eSignatures can be highly beneficial across various scenarios. Here are some examples:</p> <ul> <li> <p><strong>Sales Process</strong><br/> In a sales process, before booking a call with a potential client, you might need them to sign an NDA to protect sensitive business information. You can create a form for the client to fill out with basic information needed to populate the NDA. This form submission triggers the generation of the NDA using DocuGenerate, and it is then sent for eSignature via SignRequest. For more detailed instructions on creating such a form, refer to our blog article about <a href="https://www.docugenerate.com/blog/use-tally-and-make-to-generate-reports-based-on-form-submission/">Generating Reports based on Form Submission</a> (while that tutorial uses Make instead of Zapier, the principle remains the same).</p> </li> <li> <p><strong>Employee Onboarding</strong><br/> During the onboarding of new employees, companies often require signing an NDA to protect proprietary information. Automating this process ensures that every new hire receives and signs the NDA promptly. New employees can fill out their details through an online form, triggering the generation and sending of the NDA, streamlining the HR workflow and ensuring compliance.</p> </li> <li> <p><strong>Partnership Agreements</strong><br/> When entering into partnerships with other businesses or freelancers, it’s crucial to have an NDA in place to protect shared information. Automating the NDA generation and signing process ensures that these agreements are handled efficiently and securely. Partners can easily sign the NDA electronically, which speeds up the process and reduces administrative overhead.</p> </li> <li> <p><strong>Consultant Engagements</strong><br/> Companies often engage consultants to work on sensitive projects. An NDA is essential to protect intellectual property and confidential data. Automating the NDA process allows companies to quickly generate and send NDAs to consultants, ensuring that all necessary legal protections are in place before any work begins.</p> </li> <li> <p><strong>Mergers and Acquisitions</strong><br/> In mergers and acquisitions, NDAs are critical to protect sensitive financial and strategic information during negotiations. Automating the generation and eSignature process of NDAs ensures that all parties involved can quickly sign and access the necessary agreements, facilitating smoother and faster transactions.</p> </li> </ul> <h2 id="conclusion">Conclusion</h2> <p>Automating NDA eSignatures with DocuGenerate and SignRequest offers significant benefits, including time savings, error reduction, improved efficiency, enhanced security, and environmental benefits. By following the steps outlined in this guide, you can streamline your NDA workflow, allowing you to focus on more strategic tasks and improve overall productivity.</p> <p>Incorporating DocuGenerate and SignRequest into your document management process is a smart move for any business looking to modernize its operations and stay ahead in today’s competitive landscape. Start automating your NDA eSignatures today and experience the transformative impact of these powerful tools.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/012-nda-e-signature/Non Disclosure Agreement.docx">NDA Template</a> used in this tutorial.</li> <li>The <a href="https://zapier.com/apps/signrequest/integrations" target="_blank" rel="noopener">SignRequest app</a> on Zapier.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="NDA"/> <category term="Zapier"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to automate eSignatures and manage NDAs efficiently across various business scenarios. Discover the benefits of integrating advanced document generation and electronic signature technologies to enhance security, save time, and improve productivity.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/012-nda-e-signature/cover-image-v2.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/012-nda-e-signature/cover-image-v2.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Generate a Script with SQL Instructions from Excel Data</title> <link href="https://www.docugenerate.com/blog/generate-a-script-with-sql-instructions-from-excel-data/" rel="alternate" type="text/html" title="Generate a Script with SQL Instructions from Excel Data"/> <published>2024-07-05T00:00:00+00:00</published> <updated>2024-07-05T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/generate-a-script-with-sql-instructions-from-excel-data</id> <content type="html" xml:base="https://www.docugenerate.com/blog/generate-a-script-with-sql-instructions-from-excel-data/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>Generating SQL scripts often requires either in-depth coding knowledge or meticulous manual data entry. However, with the right tools, this process can be simplified and made accessible to everyone. DocuGenerate offers a powerful solution that automates the creation of SQL scripts from Excel or CSV files, eliminating the need for manual coding.</p> <p>This blog post will guide you through the process of creating a parameterized SQL script, preparing your data source, and using DocuGenerate to automate script generation. We’ll also explore practical use cases to demonstrate the versatility and efficiency of this approach.</p> <h2 id="summary">What You’ll Learn</h2> <ol> <li><a href="#sql-script">Creating a Parameterized SQL Script</a><br/> Learn how to write an SQL script with placeholders instead of hardcoded values.</li> <li><a href="#data-source">Preparing Your Data Source</a><br/> Understand how to structure your data in an Excel or CSV file.</li> <li><a href="#docugenerate-automation">Using DocuGenerate for Automation</a><br/> See how DocuGenerate can automate the process, making it easy for non-technical users.</li> <li><a href="#use-cases">Practical Use Cases</a><br/> Discover how this technique can be applied in various scenarios, from data migration to report generation.</li> </ol> <h2 id="sql-script">Creating a Parameterized SQL Script</h2> <p>Before we dive into creating parameterized SQL scripts, let’s first understand what they are and how they are used.</p> <p><strong>SQL (Structured Query Language)</strong> is a standardized language used to manage and manipulate relational databases. SQL commands allow users to perform tasks such as querying data, updating records, inserting new records, and deleting records from a database. SQL is essential for interacting with the database to retrieve and manage data efficiently.</p> <p>An <strong>SQL script</strong> is a file containing a sequence of SQL commands. These scripts are used to execute multiple SQL commands in a batch, allowing for automation of database operations. SQL scripts can be used for various tasks, including data manipulation, database schema creation, and data migration.</p> <p>Creating an SQL script often involves writing repetitive statements with different values. To illustrate this, consider the following non-parameterized SQL script for inserting data into a <code class="language-plaintext highlighter-rouge">customer</code> table:</p> <div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">customer</span> <span class="p">(</span><span class="n">customer_id</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">last_name</span><span class="p">,</span> <span class="n">email</span><span class="p">,</span> <span class="n">phone_number</span><span class="p">,</span> <span class="n">created_at</span><span class="p">)</span>
<span class="k">VALUES</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">'John'</span><span class="p">,</span> <span class="s1">'Doe'</span><span class="p">,</span> <span class="s1">'john.doe@example.com'</span><span class="p">,</span> <span class="s1">'123-456-7890'</span><span class="p">,</span> <span class="s1">'2024-01-01 10:00:00'</span><span class="p">);</span>

<span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">customer</span> <span class="p">(</span><span class="n">customer_id</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">last_name</span><span class="p">,</span> <span class="n">email</span><span class="p">,</span> <span class="n">phone_number</span><span class="p">,</span> <span class="n">created_at</span><span class="p">)</span>
<span class="k">VALUES</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s1">'Jane'</span><span class="p">,</span> <span class="s1">'Smith'</span><span class="p">,</span> <span class="s1">'jane.smith@example.com'</span><span class="p">,</span> <span class="s1">'098-765-4321'</span><span class="p">,</span> <span class="s1">'2024-01-02 11:00:00'</span><span class="p">);</span>

<span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">customer</span> <span class="p">(</span><span class="n">customer_id</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">last_name</span><span class="p">,</span> <span class="n">email</span><span class="p">,</span> <span class="n">phone_number</span><span class="p">,</span> <span class="n">created_at</span><span class="p">)</span>
<span class="k">VALUES</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="s1">'Michael'</span><span class="p">,</span> <span class="s1">'Brown'</span><span class="p">,</span> <span class="s1">'michael.brown@example.com'</span><span class="p">,</span> <span class="s1">'234-567-8901'</span><span class="p">,</span> <span class="s1">'2024-01-03 12:00:00'</span><span class="p">);</span>
</code></pre></div></div> <p>This script inserts a new record into the customer table with specific values for each column. When dealing with multiple records, SQL scripts can contain multiple <code class="language-plaintext highlighter-rouge">INSERT</code> statements to add several records to the database.</p> <p>As you can see, each row is similar but with different values. This process can become tedious and error-prone when dealing with large datasets. To address this, we use <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">placeholders</a> for the values, making the script parameterized:</p> <div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">INSERT</span> <span class="k">INTO</span> <span class="n">customer</span> <span class="p">(</span><span class="n">customer_id</span><span class="p">,</span> <span class="n">first_name</span><span class="p">,</span> <span class="n">last_name</span><span class="p">,</span> <span class="n">email</span><span class="p">,</span> <span class="n">phone_number</span><span class="p">,</span> <span class="n">created_at</span><span class="p">)</span>
<span class="k">VALUES</span> <span class="p">({</span><span class="n">customer_id</span><span class="p">},</span> <span class="s1">'{first_name}'</span><span class="p">,</span> <span class="s1">'{last_name}'</span><span class="p">,</span> <span class="s1">'{email}'</span><span class="p">,</span> <span class="s1">'{phone_number}'</span><span class="p">,</span> <span class="s1">'{created_at}'</span><span class="p">);</span>
</code></pre></div></div> <p>In this script, the placeholders <code class="language-plaintext highlighter-rouge">{customer_id}</code>, <code class="language-plaintext highlighter-rouge">{first_name}</code>, <code class="language-plaintext highlighter-rouge">{last_name}</code>, <code class="language-plaintext highlighter-rouge">{email}</code>, <code class="language-plaintext highlighter-rouge">{phone_number}</code>, and <code class="language-plaintext highlighter-rouge">{created_at}</code> will be replaced with actual values from our data source.</p> <h2 id="data-source">Preparing Your Data Source</h2> <p>Next, we need to prepare an Excel or CSV file with the data that will be used to populate our SQL script. Below is an example of a <a href="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/SQL Data.csv">CSV file</a> structure that matches our placeholders:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>customer_id,first_name,last_name,email,phone_number,created_at
1,John,Doe,john.doe@example.com,123-456-7890,2024-01-01 10:00:00
2,Jane,Smith,jane.smith@example.com,098-765-4321,2024-01-02 11:00:00
3,Michael,Brown,michael.brown@example.com,234-567-8901,2024-01-03 12:00:00
4,Emily,Davis,emily.davis@example.com,345-678-9012,2024-01-04 13:00:00
5,Daniel,Wilson,daniel.wilson@example.com,456-789-0123,2024-01-05 14:00:00
6,Amy,Johnson,amy.johnson@example.com,567-890-1234,2024-01-06 15:00:00
7,David,Martinez,david.martinez@example.com,678-901-2345,2024-01-07 16:00:00
8,Susan,Lee,susan.lee@example.com,789-012-3456,2024-01-08 17:00:00
9,James,Clark,james.clark@example.com,890-123-4567,2024-01-09 18:00:00
10,Mary,Lopez,mary.lopez@example.com,901-234-5678,2024-01-10 19:00:00
11,Robert,Garcia,robert.garcia@example.com,012-345-6789,2024-01-11 20:00:00
12,Linda,Hernandez,linda.hernandez@example.com,123-456-7890,2024-01-12 21:00:00
13,William,Martinez,william.martinez@example.com,234-567-8901,2024-01-13 22:00:00
14,Patricia,Robinson,patricia.robinson@example.com,345-678-9012,2024-01-14 23:00:00
15,Charles,Hall,charles.hall@example.com,456-789-0123,2024-01-15 08:00:00
16,Barbara,Allen,barbara.allen@example.com,567-890-1234,2024-01-16 09:00:00
17,Thomas,Young,thomas.young@example.com,678-901-2345,2024-01-17 10:00:00
18,Jennifer,Hernandez,jennifer.hernandez@example.com,789-012-3456,2024-01-18 11:00:00
19,Christopher,King,christopher.king@example.com,890-123-4567,2024-01-19 12:00:00
20,Karen,Wright,karen.wright@example.com,901-234-5678,2024-01-20 13:00:00
</code></pre></div></div> <p>Alternatively, you can prepare your data in an <a href="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/SQL Data.xlsx">Excel file</a> with the same structure:</p> <p><img src="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/excel-data.png" alt="Sample Excel data"/></p> <p>Each row in the CSV or Excel file corresponds to a new record that will be inserted into the customer table. This structure ensures that our data is organized and ready to be merged with the SQL script template.</p> <h2 id="docugenerate-automation">Using DocuGenerate for Automation</h2> <p>DocuGenerate allows you to automate the process of generating SQL scripts by using a template and a data source. Here’s a step-by-step guide to achieving this:</p> <h3 id="1-create-a-template">1. Create a Template</h3> <p>First, save your parameterized SQL script as a template file. For example, the <a href="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/SQL Template.sql">SQL Template.sql</a> file contains the script used in this article.</p> <p><img src="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/sql-template-v3.png" alt="SQL template"/></p> <h3 id="2-upload-the-template">2. Upload the Template</h3> <p>Then, log into your DocuGenerate account and upload your SQL file to <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">create a new template</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/docugenerate-template.png" alt="SQL template on DocuGenerate"/></p> <h3 id="3-upload-the-data-source">3. Upload the Data Source</h3> <p>Next, <a href="https://www.docugenerate.com/help/articles/generate-documents-from-an-excel-or-csv-file/">upload your CSV or Excel file</a> containing the customer data. Use DocuGenerate’s intuitive interface to generate the SQL script.</p> <p>Make sure to select the option to <a href="https://www.docugenerate.com/help/articles/combine-the-generated-documents-into-a-single-file/">combine the generated documents</a> into a single file and not insert page breaks after each document. This way, the generated documents, in this case the SQL instructions, will be combined consecutively, with no page breaks in between.</p> <p><img src="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/generate-script.gif" alt="Generate SQL script"/></p> <h3 id="4-generate-the-sql-script">4. Generate the SQL Script</h3> <p>When generating the document, the placeholders in the template will be replaced with actual values from the CSV or Excel file.</p> <p>Export the generated document as a <strong>Plain text (.txt)</strong> file, then rename the exported file to have a <code class="language-plaintext highlighter-rouge">.sql</code> extension instead of <code class="language-plaintext highlighter-rouge">.txt</code>. This way, the SQL script will be recognized by database management systems that can execute the SQL instructions in bulk.</p> <p><img src="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/sql-script-v3.png" alt="SQL script"/></p> <p>By following these steps, you can quickly generate multiple SQL instructions without manual intervention. You can download the resulting file <a href="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/SQL Script.sql">here</a>. This not only saves time but also reduces the likelihood of errors that can occur with manual data entry.</p> <h2 id="use-cases">Practical Use Cases</h2> <p>This technique can be extremely useful in various scenarios:</p> <ul> <li> <p><strong>Data Migration</strong>: When migrating data from one system to another, you can generate SQL scripts to insert large volumes of data accurately and efficiently. For example, if you’re moving customer data from an old CRM system to a new <a href="https://www.emailvendorselection.com/crm-with-email-marketing/" target="_blank">CRM with email marketing software</a>, generating the necessary SQL scripts can ensure that the data transfer is seamless and accurate.</p> </li> <li> <p><strong>Report Generation</strong>: Automate the creation of SQL queries for report generation based on dynamic data inputs. This can be particularly useful for generating monthly or quarterly reports where the data changes regularly. By updating the data source file, you can generate up-to-date SQL scripts without rewriting the queries manually.</p> </li> <li> <p><strong>Database Seeding</strong>: For development and testing environments, generate SQL scripts to seed databases with sample data. This allows developers to test their applications with realistic data sets, ensuring that the application behaves as expected in a production environment.</p> </li> <li> <p><strong>Mass Updates</strong>: Perform mass updates on database records by generating SQL update scripts from a CSV or Excel file. This can be particularly useful for applying bulk changes, such as updating pricing information for a large inventory of products.</p> </li> <li> <p><strong>Personalized SQL Scripts</strong>: Create personalized SQL scripts for different clients or use cases by simply changing the data source file. This flexibility allows businesses to tailor their database operations to meet specific client needs without extensive manual coding.</p> </li> </ul> <h2 id="conclusion">Conclusion</h2> <p>With DocuGenerate, generating SQL scripts from an Excel or CSV file becomes a straightforward and accessible process. This powerful tool extends beyond traditional document generation tasks, offering versatile solutions for data management and automation.</p> <p>Whether you’re a developer looking to streamline your workflow or a non-technical user aiming to automate repetitive tasks, DocuGenerate provides an easy-to-use platform to meet your needs. Start leveraging the power of DocuGenerate today and transform how you handle SQL script generation and other document automation tasks.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/SQL Template.sql">SQL Template</a> used in this tutorial.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/SQL Data.xlsx">Excel</a> and <a href="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/SQL Data.csv">CSV</a> sample files used in this tutorial.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/SQL Script.sql">SQL Script</a> generated containing the SQL instructions.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Script"/> <category term="SQL"/> <category term="Excel"/> <summary type="html"><![CDATA[Discover step-by-step guidance on creating parameterized SQL scripts, preparing data sources, and leveraging DocuGenerate's powerful automation capabilities. Perfect for developers and non-technical users alike to manage data with ease.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/cover-image-v3.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/011-sql-script-from-excel-data/cover-image-v3.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">How to Create Event Tickets with Barcodes using Make</title> <link href="https://www.docugenerate.com/blog/how-to-create-event-tickets-with-barcodes-using-make/" rel="alternate" type="text/html" title="How to Create Event Tickets with Barcodes using Make"/> <published>2024-06-14T00:00:00+00:00</published> <updated>2024-06-14T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/how-to-create-event-tickets-with-barcodes-using-make</id> <content type="html" xml:base="https://www.docugenerate.com/blog/how-to-create-event-tickets-with-barcodes-using-make/"><![CDATA[<h2 id="scenario-overview">Scenario Overview</h2> <p>Creating event tickets with barcodes can be a game-changer for streamlining entry management and enhancing customer experience. Automation not only saves time but also reduces errors and ensures a professional touch. In this guide, we will use <a href="https://www.make.com/en?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">Make</a> (formerly Integromat) to automate the entire process. We’ll integrate <a href="https://stripe.com/en-fr" target="_blank" rel="nofollow noopener">Stripe</a> to handle payments, generate tickets using <a href="https://www.docugenerate.com/">DocuGenerate</a>, and send them to your customers via email. Here’s what you will learn:</p> <ul> <li><a href="#setting-up-stripe">Setting Up Stripe</a>: How to configure Stripe for payment processing.</li> <li><a href="#setting-up-docugenerate">Setting Up DocuGenerate</a>: Designing and uploading a ticket template.</li> <li><a href="#make-scenario">Creating the Make Scenario</a>: Automating ticket generation and email delivery.</li> </ul> <p>Let’s dive into the step-by-step process.</p> <h2 id="setting-up-stripe">Setting Up Stripe</h2> <p>Stripe is a powerful payment processing platform that allows you to easily accept payments online. For our event ticketing system, Stripe will handle the payments for the <a href="#stripe-product">Event Admission</a> product that we’ll create below. Here’s how to set it up:</p> <h3 id="stripe-connection">1. Create a Stripe Connection in Make</h3> <p>First, you need to add the <a href="https://www.make.com/en/integrations/stripe?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">Stripe app</a> to your scenario and use the <strong>Watch Events</strong> trigger, which is activated when a given event occurs. To create a Stripe connection in Make, you also need to generate a restricted API key. Go to the <a href="https://dashboard.stripe.com/apikeys" target="_blank" rel="nofollow noopener">Developers</a> page in Stripe, click on <strong>Create restricted key</strong> and configure the following permissions:</p> <ul> <li><strong>Balance</strong>: <code class="language-plaintext highlighter-rouge">Read</code></li> <li><strong>Checkout Sessions</strong>: <code class="language-plaintext highlighter-rouge">Read</code></li> <li><strong>Webhook Endpoints</strong>: <code class="language-plaintext highlighter-rouge">Write</code></li> </ul> <p>This API key will allow Make to interact with your Stripe account securely, fetching necessary information about the transactions and ensuring that the correct data is used for ticket generation.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/stripe-restricted-api-key.png" alt="Create Stripe connection in Make"/></p> <p>For detailed instructions on setting up the Stripe connection, refer to the Stripe integration <a href="https://www.make.com/en/help/app/stripe" target="_blank" rel="nofollow noopener">documentation</a>. This guide provides a step-by-step walkthrough on connecting Stripe with Make.</p> <h3 id="stripe-webhook">2. Create a Webhook for Checkout Session Completed</h3> <p>Next, you need to create a webhook in Stripe. Webhooks are crucial as they notify your system when certain events happen in your Stripe account. For this setup, we are interested in the <strong>Checkout Session completed</strong> event, which triggers when a customer successfully completes a purchase.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/stripe-create-webhook.png" alt="Create Stripe webhook for checkout session completed"/></p> <p>Once set up, this webhook will be visible on Stripe’s <a href="https://dashboard.stripe.com/webhooks" target="_blank" rel="nofollow noopener">Developers</a> page. This visibility ensures that you can monitor and manage your webhooks effectively, helping you troubleshoot any issues that might arise.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/stripe-make-webhook.png" alt="Make webhook visible on Stripe's Developers page"/></p> <h3 id="stripe-product">3. Create the “Event Admission” Product</h3> <p>Now, create a product in Stripe called <strong>Event Admission</strong>. This product represents the ticket for your event. When customers purchase this product, it triggers the entire ticketing process.</p> <p>Creating a product in Stripe is straightforward. Ensure that all relevant details, such as price and description, are correctly filled out to provide clear information to your customers.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/stripe-event-product.png" alt="The &quot;Event Admission&quot; product on Stripe"/></p> <h3 id="stripe-payment-link">4. Create a Payment Link for Your Product</h3> <p>Once your product is set up, the next step is to <a href="https://docs.stripe.com/payment-links/create" target="_blank" rel="nofollow noopener">create a payment link</a>. This link is what your customers will use to purchase their event tickets. Stripe makes it easy to generate these links, which you can then share via email, social media, or your website. The payment link will direct customers to a secure checkout page where they can complete their purchase.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/stripe-create-payment-link.png" alt="Payment link creation for the &quot;Event Admission&quot; product"/></p> <p>You can test the payment process using the <a href="https://buy.stripe.com/test_8wM3eEcTF0Jxb2oeUV" target="_blank" rel="nofollow noopener">Payment Link</a> for the <strong>Event Admission</strong> product. Enter your email address and for the card information use <code class="language-plaintext highlighter-rouge">4242 4242 4242 4242</code>, which is a test credit card number on Stripe. For the expiration data and CVC values you can use dummy values, as long as the expiration date is in the future. Then, if you hit <strong>Pay</strong>, you’ll receive an email with your test PDF ticket, as <a href="#complete-make-scenario">detailed further</a>.</p> <h2 id="setting-up-docugenerate">Setting Up DocuGenerate</h2> <p>DocuGenerate is a powerful tool for <a href="/document-generation/">automating document creation</a>. In this step, we’ll set up DocuGenerate to create a ticket template. This template will be used to generate personalized tickets for each customer.</p> <h3 id="ticket-design">1. Design Your Ticket Template</h3> <p>Start by designing a ticket template in Microsoft Word. The template should include placeholders (also known as <a href="/help/articles/what-are-merge-tags/">merge tags</a>) for the following fields: <code class="language-plaintext highlighter-rouge">ticket_number</code>, <code class="language-plaintext highlighter-rouge">full_name</code>, <code class="language-plaintext highlighter-rouge">event_date</code>, <code class="language-plaintext highlighter-rouge">event_time</code>, and <code class="language-plaintext highlighter-rouge">event_address</code>. These placeholders will be replaced with actual data when generating the tickets.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/ticket-word-template.png" alt="The &quot;Event Ticket Template&quot; in Word"/></p> <h3 id="upload-template">2. Upload the Template to DocuGenerate</h3> <p>Once your template is ready, <a href="/help/articles/how-do-i-create-a-new-template/">upload it to DocuGenerate</a>. This step is crucial as it prepares the template for automated document generation. DocuGenerate will use this template to create unique tickets for each customer based on the data received from Stripe.</p> <p>Make sure to enable the <a href="/help/articles/how-do-i-enable-the-enhanced-syntax/">enhanced syntax</a>, which is necessary for using the <code class="language-plaintext highlighter-rouge">barcode</code> filter to <a href="/help/articles/how-to-add-qr-codes-and-barcodes/#adding-barcodes">add a barcode</a> to the ticket. Also, please note that the merge tags don’t have any whitespaces because they are incompatible with the enhanced syntax. Instead, we use the underscore character (<code class="language-plaintext highlighter-rouge">_</code>) to separate words within the merge tags.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/docugenerate-ticket-template.png" alt="The &quot;Event Ticket Template&quot; on DocuGenerate"/></p> <p>Feel free to <a href="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/Event Ticket Template.docx">download the template</a> and customize it to fit the branding and details of your event.</p> <h2 id="make-scenario">Creating the Make Scenario</h2> <p>With Stripe and DocuGenerate set up, we’ll now create a scenario in Make to automate the ticket generation and email process. This scenario will connect all the components together, ensuring a seamless workflow from payment to ticket delivery.</p> <h3 id="generate-document-action">1. Set Up the “Generate a Document” Action</h3> <p>In Make, set up the <a href="/help/articles/automate-document-generation-with-make/#generate-document-action">Generate a Document</a> action by connecting the <a href="https://www.make.com/en/integrations/docugenerate?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="noopener">DocuGenerate app</a>. This action will take the data from the Stripe checkout session and use it to generate a ticket. Ensure that all the placeholders in your ticket template are correctly mapped to the data fields from Stripe.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/docugenerate-new-document.png" alt="Set up the &quot;Generate a Document&quot; action in Make"/></p> <p>For this tutorial, we used the event ID as the ticket number, but you can use any value that fits your needs. We also used the <code class="language-plaintext highlighter-rouge">customer_details: name</code> property from the Stripe event payload to populate the document name and the <code class="language-plaintext highlighter-rouge">full_name</code> tag in the document.</p> <h3 id="get-file-content">2. Use the HTTP Module to Get the File Content</h3> <p>After generating the document, use the <a href="https://www.make.com/en/help/tools/http" target="_blank" rel="noopener">HTTP module</a> in Make to retrieve the generated PDF file content. This module will fetch the ticket from DocuGenerate, ready to be sent via email.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/http-get-document.png" alt="Use the HTTP module to get the generated file content"/></p> <h3 id="send-email-action">3. Set Up the “Send an Email” Action in Make</h3> <p>Next, configure the “Send an Email” action from the official <a href="https://www.make.com/en/integrations/email?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="noopener">Email app</a>. This action will send the generated ticket PDF to the customer’s email address. Make sure to customize the email content to include event details and any other relevant information.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/send-email.png" alt="Set up the &quot;Send an Email&quot; action on Make"/></p> <p>The <strong>To Email Address</strong> value is populated with the <code class="language-plaintext highlighter-rouge">customer_details: email</code> property from the Stripe event payload that was received by the <a href="#stripe-webhook">webhook</a> after a successful payment.</p> <p>As for the <strong>Attachment</strong>, its value will be provided by the <strong>HTTP - Get a file</strong> action <a href="#get-file-content">previously configured</a>.</p> <p>For a more advanced email marketing solution, consider using <a href="https://www.mailmodo.com/" target="_blank" rel="nofollow noopener">Mailmodo</a> as an alternative to the generic Email app in Make. With Mailmodo’s <a href="https://www.make.com/en/integrations/mailmodo?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">Make app</a>, you can easily create and send interactive, dynamic emails directly from your workflow. This option is particularly useful if you want to integrate features like AMP emails, tracking, or analytics.</p> <h3 id="complete-make-scenario">4. The Complete Make Scenario</h3> <p>The visual representation of the complete scenario shows how each step is interconnected, ensuring a smooth flow of data and actions. Each module in the scenario plays a crucial role:</p> <ul> <li>The <strong>Watch Events</strong> trigger monitors Stripe for completed checkouts.</li> <li>The <strong>Generate a Document</strong> action creates the ticket using the DocuGenerate template.</li> <li>The <strong>Get a File</strong> action retrieves the generated PDF ticket.</li> <li>The <strong>Send an Email</strong> action delivers the ticket to the customer.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/make-scenario.gif" alt="The complete Make scenario"/></p> <p>Once the scenario is triggered and the ticket is generated, the customer will receive an email with the ticket attached. This automated process ensures that customers receive their tickets promptly and without any manual intervention.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/email-ticket.png" alt="Email with the generated PDF ticket attached"/></p> <p>Here’s an example of a generated ticket, which you can <a href="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/Ticket for Charlie Bucket.pdf">download here</a> if you’re interested.</p> <p><img src="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/Ticket for Charlie Bucket.png" alt="Example of generated PDF ticket"/></p> <h2 id="conclusion">Conclusion</h2> <p>By following this guide, you can automate the entire process of creating and sending event tickets with barcodes using Make. This not only saves time but also ensures a smooth and professional experience for your event attendees. Integrating Stripe, DocuGenerate, and Make provides a powerful solution to streamline ticket management for any event.</p> <p>Automating ticket generation and delivery improves efficiency and reduces errors, making it easier for you to manage your events. Moreover, it enhances the customer experience by providing instant access to tickets and ensuring they have all the necessary information at their fingertips.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://buy.stripe.com/test_8wM3eEcTF0Jxb2oeUV" target="_blank" rel="nofollow noopener">Payment Link</a> for testing the product purchase.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/Event Ticket Template.docx">Event Ticket Template</a> used in this tutorial.</li> <li>A sample <a href="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/Ticket for Charlie Bucket.pdf" target="_blank">PDF Ticket</a> generated using this scenario.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Tickets"/> <category term="Make"/> <category term="No-Code"/> <summary type="html"><![CDATA[Automate the creation of event tickets with barcodes using Make. By integrating Stripe for payment processing and DocuGenerate for PDF generation, you can design a scenario that creates and sends custom tickets to your customers via email.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/009-tickets-barcode-make/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Automate Contracts with Zapier and Google Sheets</title> <link href="https://www.docugenerate.com/blog/automate-contracts-with-zapier-and-google-sheets/" rel="alternate" type="text/html" title="Automate Contracts with Zapier and Google Sheets"/> <published>2024-05-24T00:00:00+00:00</published> <updated>2024-05-24T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/automate-contracts-with-zapier-and-google-sheets</id> <content type="html" xml:base="https://www.docugenerate.com/blog/automate-contracts-with-zapier-and-google-sheets/"><![CDATA[<h2 id="introduction">Introduction</h2> <p>In today’s fast-paced digital world, automating repetitive tasks saves time and minimizes the risk of error. This is especially true for document generation. Imagine having a spreadsheet full of data and being able to automatically generate professional documents with minimal effort. In this tutorial, we’ll show you how to achieve this with three powerful tools: Google Sheets, Zapier, and DocuGenerate.</p> <p><a href="https://www.google.com/sheets/about/" target="_blank" rel="nofollow noopener">Google Sheets</a> is a versatile tool for managing and organizing data. <a href="https://zapier.com/" target="_blank" rel="nofollow noopener">Zapier</a> is an automation platform that connects your favorite apps, enabling them to work together seamlessly. <a href="https://www.docugenerate.com/">DocuGenerate</a> specializes in automated document generation, allowing you to create documents like invoices, contracts, and more.</p> <p>This automation setup can be particularly useful in various scenarios:</p> <ul> <li><strong>Sales and Invoicing</strong>: Automatically generate invoices from sales data stored in Google Sheets.</li> <li><strong>HR and Recruitment</strong>: Create employment contracts or offer letters from candidate data.</li> <li><strong>Legal Documentation</strong>: Produce legal agreements or contracts from structured data.</li> </ul> <p>So let’s dive right in!</p> <h2 id="google-sheets-data">Importing the Data in Google Sheets</h2> <p>We’ll build a scenario where we generate contracts from data stored in Google Sheets. We will use the <a href="https://www.docugenerate.com/assets/templates/contracts/accounting/Accounting Contract.zip">Accounting Contract</a> asset from the DocuGenerate Template Library, which includes a Word template for the contract and a sample dataset in Excel format.</p> <p>First, we need to import our Excel file with the sample data into Google Sheets. Open Google Sheets, create a new spreadsheet, and click on <strong>File -&gt; Import</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/new-sheet-import.png" alt="Select the File -&gt; Import option in Google Sheets"/></p> <p>Choose the <strong>Upload</strong> tab, then select and upload the <a href="https://www.docugenerate.com/assets/templates/contracts/accounting/Accounting Contract.xlsx">Accounting Contract.xlsx</a> Excel file.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/import-excel-to-google-sheet.gif" alt="Import Excel file in Google Sheets"/></p> <p>After the upload is complete, you should see your data in Google Sheets. Give the spreadsheet a name, like <strong>Accounting Contract</strong> for example, and you’re done!</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/accounting-spreadsheet-v2.png" alt="New Google Sheet "/></p> <h2 id="google-sheets-trigger">Setting Up the Google Sheets Trigger</h2> <p>Start by creating a new Zap and selecting the Google Sheets app as the starting point. Then, add the <strong>New or Updated Spreadsheet Row in Google Sheets</strong> trigger in Zapier.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/google-sheets-event.png" alt="New or Updated Spreadsheet Row in Google Sheets Event"/></p> <p>Next, connect your Google account that was used to import the data in Google Sheets. On the <strong>Trigger</strong> tab select the Spreadsheet and Worksheet corresponding to your Google Sheets document:</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/google-sheets-trigger.png" alt="Set up the trigger on the Google Sheets App"/></p> <p>Finally, on the <strong>Test</strong> step, you can verify that the connection is successful. The listing shows the three most recent records of your data. Select one of them and click on <strong>Continue with selected record</strong> to complete this step. The selected record will be used when setting up the other apps in the Zap to preview the data that will be coming from the Google Sheets app.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/google-sheets-test.png" alt="Test the Google Sheets App in the Zap"/></p> <h2 id="create-template">Creating the Template in DocuGenerate</h2> <p>Log in to DocuGenerate and create a new template using the <a href="https://www.docugenerate.com/assets/templates/contracts/accounting/Accounting Contract.docx">Accounting Contract.docx</a> sample file. Follow the guide in our <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">Help Center</a> if you need help. Your screen should look something like this:</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/accounting-contract-template.png" alt="New template in DocuGenerate"/></p> <h2 id="generate-document-action">Setting Up the “Generate Document” Action</h2> <p>Search for the <a href="https://zapier.com/apps/docugenerate/integrations" target="_blank" rel="noopener">DocuGenerate app</a> and add it to the Zap. Then select the <strong>Generate Document</strong> action. For more information about connecting Zapier with DocuGenerate, check out the guide in our <a href="https://www.docugenerate.com/help/articles/automate-document-generation-with-zapier/">Help Center</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/generate-document-action-v3.png" alt="Add the Generate Document Action to the Zap"/></p> <p>After connecting your DocuGenerate account to Zapier, you need to configure the call parameters in the <strong>Action</strong> tab. From the drop-down list, select the <strong>Accounting Contract</strong> template created in the <a href="#create-template">previous step</a>. Specify a <strong>Name</strong>, like <code class="language-plaintext highlighter-rouge">Contract for [Client Name]</code>, where <code class="language-plaintext highlighter-rouge">[Client Name]</code> is a dynamic field that will be inserted by Zapier during the API call to DocuGenerate. For the format, you can choose <strong>PDF</strong>.</p> <p>When selecting the template, the <strong>Data</strong> parameter will be pre-populated with an empty JSON object corresponding to the merge tags contained in the template. For each key, you’ll need to map the values from the Google Sheet app. Make sure to keep the double quotes surrounding each value, otherwise the JSON will be invalid and the API call will fail.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/generate-document-params-v2.png" alt="Set up the Generate Document Action parameters"/></p> <p>Take for example the first key, this is the correct way to do it:<br/> <code class="language-plaintext highlighter-rouge">"Effective Date": "1. Effective Date 12/13/2023"</code><br/> This on the other hand, would be incorrect because the double quotes are missing:<br/> <code class="language-plaintext highlighter-rouge">"Effective Date": 1. Effective Date 12/13/2023</code></p> <p>Finally, after the mapping is complete, you can go ahead and test this step. If everything is set up correctly, then the API call will be successful, and you will see the JSON response coming from DocuGenerate’s API:</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/generate-document-test-v2.png" alt="Test the Generate Document Action"/></p> <p>You’re all done! Click on the <strong>Publish</strong> button to save and publish your Zap.</p> <h2 id="multi-line">Going Further: Handle Multi-Line Data Values</h2> <p>Sometimes the values from the data source, in this case, the Google Sheet, may be multi-line strings. Although this is usually not the case, as most string values are single-lined. But it’s best to handle this edge case to avoid issues while running the Zap.</p> <p>For example, consider the same dataset, but with the <code class="language-plaintext highlighter-rouge">Client Address</code> in the last row changed to a multi-line value:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>83902 Karstens Junction
Suite C
</code></pre></div></div> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/multi-line-data-v2.png" alt="Data set with mulit-line values"/></p> <p>If we were to test the Zap again using this updated record, the Generate Document step would fail with the following error:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>data must be a valid JSON object or array. Bad control character in string literal in 
JSON at position 199 while parsing near "...02 Karstens Junction Suite C", "End Da..."
</code></pre></div></div> <p>And this is how it would look in the Zapier interface:</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/invalid-json-error-v2.png" alt="Generate Document error : data must be a valid JSON object or array"/></p> <p>To fix this issue we need to add a new step to our Zap to format the <code class="language-plaintext highlighter-rouge">Client Address</code> value. Add the app <a href="https://zapier.com/apps/formatter/help" target="_blank" rel="nofollow noopener">Formatter by Zapier</a> before the <strong>Generate Document</strong> step and choose the <strong>Text</strong> event.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/text-formatter-action.png" alt="Setting up the Text Formatter by Zapier"/></p> <p>Then select the <strong>Replace</strong> action and for the input choose the <code class="language-plaintext highlighter-rouge">Client Address</code> field. For the <strong>Find</strong> value input <code class="language-plaintext highlighter-rouge">[:newline:]</code> which matches newline characters. And for the <strong>Replace</strong> value input the <code class="language-plaintext highlighter-rouge">\n</code>. This will replace all the carriage returns in the text with the <code class="language-plaintext highlighter-rouge">\n</code> character.</p> <p>For more info about finding, replacing, or splitting special characters, check out this <a href="https://help.zapier.com/hc/en-us/articles/8496278339725-Find-and-replace-values-in-your-Zaps" target="_blank" rel="nofollow noopener">detailed article</a> on Zapier. This guide provides comprehensive instructions and examples on how to handle various text formatting tasks in Zapier, ensuring your automation workflows run smoothly even when dealing with complex text data.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/text-formatter-params.png" alt="Find and replace new line characters with the \n character"/></p> <p>Moving on to the <strong>Test</strong> step. As you can see, the value is successfully replaced by:</p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>83902 Karstens Junction\nSuite C
</code></pre></div></div> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/text-formatter-test.gif" alt="Test the Text Formatter action successfully"/></p> <p>Finally, we need to update the <strong>Generate Document</strong> action to use the formatted value for the <code class="language-plaintext highlighter-rouge">Client Address</code> field. This way, we don’t use the value from the Google Sheet directly anymore but the output from the <strong>Formatter</strong> step, which fixes the new lines issue.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/generate-document-update.png" alt="Use the formatted value in the Generate Document action"/></p> <p>We only did the formatting for one field, but you can add additional formatting steps if other values from the data set are susceptible to being multi-line strings.</p> <p>With this change, when we test the final step, the document generation doesn’t fail anymore, and the document is generated successfully.</p> <p><img src="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/generate-document-success.gif" alt="Generate the document without errors"/></p> <h2 id="conclusion">Conclusion</h2> <p>Automating document generation using Google Sheets, Zapier, and DocuGenerate can significantly streamline your workflow. This setup not only saves time but also reduces errors and ensures consistency across your documents. Whether you’re generating invoices, contracts, or certificates, this powerful automation can handle it all.</p> <p>By integrating these tools, you can focus on more critical tasks while your documents are created seamlessly in the background. We encourage you to try this setup and explore the possibilities of what you can automate with DocuGenerate and Zapier, or any of our other <a href="https://www.docugenerate.com/integrations/">no-code integrations</a>.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/templates/contracts/accounting/Accounting Contract.docx">Accounting Contract</a> Word template and <a href="https://www.docugenerate.com/assets/templates/contracts/accounting/Accounting Contract.xlsx">Excel file</a> containing the data used in this tutorial.</li> <li><a href="https://help.zapier.com/hc/en-us/articles/8496278339725-Find-and-replace-values-in-your-Zaps" target="_blank" rel="nofollow noopener">Modify text formats in Zaps</a> article on Zapier referenced in the <a href="#multi-line">Handle Multi-Line Data Values</a> section.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Contracts"/> <category term="Zapier"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how to automate contract generation using Zapier, Google Sheets, and DocuGenerate. This guide walks you through setting up a workflow to convert spreadsheet rows into formatted documents, with special attention to handling multi-line data values.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/008-zapier-google-sheets/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Generate Documents from Airtable using a Scripting Extension</title> <link href="https://www.docugenerate.com/blog/generate-documents-from-airtable-using-a-scripting-extension/" rel="alternate" type="text/html" title="Generate Documents from Airtable using a Scripting Extension"/> <published>2024-04-19T00:00:00+00:00</published> <updated>2024-04-19T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/generate-documents-from-airtable-using-a-scripting-extension</id> <content type="html" xml:base="https://www.docugenerate.com/blog/generate-documents-from-airtable-using-a-scripting-extension/"><![CDATA[<h2 id="getting-started-with-airtable">Getting Started with Airtable</h2> <p>In today’s work processes, managers sometimes have to deal with a multitude of tools, which reduces productivity and increases the risk of errors when transferring data from one tool to another. So it’s in their interest to find the right combination of tools, for a straightforward and efficient process.</p> <p>That is why in this article we will create a convenient workflow allowing you to automatically generate documents from your Airtable interface, without having to transfer your data from one application to another. Furthermore, you will be using a Word template, which can be easily edited with the text processing software that you’re most familiar with.</p> <p>Here are the services needed to create this workflow :</p> <ol> <li> <p><a href="https://airtable.com/" target="_blank" rel="nofollow noopener">Airtable</a>: is a no-code collaboration platform allowing users to interact simply with a database using, among others, a spreadsheet-like interface, web forms for input, and user-friendly data reports and data visualization interfaces for output.</p> </li> <li> <p><a href="https://www.docugenerate.com">DocuGenerate</a>: is a web app and API designed for generating documents from Word templates and JSON data, by replacing merge tags in templates with dynamic data.</p> </li> </ol> <p>This article is mainly intended for people already having a minimal knowledge of Airtable’s basic features. We won’t go into detail about its functionalities, and will only focus on the aspects necessary for setting up our process.</p> <h2 id="airtable-page-designer">Using Airtable’s Page Designer</h2> <p>You could use Airtable’s <a href="https://support.airtable.com/docs/page-designer-extension-overview" target="_blank" rel="nofollow noopener">page designer extension</a>, to create your own custom template for invoices, business cards, catalogs, and more — all using the data directly from your records. When you’re done making everything look beautiful, you can print out your records or turn them into PDFs.</p> <p><img src="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/page-designer-v2.png" alt="Page designer extension"/></p> <p>There are a few other limitations to consider for our use case:</p> <ul> <li>The files are generated one by one.</li> <li>It can only generate PDF files.</li> <li>It cannot store the generated files in your Airtable database.</li> </ul> <p>The page designer layout editor is not that bad, but you will never be as productive as with your usual word processing software. Also, you will have to start from scratch again if you want to create a new layout in another base.</p> <h2 id="creating-the-word-template">Creating the Word Template</h2> <p>Given the limitations of the page designer, we will be using a Word template instead. A template is a document that contains <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a>, which are placeholders intended to be replaced with dynamic data. They allow you to easily create documents that are visually very similar, but differ based on the data set that is used to populate the placeholders.</p> <p>Our template is a <a href="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/Certificate of Completion.docx">slightly modified version</a> of the Certificate of Completion template from the <a href="https://www.docugenerate.com/templates/#certificates">Template Library</a>. The main changes were the <strong>addition of a profile photo</strong> to highlight our <a href="https://www.docugenerate.com/help/articles/how-to-add-images-to-a-template/">image resizing</a> feature, and the <strong>integration of a skills list</strong>, to demonstrate using Airtable’s <a href="https://support.airtable.com/docs/linked-record-field" target="_blank" rel="nofollow noopener">linked record fields</a> together with DocuGenerate’s <a href="https://www.docugenerate.com/help/articles/how-to-add-lists-to-a-template/">list syntax</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/Certificate of Completion.png" alt="Certificate of Completion template"/></p> <p>This template includes the following tags: <code class="language-plaintext highlighter-rouge">{Company_Name}</code>, <code class="language-plaintext highlighter-rouge">{First_Name}</code>, <code class="language-plaintext highlighter-rouge">{Last_Name}</code>, <code class="language-plaintext highlighter-rouge">{Program}</code>, <code class="language-plaintext highlighter-rouge">{Photo}</code>, <code class="language-plaintext highlighter-rouge">{Start_Date}</code>, <code class="language-plaintext highlighter-rouge">{End_Date}</code>, <code class="language-plaintext highlighter-rouge">{Certificate_Date}</code> and <code class="language-plaintext highlighter-rouge">{Skills}</code> (using the following syntax to create a skills list):</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{#Skills}
- {.}
{/Skills}
</code></pre></div></div> <p><strong>💡 Going further</strong> The <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/">enhanced syntax</a> is enabled for this template to allow the image resizing ability. You should avoid having <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/#whitespace-limitation">whitespaces</a> in your tag names in order to use it. That is why tag names composed of two words use an underscore between them.</p> <h2 id="designing-the-database">Designing the Database</h2> <p>For our example, we started with the template and have then created an appropriate database structure. Of course, a real process will unfold in the other way: as your data will probably already be consistent, you will create a template matching your data and your base structure in order to generate the documents you need to, and not a database structure according to your template.</p> <p>Here, our base includes three tables :</p> <ul> <li> <p><strong>Skills</strong> table contains the skills acquired in the different programs, ordered by category.</p> </li> <li> <p><strong>Programs</strong> table contains data about each program : name, start date, end date, and the acquired skills (field linked to the <strong>Skills</strong> table).</p> </li> <li> <p><strong>Attendees</strong> table contains data about each attendee of the different programs, such as first name, last name and photo, and also a field link to the pursued program from which several lookup fields are created to access the program’s data directly in the <strong>Attendees</strong> table. This is needed as the script used to generate documents currently allows <strong>one</strong> <strong>single table selection</strong>, so every data has to be present in this table.</p> </li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/base-structure.png" alt="Full base structure"/></p> <p>Please note that the <strong>certificate date</strong> needed in the template isn’t stored in the data. Don’t worry about that, it will be populated with <a href="#generating-and-storing-documents">today’s date</a> when the document is generated.</p> <p>If you want to see what our base looks like or start fiddling with it, you can simply explore the <a href="https://airtable.com/appLSLnJfZrkdAqz8/shruEBCW3StTQjxIk/tblej46yoReMAFar1/viw3bonO9CVF4TPj0" target="_blank" rel="noopener">DocuGenerate script training data</a>.</p> <h2 id="populating-the-database">Populating the Database</h2> <p>Our base is already filled with data allowing to test our workflow, but in an actual process you would need a mechanism to collect this data. To achieve this goal, one of the easiest way is to create forms that users can fill directly by themselves.</p> <p>A form is basically a web page that you will make accessible to anyone, with several input fields linked to your table’s fields, so filling the form will create a new record in your table. For example, the process for creating a form for the <strong>Attendees</strong> table is pretty straightforward:</p> <ul> <li><strong>Create a new form</strong> in the Views sidebar.</li> <li><strong>Upload a logo</strong> and/or a cover image for your form.</li> <li><strong>Choose which fields</strong> you want the user to fill in.</li> <li><strong>For each field</strong> specify if it’s required, then add a title and a description.</li> <li><strong>Publish your form</strong> in order to get a public URL to share.</li> </ul> <p><img src="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/create-form.gif" alt="Creating a form"/></p> <p><strong>💡 Going further</strong> To learn more about building and sharing forms in Airtable, please refer to their <a href="https://support.airtable.com/docs/building-and-sharing-forms-in-airtable" target="_blank" rel="nofollow noopener">official documentation</a>.</p> <h2 id="setting-up-scripting-extension">Setting up the Scripting Extension</h2> <p>Now that our template and our base are ready, we will set up the script used to generate the documents. For that, you will need to add a <a href="https://support.airtable.com/docs/en/scripting-extension-overview" target="_blank" rel="nofollow noopener">Scripting Extension</a> in one of your dashboards. Please remember that <strong>extensions are only available in paid plans</strong>.</p> <p><img src="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/add-scripting-extension.png" alt="Add scripting extension"/></p> <p>Next you’ll have to copy this <a href="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/docugenerate-script.txt" target="_blank">JavaScript code</a> and paste it in the scripting extension:</p> <div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Click the "gear" icon in the top right to view settings</span>
<span class="kd">const</span> <span class="nx">config</span> <span class="o">=</span> <span class="nx">input</span><span class="p">.</span><span class="nf">config</span><span class="p">({</span>
    <span class="na">title</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Generate Document</span><span class="dl">'</span><span class="p">,</span>
    <span class="na">description</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Automate document generation using DocuGenerate</span><span class="dl">'</span><span class="p">,</span>
    <span class="na">items</span><span class="p">:</span> <span class="p">[</span>
        <span class="nx">input</span><span class="p">.</span><span class="nx">config</span><span class="p">.</span><span class="nf">text</span><span class="p">(</span><span class="dl">'</span><span class="s1">api_key</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span>
            <span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">API Key</span><span class="dl">'</span><span class="p">,</span>
             <span class="na">description</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Get your unique key from the Settings page in DocuGenerate</span><span class="dl">'</span>
        <span class="p">}),</span>
        <span class="nx">input</span><span class="p">.</span><span class="nx">config</span><span class="p">.</span><span class="nf">text</span><span class="p">(</span><span class="dl">'</span><span class="s1">template_id</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span>
            <span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Template ID</span><span class="dl">'</span><span class="p">,</span>
            <span class="na">description</span><span class="p">:</span> <span class="dl">"</span><span class="s2">ID of the template to use for generating the document</span><span class="dl">"</span>
        <span class="p">}),</span>
        <span class="nx">input</span><span class="p">.</span><span class="nx">config</span><span class="p">.</span><span class="nf">table</span><span class="p">(</span><span class="dl">'</span><span class="s1">table</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span>
            <span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Table</span><span class="dl">'</span><span class="p">,</span>
            <span class="na">description</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Source table for your records</span><span class="dl">'</span>
        <span class="p">}),</span>
        <span class="nx">input</span><span class="p">.</span><span class="nx">config</span><span class="p">.</span><span class="nf">field</span><span class="p">(</span><span class="dl">'</span><span class="s1">storage_field</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span>
            <span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Storage</span><span class="dl">'</span><span class="p">,</span>
            <span class="na">description</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Field for storing the generated documents (URL or Attachment)</span><span class="dl">'</span><span class="p">,</span>
            <span class="na">parentTable</span><span class="p">:</span> <span class="dl">'</span><span class="s1">table</span><span class="dl">'</span><span class="p">,</span>
        <span class="p">}),</span>
        <span class="nx">input</span><span class="p">.</span><span class="nx">config</span><span class="p">.</span><span class="nf">select</span><span class="p">(</span><span class="dl">'</span><span class="s1">output_format</span><span class="dl">'</span><span class="p">,</span> <span class="p">{</span>
            <span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Format</span><span class="dl">'</span><span class="p">,</span>
            <span class="na">description</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Output format of the generated documents</span><span class="dl">'</span><span class="p">,</span>
            <span class="na">options</span><span class="p">:</span> <span class="p">[</span>
                <span class="p">{</span><span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">PDF (.pdf)</span><span class="dl">'</span><span class="p">,</span> <span class="na">value</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.pdf</span><span class="dl">'</span><span class="p">},</span>
                <span class="p">{</span><span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Microsoft Word (.docx)</span><span class="dl">'</span><span class="p">,</span> <span class="na">value</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.docx</span><span class="dl">'</span><span class="p">},</span>
                <span class="p">{</span><span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Microsoft Word 2007 (.doc)</span><span class="dl">'</span><span class="p">,</span> <span class="na">value</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.doc</span><span class="dl">'</span><span class="p">},</span>
                <span class="p">{</span><span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">OpenDocument Format (.odt)</span><span class="dl">'</span><span class="p">,</span> <span class="na">value</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.odt</span><span class="dl">'</span><span class="p">},</span>
                <span class="p">{</span><span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">Plain Text (.txt)</span><span class="dl">'</span><span class="p">,</span> <span class="na">value</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.txt</span><span class="dl">'</span><span class="p">},</span>
                <span class="p">{</span><span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">HTML (.html)</span><span class="dl">'</span><span class="p">,</span> <span class="na">value</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.html</span><span class="dl">'</span><span class="p">},</span>
                <span class="p">{</span><span class="na">label</span><span class="p">:</span> <span class="dl">'</span><span class="s1">PNG (.png)</span><span class="dl">'</span><span class="p">,</span> <span class="na">value</span><span class="p">:</span> <span class="dl">'</span><span class="s1">.png</span><span class="dl">'</span><span class="p">}</span>
            <span class="p">]</span>
        <span class="p">})</span>
    <span class="p">]</span>
<span class="p">});</span>

<span class="c1">// Prompt the user to pick a record </span>
<span class="c1">// If this script is run from a button field, this will use the button's record instead</span>
<span class="kd">let</span> <span class="nx">record</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">input</span><span class="p">.</span><span class="nf">recordAsync</span><span class="p">(</span><span class="dl">'</span><span class="s1">Select a record to use</span><span class="dl">'</span><span class="p">,</span> <span class="nx">config</span><span class="p">.</span><span class="nx">table</span><span class="p">);</span>

<span class="k">if </span><span class="p">(</span><span class="nx">record</span><span class="p">)</span> <span class="p">{</span>
    <span class="c1">// Customize this section to handle the selected record</span>
    <span class="c1">// You can use record.getCellValue("Field name") to access cell values from the record</span>
    <span class="nx">output</span><span class="p">.</span><span class="nf">markdown</span><span class="p">(</span><span class="s2">`Generating document for **</span><span class="p">${</span><span class="nx">record</span><span class="p">.</span><span class="nx">name</span><span class="p">}</span><span class="s2">**`</span><span class="p">);</span>

    <span class="c1">// Get the program name</span>
    <span class="kd">const</span> <span class="nx">programsTable</span> <span class="o">=</span> <span class="nx">base</span><span class="p">.</span><span class="nf">getTable</span><span class="p">(</span><span class="dl">"</span><span class="s2">Programs</span><span class="dl">"</span><span class="p">);</span>
    <span class="kd">const</span> <span class="nx">programRecord</span> <span class="o">=</span> <span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">Program</span><span class="dl">"</span><span class="p">)[</span><span class="mi">0</span><span class="p">];</span>
    <span class="kd">const</span> <span class="nx">program</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">programsTable</span><span class="p">.</span><span class="nf">selectRecordAsync</span><span class="p">(</span><span class="nx">programRecord</span><span class="p">.</span><span class="nx">id</span><span class="p">);</span>

    <span class="c1">// Construct the data object based on the selected record's values</span>
    <span class="kd">const</span> <span class="nx">data</span> <span class="o">=</span> <span class="p">[{</span>
        <span class="dl">"</span><span class="s2">Company Name</span><span class="dl">"</span><span class="p">:</span> <span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">Company_Name</span><span class="dl">"</span><span class="p">),</span>
        <span class="dl">"</span><span class="s2">First Name</span><span class="dl">"</span><span class="p">:</span> <span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">First_Name</span><span class="dl">"</span><span class="p">),</span>
        <span class="dl">"</span><span class="s2">Last Name</span><span class="dl">"</span><span class="p">:</span> <span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">Last_Name</span><span class="dl">"</span><span class="p">),</span>
        <span class="dl">"</span><span class="s2">Program</span><span class="dl">"</span><span class="p">:</span> <span class="nx">program</span><span class="p">?.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">Name</span><span class="dl">"</span><span class="p">),</span>
        <span class="dl">"</span><span class="s2">Start Date</span><span class="dl">"</span><span class="p">:</span> <span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">Start_Date</span><span class="dl">"</span><span class="p">),</span>
        <span class="dl">"</span><span class="s2">End Date</span><span class="dl">"</span><span class="p">:</span> <span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">End_Date</span><span class="dl">"</span><span class="p">),</span>
        <span class="dl">"</span><span class="s2">Certificate Date</span><span class="dl">"</span><span class="p">:</span> <span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">End_Date</span><span class="dl">"</span><span class="p">)</span>
    <span class="p">}];</span>

    <span class="kd">const</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{</span>
        <span class="na">method</span><span class="p">:</span> <span class="dl">'</span><span class="s1">POST</span><span class="dl">'</span><span class="p">,</span>
        <span class="na">headers</span><span class="p">:</span> <span class="p">{</span>
            <span class="dl">'</span><span class="s1">Accept</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">application/json</span><span class="dl">'</span><span class="p">,</span>
            <span class="dl">'</span><span class="s1">Content-Type</span><span class="dl">'</span><span class="p">:</span> <span class="dl">'</span><span class="s1">application/json</span><span class="dl">'</span><span class="p">,</span>
            <span class="dl">'</span><span class="s1">Authorization</span><span class="dl">'</span><span class="p">:</span> <span class="nx">config</span><span class="p">.</span><span class="nx">api_key</span>
        <span class="p">},</span>
        <span class="na">body</span><span class="p">:</span> <span class="nx">JSON</span><span class="p">.</span><span class="nf">stringify</span><span class="p">({</span>
            <span class="na">template_id</span><span class="p">:</span> <span class="nx">config</span><span class="p">.</span><span class="nx">template_id</span><span class="p">,</span>
            <span class="na">name</span><span class="p">:</span> <span class="s2">`Certificate for </span><span class="p">${</span><span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">First_Name</span><span class="dl">"</span><span class="p">)}</span><span class="s2"> </span><span class="p">${</span><span class="nx">record</span><span class="p">.</span><span class="nf">getCellValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">Last_Name</span><span class="dl">"</span><span class="p">)}</span><span class="s2">`</span><span class="p">,</span>
            <span class="na">output_format</span><span class="p">:</span> <span class="nx">config</span><span class="p">.</span><span class="nx">output_format</span><span class="p">,</span>
            <span class="na">data</span><span class="p">:</span> <span class="nx">data</span>
        <span class="p">})</span>
    <span class="p">};</span>

    <span class="kd">let</span> <span class="nx">status</span><span class="p">;</span>
    <span class="kd">const</span> <span class="nx">response</span> <span class="o">=</span> <span class="k">await</span> <span class="nf">fetch</span><span class="p">(</span><span class="dl">'</span><span class="s1">https://api.docugenerate.com/v1/document</span><span class="dl">'</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span>
        <span class="p">.</span><span class="nf">then</span><span class="p">(</span><span class="nx">response</span> <span class="o">=&gt;</span> <span class="p">{</span>
            <span class="nx">status</span> <span class="o">=</span> <span class="nx">response</span><span class="p">.</span><span class="nx">status</span><span class="p">;</span>
            <span class="k">return</span> <span class="nx">response</span><span class="p">.</span><span class="nf">json</span><span class="p">();</span>
        <span class="p">})</span>
        <span class="p">.</span><span class="k">catch</span><span class="p">(</span><span class="nx">err</span> <span class="o">=&gt;</span> <span class="nx">output</span><span class="p">.</span><span class="nf">text</span><span class="p">(</span><span class="nx">err</span><span class="p">));</span>

    <span class="k">if </span><span class="p">(</span><span class="nx">status</span> <span class="o">!==</span> <span class="mi">201</span><span class="p">)</span> <span class="p">{</span>
        <span class="nx">output</span><span class="p">.</span><span class="nf">markdown</span><span class="p">(</span><span class="dl">'</span><span class="s1">Error generating document: </span><span class="dl">'</span> <span class="o">+</span> <span class="nx">response</span><span class="p">.</span><span class="nx">message</span><span class="p">);</span>
    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
        <span class="kd">const</span> <span class="nx">storageFieldValue</span> <span class="o">=</span> <span class="p">(</span><span class="nx">config</span><span class="p">.</span><span class="nx">storage_field</span><span class="p">.</span><span class="nx">type</span> <span class="o">===</span> <span class="dl">'</span><span class="s1">multipleAttachments</span><span class="dl">'</span><span class="p">)</span> <span class="p">?</span> <span class="p">[{</span><span class="na">url</span><span class="p">:</span> <span class="nx">response</span><span class="p">.</span><span class="nx">document_uri</span><span class="p">}]</span> <span class="p">:</span> <span class="nx">response</span><span class="p">.</span><span class="nx">document_uri</span><span class="p">;</span>
        <span class="k">await</span> <span class="nx">config</span><span class="p">.</span><span class="nx">table</span><span class="p">.</span><span class="nf">updateRecordsAsync</span><span class="p">([{</span>
            <span class="na">id</span><span class="p">:</span> <span class="nx">record</span><span class="p">.</span><span class="nx">id</span><span class="p">,</span>
            <span class="na">fields</span><span class="p">:</span> <span class="p">{[</span><span class="nx">config</span><span class="p">.</span><span class="nx">storage_field</span><span class="p">.</span><span class="nx">name</span><span class="p">]:</span> <span class="nx">storageFieldValue</span><span class="p">}</span>
        <span class="p">}]);</span>
        <span class="nx">output</span><span class="p">.</span><span class="nf">markdown</span><span class="p">(</span><span class="dl">'</span><span class="s1">Document generated successfully! 🎉</span><span class="dl">'</span><span class="p">);</span>
    <span class="p">}</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
    <span class="nx">output</span><span class="p">.</span><span class="nf">markdown</span><span class="p">(</span><span class="dl">'</span><span class="s1">No record was selected</span><span class="dl">'</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div></div> <p>If everything goes well, you should now be able to access the script’s settings page by clicking the gear icon that appears when hovering over the upper right corner of your extension. Do not hesitate to use the full-screen icon next to the settings icon, for better visibility.</p> <p><img src="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/extension-settings.png" alt="Extension settings"/></p> <p>Here are the available settings :</p> <ul> <li> <p><strong>API Key</strong>: your DocuGenerate API Key that you can get from your <a href="https://app.docugenerate.com/settings" target="_blank">settings page</a> once you’ve created your account. Simply <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">copy the API Key</a> to the clipboard by clicking on it.</p> </li> <li> <p><strong>Template ID</strong>: the ID of your template that <a href="https://www.docugenerate.com/help/articles/how-do-i-get-the-template-id/">you can copy</a> from your template’s page. Please note that it also appears directly in the URL of your template’s page, the URL being of form <code class="language-plaintext highlighter-rouge">https://app.docugenerate.com/templates/:template_id</code></p> </li> <li> <p><strong>Table</strong>: the table containing the records you will use to replace your template’s tags.</p> </li> <li> <p><strong>Storage</strong>: the field used to store the generated document. It can be either a URL field (which will store a link to the document) or a File type field (which will store the actual file).</p> </li> <li> <p><strong>Format</strong>: output format of the generated document. The options are <code class="language-plaintext highlighter-rouge">.docx</code>, <code class="language-plaintext highlighter-rouge">.pdf</code>, <code class="language-plaintext highlighter-rouge">.doc</code>, <code class="language-plaintext highlighter-rouge">.odt</code>, <code class="language-plaintext highlighter-rouge">.txt</code>, <code class="language-plaintext highlighter-rouge">.html</code>, or <code class="language-plaintext highlighter-rouge">.png</code>.</p> </li> </ul> <p>With all these parameters set, we are now ready to automate the process of document creation!</p> <h2 id="adding-the-generate-button">Adding the Generate Button</h2> <p>The <a href="#setting-up-scripting-extension">scripting extension</a> is waiting for the user to input a specific record to process. But in order to make things easier for the end-user, we want to generate the document simply by clicking on a button. For this to work, we’ll need to add a new <a href="https://support.airtable.com/docs/button-field" target="_blank" rel="nofollow noopener">Button Field</a>, that will be configured to run our script when it’s clicked. This way, the record from which the button was clicked is automatically selected for running the script.</p> <p><img src="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/edit-generate-button.png" alt="Add the Generate button"/></p> <h2 id="generating-and-storing-documents">Generating and Storing Documents</h2> <p>With everything set up, let’s see how the document generation process works. When you click the <strong>Generate</strong> button on any record, the script executes and performs several actions:</p> <ol> <li>It gathers all the necessary data from the current record.</li> <li>It sends that data to DocuGenerate’s API along with your template ID.</li> <li>DocuGenerate processes the request, replacing all merge tags with your data.</li> <li>The generated document is returned and automatically stored in your database.</li> </ol> <p>The result is a professional-looking certificate that’s ready to be shared with participants.</p> <p><img src="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/docugenerate-demo.gif" alt="Certificate generation"/></p> <h2 id="going-further-with-automations">Going Further with Airtable Automations</h2> <p>While our button-triggered script is already quite powerful, you can take document generation to the next level by integrating it with <a href="https://support.airtable.com/docs/getting-started-with-airtable-automations" target="_blank" rel="nofollow noopener">Airtable Automations</a>. This allows for completely hands-free document workflows that trigger based on specific conditions in your database.</p> <p>Here are some powerful automation scenarios you could implement:</p> <ul> <li> <p><strong>Automatic Certificate Generation</strong>: Generate certificates automatically when an attendee’s status changes to “ Completed” or when a program end date is reached, eliminating the need for manual button clicks.</p> </li> <li> <p><strong>Email Delivery</strong>: Send certificates directly to attendees via email as soon as they’re generated, creating a seamless experience for program participants.</p> </li> <li> <p><strong>Batch Processing</strong>: Set up weekly or monthly automations that generate certificates for all attendees who completed programs during that period.</p> </li> <li> <p><strong>Conditional Document Generation</strong>: Create different types of documents based on criteria like program type, achievement level, or geographic location.</p> </li> <li> <p><strong>Notification System</strong>: Notify program administrators when certificates have been generated and delivered, helping to track the process.</p> </li> </ul> <p>To set up these automations, you’ll need to adapt the scripting code we provided earlier into a “Run script” automation step. The core API integration will remain the same, but you’ll need to modify how records are selected and processed based on your trigger conditions.</p> <h2 id="conclusion">Conclusion</h2> <p>In this tutorial, we’ve shown how you can transform your Airtable database into a powerful document generation system using <a href="https://www.docugenerate.com/pdf-generation-api/">DocuGenerate’s API</a> and Airtable’s Scripting Extension. By combining these tools, you can generate professional documents directly from your Airtable data with a single click and store generated documents within your database for easy access and organization.</p> <p>While automation tools like this can dramatically improve your productivity, it’s important to remember that they should serve as process facilitators. Don’t get lost in complex automation development when a simpler approach might be more efficient! Recognizing this balance is key to creating truly effective workflows. Start with the basic implementation we’ve provided, and then gradually expand your automation as your needs grow and evolve.</p> <h3 id="resources">Resources</h3> <ul> <li><a href="https://airtable.com/appLSLnJfZrkdAqz8/shruEBCW3StTQjxIk/tblej46yoReMAFar1/viw3bonO9CVF4TPj0" target="_blank" rel="noopener">DocuGenerate Test Base</a> in Airtable, containing the Skills, Programs and Attendees tables.</li> <li><a href="https://github.com/basteks/airtable-docugenerate" target="_blank" rel="noopener">Airtable DocuGenerate</a> GitHub repository created by Benjamin Hatton that contains the initial version of Airtable scripts for generating documents using DocuGenerate’s API.</li> <li>All profile photos are royalty-free and come from <a href="https://pixabay.com/" target="_blank" rel="nofollow noopener">Pixabay</a>, the royalty-free images &amp; stock website.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/Certificate of Completion.docx">Certificate of Completion</a> template used in this tutorial.</li> <li>An example of <a href="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/Certificate of Completion.pdf" target="_blank">PDF Certificate</a> generated from Airtable data.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Certificates"/> <category term="Airtable"/> <category term="No-Code"/> <summary type="html"><![CDATA[Learn how DocuGenerate can automate document generation based on the data stored in your tables, allowing you to focus on the most valuable steps of your process. Follow our tutorial and create a no-code document generation workflow in Airtable.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/007-airtable-scripting-extension/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Top-Rated Affordable Contract Management Software by GetApp</title> <link href="https://www.docugenerate.com/blog/top-rated-affordable-contract-management-software-by-getapp/" rel="alternate" type="text/html" title="Top-Rated Affordable Contract Management Software by GetApp"/> <published>2024-04-16T00:00:00+00:00</published> <updated>2024-04-16T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/top-rated-affordable-contract-management-software-by-getapp</id> <content type="html" xml:base="https://www.docugenerate.com/blog/top-rated-affordable-contract-management-software-by-getapp/"><![CDATA[<h2 id="contract-management-software">Contract Management Software</h2> <p><a href="https://www.getapp.com/" target="_blank" rel="nofollow noopener">GetApp</a>, a company that helps businesses navigate the software buying journey, featured DocuGenerate in its <a href="https://www.getapp.com/resources/top-affordable-contract-management-software/" target="_blank" rel="nofollow noopener">“7 Top-Rated Affordable Contract Management Software”</a> list, which evaluates seven top-rated affordable contract management software solutions based on verified user reviews and pricing found on vendor websites.</p> <p>This recognition stands as a testament to the outstanding quality of our product and the unwavering dedication to providing a user-friendly and reliable solution that meets the diverse needs of our customers. Our team is committed to continuous improvement and innovation, ensuring that our users always have the best tools at their disposal.</p> <p><img src="https://www.docugenerate.com/assets/posts/010-getapp-top-rated-software/top-affordable-contract-management-software.png" alt="7 Top-Rated Affordable Contract Management Software"/></p> <h2 id="user-reviews">User Reviews</h2> <p><a href="https://www.getapp.com/resources/top-affordable-contract-management-software/#4-docugenerate" target="_blank" rel="nofollow noopener">DocuGenerate</a> stood among the top-rated products with a stellar rating of <a href="https://www.getapp.com/collaboration-software/a/docugenerate/reviews/" target="_blank" rel="nofollow noopener">4.8 out of 5</a>. As the report is based on real user reviews, we want to thank our esteemed users who love our product!</p> <p><img src="https://www.docugenerate.com/assets/posts/010-getapp-top-rated-software/docugenerate-getapp-snippet-v2.png" alt="DocuGenerate ratings on GetApp"/></p> <p>Here’s what users have said about our product:</p> <div class="ud-blog-quote"> <i class="lni lni-quotation"></i> <p> Customer service was amazing. They spoke to me like I was a real human and didn't have canned responses that made the conversation even more confusing. After I worked through my issue with customer service, working with the generated document was extremely easy. </p> <h6> Source: <a href="https://www.getapp.com/collaboration-software/a/docugenerate/reviews/9f16950ccb/" target="_blank"> GetApp </a> </h6> </div> <div class="ud-blog-quote"> <i class="lni lni-quotation"></i> <p> I needed an easy way to generate PDF files from JSON data, and DocuGenerate made it easy. The support was amazing too. I am not a developer, but I was able to implement this in a few hours using their API. </p> <h6> Source: <a href="https://www.getapp.com/collaboration-software/a/docugenerate/reviews/c31e5e9bc0/" target="_blank"> GetApp </a> </h6> </div> <div class="ud-blog-quote"> <i class="lni lni-quotation"></i> <p> Document templates are very easy to use, we haven't found a single use case they wouldn't support. The simple API made the integration of our product straightforward. </p> <h6> Source: <a href="https://www.getapp.com/collaboration-software/a/docugenerate/reviews/b6e61422f5/" target="_blank"> GetApp </a> </h6> </div> <p>Join us in shaping the future of Contract Management by reviewing DocuGenerate on GetApp <a href="https://reviews.getapp.com/products/new/f02a2815-804f-4a33-8e75-dae92de9d9a1" target="_blank" rel="nofollow noopener">here</a>.</p> <h2 id="about-us">About Us</h2> <p>DocuGenerate is a leading provider of automated document generation solutions. Our platform allows businesses to easily create PDF documents such as invoices, letters, contracts, agreements, and certificates using our intuitive web app or <a href="/developers/quickstart/">REST API</a>.</p> <p>By streamlining the document creation process, we help companies save time and resources while ensuring accuracy and consistency. With flexible <a href="/pricing/">pricing plans</a> and full API access, DocuGenerate caters to businesses of all sizes, from startups to large enterprises.</p> <h2 id="about-getapp">About GetApp</h2> <p>GetApp is the recommendation engine small businesses need to make the right software choice. With over 2 million verified user reviews, GetApp enables SMBs to achieve their mission by delivering the tailored, data-driven recommendations and insights needed to make informed software purchasing decisions. For more information, visit <a href="https://www.getapp.com/" target="_blank" rel="nofollow noopener">GetApp.com</a>.</p>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Contracts"/> <category term="Review"/> <category term="GetApp"/> <summary type="html"><![CDATA[DocuGenerate has been recognized by GetApp as one of the top-rated affordable contract management software. Our rating of 4.8 out of 5 reflects the quality of our product, establishing DocuGenerate as a leader in automated document generation solutions.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/010-getapp-top-rated-software/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/010-getapp-top-rated-software/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Use Tally and Make to Generate Reports based on Form Submission</title> <link href="https://www.docugenerate.com/blog/use-tally-and-make-to-generate-reports-based-on-form-submission/" rel="alternate" type="text/html" title="Use Tally and Make to Generate Reports based on Form Submission"/> <published>2024-03-16T00:00:00+00:00</published> <updated>2024-03-16T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/use-tally-and-make-to-generate-reports-based-on-form-submission</id> <content type="html" xml:base="https://www.docugenerate.com/blog/use-tally-and-make-to-generate-reports-based-on-form-submission/"><![CDATA[<h2 id="the-workflow-were-building">The Workflow we’re Building</h2> <p>In today’s fast-paced business world, <strong>automation is key</strong> to maximizing efficiency and accuracy. Imagine a scenario where your sales team needs to create reports after completing sales calls – this process can be time-consuming and error-prone if done manually. In this article, we’ll explore how you can leverage the power of Tally, Make, and DocuGenerate to <strong>automate the generation of reports</strong> based on form submissions. By combining these tools, you can enhance your workflow and ensure that your reports are consistently accurate and timely.</p> <p>At its core, the workflow we’re building involves a sales representative filling out a form with information about a sales call. This information includes details about the company, contact person, and the outcome of the call. After submitting the form, the system automatically generates a PDF report using a template configured in DocuGenerate. Let’s break down the key components of this workflow:</p> <ol> <li> <p><a href="https://tally.so/" target="_blank" rel="nofollow noopener">Tally</a>: Tally serves as the platform for creating the user-friendly form. It provides a user interface for designing rich forms with various fields. Additionally, Tally offers features beyond form creation, making it a versatile tool for gathering data seamlessly.</p> </li> <li> <p><a href="https://www.make.com/en?utm_source=docugenerate-app&amp;utm_medium=partner&amp;utm_campaign=docugenerate-app-partner-program" target="_blank" rel="nofollow noopener">Make</a>: Make (formerly known as Integromat) acts as the glue that connects Tally and DocuGenerate. Make allows you to create automation scenarios, or “scenarios,” that trigger actions based on specific events. In this case, Make listens for new form submissions on Tally and automatically calls the DocuGenerate API to generate reports.</p> </li> <li> <p><a href="https://www.docugenerate.com">DocuGenerate</a>: DocuGenerate is a web app and API designed for generating documents from templates and data. It offers the ability to replace merge tags in templates with data provided through API requests. This is crucial for dynamically populating report templates with accurate information.</p> </li> </ol> <h2 id="creating-the-report-template">Creating the Report Template</h2> <p>To kick off the process, you’ll need a <a href="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/Sales Call Report.docx">Sales Call Report</a> template in DocuGenerate. This template will serve as the blueprint for the generated reports. The template contains placeholders known as <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a>, which will be replaced with actual data when the document is generated.</p> <p>For instance, your template might include merge tags for various fields, such as <code class="language-plaintext highlighter-rouge">[city]</code>, <code class="language-plaintext highlighter-rouge">[state]</code>, <code class="language-plaintext highlighter-rouge">[zip]</code>, <code class="language-plaintext highlighter-rouge">[country]</code>, <code class="language-plaintext highlighter-rouge">[company_name]</code>, <code class="language-plaintext highlighter-rouge">[address]</code>, <code class="language-plaintext highlighter-rouge">[phone]</code>, <code class="language-plaintext highlighter-rouge">[email]</code>, <code class="language-plaintext highlighter-rouge">[project]</code>, <code class="language-plaintext highlighter-rouge">[date]</code>, <code class="language-plaintext highlighter-rouge">[author]</code>, <code class="language-plaintext highlighter-rouge">[representative_name]</code>, <code class="language-plaintext highlighter-rouge">[representative_title]</code>, <code class="language-plaintext highlighter-rouge">[receptivity]</code>, <code class="language-plaintext highlighter-rouge">[summary]</code> and <code class="language-plaintext highlighter-rouge">[action]</code>.</p> <p>These tags serve as placeholders that will be populated with the data submitted through the form. As you can see, they don’t <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/#whitespace-limitation">contain whitespaces</a>, which is a prerequisite if we want to add conditions and expressions later on to the template using the <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/">enhanced syntax</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/Sales Call Report.png" alt="Sales Call Report" class="desktop-width-75"/></p> <h2 id="designing-the-form-in-tally">Designing the Form in Tally</h2> <p>With the template in place, you’ll create a <strong>corresponding form in Tally</strong>. The form will collect the necessary information for generating the report. The form is split into two pages: one for gathering company information and the other for recording details about the call (who the contact person was, what’s the call summary and what are the action items.)</p> <p>Tally’s <strong>intuitive interface makes</strong> it easy to design the form according to your requirements. You’ll map each form field to a specific merge tag in the template. This mapping ensures that the data collected through the form aligns perfectly with the placeholders in the report template.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/tally-form-submission-v2.gif" alt="Tally form submission"/></p> <p>Once the form is designed, you can find the <strong>Share Link</strong> for the form, which allows users to access and submit it. For the Sales Call Report you can access the form at this URL: <a href="https://tally.so/r/n99oAQ" target="_blank" rel="nofollow noopener">https://tally.so/r/n99oAQ</a></p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/tally-share-form.png" alt="Tally share link" class="desktop-width-75"/></p> <h2 id="connecting-tally-with-make">Connecting Tally with Make</h2> <p>Integrating Tally and Make is a crucial step in automating the workflow. This integration enables Make to monitor new form submissions and trigger subsequent actions. You can find useful how-to guides about connecting the two on the <a href="https://tally.so/help/integromat-integration" target="_blank" rel="nofollow noopener">Tally help center</a> or on the <a href="https://www.make.com/en/help/app/tally" target="_blank" rel="nofollow noopener">Make help center</a>.</p> <p>To start, click on the <strong>Plus</strong> button and search for <strong>Tally</strong> application, then click on it:</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-new-scenario-tally.png" alt="Add Tally to a Make scenario"/></p> <p>Then select the <strong>Watch New Responses</strong> trigger, which is executed whenever a new form response is submitted.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/tally-watch-new-responses.png" alt="Watch new response from Tally"/></p> <p>The following video show how connecting Make with Tally works:<br/> 1. Click on <strong>Create a webhook</strong><br/> 2. Then click on <strong>Create a connection</strong><br/> 3. A pop-up window will appear - you need to click on <strong>Accept</strong> to allow Make to access your Tally account 4. And finally you’ll need to select the <strong>Sales Call Report</strong> form from the lists of available Tally forms</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/create-tally-connection.gif" alt="Connect Tally with Make"/></p> <p>You can see the assigned <strong>webhook URL</strong> in Make. A webhook is a mechanism that allows one application (Tally) to send data to another application (Make) in real-time. In this case, Tally sends a webhook to Make every time a new form response is received.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/tally-webhook-in-make.png" alt="Make new response webhook"/></p> <p>Once the connection is established, you will see on the form’s <strong>Integration</strong> tab in Tally the same webhook URL as in Make, allowing you to confirm that everything is set up correctly.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/tally-webhook-to-make.png" alt="Tally webhook integration to Make"/></p> <h2 id="connecting-docugenerate-with-make">Connecting DocuGenerate with Make</h2> <p>With the Tally-Make connection in place, it’s time to integrate <strong>DocuGenerate into the workflow</strong>. Make’s flexibility allows you to add modules to the scenario, and in this case, you’ll add an HTTP module to call the DocuGenerate API and create the report.</p> <p>Configuring the <strong>HTTP module</strong> involves specifying the API endpoint for DocuGenerate. Additionally, you’ll need to provide authorization using an API key, which can be obtained from the DocuGenerate settings page. The API key is essential for secure communication between Make and DocuGenerate.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-add-http.png" alt="Add HTTP module on Make"/></p> <p>First, select the option <strong>Make an API Key Auth request</strong>. This will send as HTTPS request to a specified URL that requires API Key Auth authorization and processes the response.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-api-key-auth-request.png" alt="Make an API Key Auth request"/></p> <p>Next click on the <strong>Create a keychain</strong> in the <strong>Credentials</strong> section. This will open a dialog for adding a new keychain.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-create-keychain.png" alt="Create a keychain"/></p> <p>You need to give a <strong>Name</strong> to the new keychain, like <code class="language-plaintext highlighter-rouge">DocuGenerate API Key</code> for example. For the <strong>Key</strong> value you’ll need to enter your API Key that you can find on DocuGenerate’s <a href="https://www.docugenerate.com/help/articles/where-can-i-find-my-api-key/">Settings page</a>. For the <strong>API Key placement</strong> you can leave the default value <code class="language-plaintext highlighter-rouge">In the header</code>. And finally for the <strong>API Key parameter name</strong>, you’ll need to enter <code class="language-plaintext highlighter-rouge">Authorization</code> like it’s specified on the <a href="https://api.docugenerate.com/" target="_blank">API Reference</a> page.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-docugenerate-api-key.png" alt="Add new keychain dialog"/></p> <p>After configuring the <strong>Credentials</strong> section, you’ll need to specify the API endpoint that will be called on DocuGenerate. Enter the following values for the concerned fields:<br/> 1. <strong>URL</strong> = <code class="language-plaintext highlighter-rouge">https://api.docugenerate.com/v1/document</code><br/> 2. <strong>Method</strong> = <code class="language-plaintext highlighter-rouge">POST</code><br/> 3. <strong>Body type</strong> = <code class="language-plaintext highlighter-rouge">Multipart/form-data</code></p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-docugenerate-api-call.png" alt="HTTP endpoint configuration"/></p> <p>The next part is configuring the fields for the HTTP request. The complete list of possible parameters for the <strong>Create Document</strong> endpoint can be found on the <a href="https://api.docugenerate.com/#/Document/generateDocument" target="_blank">API Reference</a> page. For the purpose of this tutorial, we’ll be using only the <strong>template_id</strong>, <strong>output_format</strong> and <strong>data</strong> parameters.</p> <p>First, for the <strong>template_id</strong> field we’ll need to enter the ID of the template that we create earlier in the <a href="#creating-the-report-template">Creating the report template</a> section. Then for the <strong>output_format</strong> we’ll use <code class="language-plaintext highlighter-rouge">.pdf</code>, but any of the following values can also be used: <code class="language-plaintext highlighter-rouge">.docx</code>, <code class="language-plaintext highlighter-rouge">.pdf</code>, <code class="language-plaintext highlighter-rouge">.doc</code>, <code class="language-plaintext highlighter-rouge">.odt</code> or <code class="language-plaintext highlighter-rouge">.txt</code>.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-docugenerate-template-id.png" alt="Configure the template_id and output_format fields"/></p> <p>Next we’ll configure the <strong>data</strong> field for the HTTP request. Data that will be used to do the merge and generate the documents based on the template. The expected format is an array of JSON objects and a document will be generated for each object in the array by replacing the tags from the template with the object’s values.</p> <p>To get the expected format of the JSON object, you can try <a href="https://www.docugenerate.com/help/articles/generate-documents-from-json-data/">generating documents from JSON data</a> in the web app and copy the pre-filled JSON that contains empty value. You can then paste it in Make as the value for the data field.</p> <p>Once you have that, you can map the fields from the Tally response with the corresponding keys in the JSON object. Put your cursor in the <strong>”“</strong> value that you want to fill in with a form field, then click on one of the pink fields from the left panel to use it as the value. Make sure the fields from Tally are enclosed within quotes, as in <strong>”{{1.fields.City}}“</strong>, otherwise the data payload will not be formatted correctly and the call for generating a document will return a <code class="language-plaintext highlighter-rouge">400</code> error status code.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-field-mapping.gif" alt="Configure the data field"/></p> <p>This is how the data value should look after mapping all the fields to the corresponding JSON values. Make allows you to <strong>map the form fields</strong> to the corresponding merge tag values in the data payload, ensuring that the generated document accurately reflects the form input.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-docugenerate-data.png" alt="Data values mapped with the JSON"/></p> <h2 id="running-the-scenario-end-to-end">Running the Scenario End-to-End</h2> <p>Once both Tally and the HTTP module are set up in the Make scenario, you can <strong>activate the scenario’s scheduling</strong>. This scheduling ensures that the workflow runs automatically as soon as new form data arrives. The scenario can be extended with additional steps, such as sending an email with the generated document as an attachment, but for the purpose of this tutorial we’ll limit the scenario to these 2 actions.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/make-scheduling.png" alt="make-scheduling"/></p> <p>To test the workflow, fill out the <a href="https://tally.so/r/n99oAQ" target="_blank" rel="nofollow noopener">Tally form</a> with relevant information. The form has 2 pages that are displayed one after another, but the image below contains both pages together to see more easily the form values.</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/tally-form-submission-example.png" alt="Tally form submission example"/></p> <p>In the following video you can see how a new document <strong>appears automatically</strong> in DocuGenerate after the form is submitted. You can click on the <strong>View</strong> button to display the document and see that it contains the values entered in the form:</p> <p><img src="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/docugenerate-new-document.gif" alt="docugenerate-new-document"/></p> <p>After submission, the integration between Tally, Make, and DocuGenerate seamlessly generates the <strong>Sales Call Report</strong>. This report contains the data you entered in the form, replacing the merge tags in the template, as you can see in the generated PDF.</p> <object data="/assets/posts/006-make-tally-sales-call-report/Sales Call Report.pdf" type="application/pdf" class="inline-pdf-blog"></object> <h2 id="conclusion">Conclusion</h2> <p>In this article, we’ve explored a powerful workflow that harnesses the capabilities of Tally, Make, and DocuGenerate. By creating a <strong>streamlined process for generating reports</strong> based on form submissions, you can save time, reduce errors, and ensure consistent report quality.</p> <p>The integration of these tools opens up new possibilities for automating various tasks and enhancing your organization’s efficiency. Whether you’re a sales team aiming to streamline your reporting or a business looking to automate repetitive processes, this workflow demonstrates the potential of <a href="https://www.docugenerate.com/integrations/">no-code solutions</a> in today’s technology-driven landscape.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://tally.so/r/n99oAQ" target="_blank" rel="nofollow noopener">Tally form</a> for testing this workflow.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/Sales Call Report.docx">Sales Call Report</a> template used in this tutorial.</li> <li>An example of generated <a href="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/Sales Call Report.pdf" target="_blank">PDF Report</a>.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Reports"/> <category term="Make"/> <category term="No-Code"/> <summary type="html"><![CDATA[Discover how Tally, Make and DocuGenerate can automate report generation based on form submissions, enhancing workflow efficiency and accuracy. Explore the seamless integration of these tools to streamline your PDF generation process.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/cover-image-v3.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/006-make-tally-sales-call-report/cover-image-v3.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Personalize your Participation Certificates with Profile Pictures</title> <link href="https://www.docugenerate.com/blog/personalize-your-participation-certificates-with-profile-pictures/" rel="alternate" type="text/html" title="Personalize your Participation Certificates with Profile Pictures"/> <published>2024-02-02T00:00:00+00:00</published> <updated>2024-02-02T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/personalize-your-participation-certificates-with-profile-pictures</id> <content type="html" xml:base="https://www.docugenerate.com/blog/personalize-your-participation-certificates-with-profile-pictures/"><![CDATA[<h2 id="what-is-a-participation-certificate">What is a Participation Certificate?</h2> <p>Participation Certificates hold a significant place in the realm of recognition and appreciation. They serve as tangible tokens of acknowledgment, commemorating an individual’s active involvement in various events and activities. One such event that often warrants the distribution of these certificates is the <strong>Annual Team Building Day</strong>. This special occasion brings together employees in an atmosphere of camaraderie and skill-building, fostering a sense of unity and shared purpose within the organization.</p> <p>In the digital age, where personalization has become a hallmark of engaging experiences, the idea of incorporating employees’ <strong>profile pictures</strong> into participation certificates adds an innovative and meaningful touch. Unlike generic certificates, personalized ones adorned with individual profile pictures resonate on a deeper level. They celebrate not only attendance but also the unique contributions each individual brings to the table. It transforms what could be perceived as a routine administrative task into a thoughtful gesture of recognition, underscoring the importance of every team member’s involvement.</p> <h2 id="creating-the-perfect-template">Creating the Perfect Template</h2> <p>To implement this personalization, a well-designed certificate template is paramount. This template serves as the canvas onto which the profile pictures will be seamlessly integrated. Using dynamic <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a>, such as <code class="language-plaintext highlighter-rouge">{Company Name}</code>, <code class="language-plaintext highlighter-rouge">{Name}</code>, <code class="language-plaintext highlighter-rouge">{Date}</code> and <code class="language-plaintext highlighter-rouge">{%Photo}</code>, the template can be customized to display the name and profile picture of the respective employee. The result is a visually appealing certificate that captures both the essence of the event and the individual’s role within it.</p> <p>Notice that for inserting the profile picture the <code class="language-plaintext highlighter-rouge">{%Photo}</code> tag is used, as explained in the <a href="https://www.docugenerate.com/help/articles/how-to-add-images-to-a-template/">How to add images to a template</a> article. The image needs to be encoded in Base64 format, and the accepted image formats are PNG, JPG, and SVG.</p> <p>This is how the <a href="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/Certificate of Participation.docx">Certificate of Participation</a> template looks like. You can download it and try it yourself:</p> <p><img src="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/Certificate of Participation.png" alt="Certificate of Participation"/></p> <h2 id="encoding-images-as-base64">Encoding Images as Base64</h2> <p>Taking personalization a step further, the integration of Base64-encoded images offers a more dynamic and efficient approach. Base64 encoding converts images into text strings, eliminating the need for external image files while retaining visual quality.</p> <p>Online tools, like <a href="https://www.base64-image.de/" target="_blank" rel="nofollow noopener">Base64 Image Encoder</a> simplify this conversion process. Here’s how you can use this free tool to encode an image in Base64, then copy the encoded value to clipboard:</p> <p><img src="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/base64-image.gif" alt="Base64 conversion demo"/></p> <p>Additionally, developers can leverage programming languages like Python to accomplish this programmatically. The following Python code snippet showcases the conversion:</p> <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="n">base64</span>

<span class="k">with</span> <span class="nf">open</span><span class="p">(</span><span class="sh">"</span><span class="s">profile_picture.jpg</span><span class="sh">"</span><span class="p">,</span> <span class="sh">"</span><span class="s">rb</span><span class="sh">"</span><span class="p">)</span> <span class="k">as</span> <span class="n">image_file</span><span class="p">:</span>
    <span class="n">base64_image</span> <span class="o">=</span> <span class="n">base64</span><span class="p">.</span><span class="nf">b64encode</span><span class="p">(</span><span class="n">image_file</span><span class="p">.</span><span class="nf">read</span><span class="p">()).</span><span class="nf">decode</span><span class="p">(</span><span class="sh">"</span><span class="s">utf-8</span><span class="sh">"</span><span class="p">)</span>
</code></pre></div></div> <p>This approach streamlines the certificate generation process and ensures that each certificate is self-contained and easily shareable.</p> <h2 id="testing-the-certificate-for-one-person">Testing the Certificate for One Person</h2> <p>Before generating certificates for all participants, it’s prudent to create a test certificate to visualize the end result. DocuGenerate’s intuitive web app simplifies this process, allowing you to input the data by <a href="https://www.docugenerate.com/help/articles/generate-documents-by-filling-out-a-form/">filling out a form</a>, where each input field corresponds to a tag in your template. For the <code class="language-plaintext highlighter-rouge">Photo</code> field you can simply paste de Base64-encoded value copied at the <a href="#encoding-images-as-base64">previous step</a>.</p> <p>Doing a test run not only confirms the accuracy of the certificate, but also offers a preview of the personalized touch that each participant will receive.</p> <p><img src="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/one-certificate.gif" alt="Participation certificate with profile picture for one person"/></p> <h2 id="generating-certificates-for-all-participants">Generating Certificates for All Participants</h2> <p>For events with multiple participants, manually generating certificates can be a time-consuming endeavor. This is where the true <strong>power of automation</strong> shines through. By leveraging JSON data, certificates for all participants can be <a href="https://www.docugenerate.com/help/articles/generate-documents-from-json-data/">generated in one go</a>. This approach ensures consistency, accuracy, and efficiency in creating a personalized certificate for each participant.</p> <p>You can explore the <a href="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/certificate-data.json" target="_blank">JSON data</a> used for generating all the certificates. Please note that the JSON key for the <code class="language-plaintext highlighter-rouge">{%Photo}</code> tag is <code class="language-plaintext highlighter-rouge">"Photo"</code> and not <code class="language-plaintext highlighter-rouge">"%Photo"</code>, as the <code class="language-plaintext highlighter-rouge">%</code> character must not be included.</p> <p>Here’s a demo of how you can use DocuGenerate’s web app to generate all the certificates at once. In this example, a <a href="https://www.docugenerate.com/help/articles/combine-the-generated-documents-into-a-single-file/">single PDF file</a> containing all certificates is generated, but you can also choose in the merge options to generate a <a href="https://www.docugenerate.com/help/articles/generate-separate-documents-for-each-data-item/">separate PDF file</a> for each participant.</p> <p><img src="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/many-certificates.gif" alt="Participation certificate with profile picture for multiple persons"/></p> <p>The journey of personalization and automation leads to the creation of a <a href="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/Certificate of Participation Generated.pdf" target="_blank">PDF document</a> that encapsulates the spirit of the event and the contributions of each participant. These generated PDF certificates offer a polished and professional presentation, ready for distribution and display.</p> <object data="/assets/posts/005-participation-certificates-with-pictures/Certificate of Participation Generated.pdf" type="application/pdf" class="inline-pdf-blog"></object> <h2 id="conclusion">Conclusion</h2> <p>In conclusion, the integration of profile pictures into participation certificates through tools like DocuGenerate signifies a paradigm shift in how recognition and appreciation are extended. Beyond the traditional notion of certificates lies a canvas for personalization, where the individual’s identity is intricately woven into the fabric of the certificate.</p> <p>This blending of technology, recognition, and personal touch serves as a catalyst for motivation, fostering a stronger sense of belonging and camaraderie within the workplace. As organizations continue to evolve their approaches to employee engagement, personalized participation certificates stand as a testament to the power of acknowledging every individual’s contribution toward shared goals.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.base64-image.de/" target="_blank" rel="nofollow noopener">Base64 Image Encoder</a> tool used for converting images to Base64.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/Certificate of Participation.docx">Certificate of Participation</a> template used in this article.</li> <li>The sample <a href="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/certificate-data.json" target="_blank">JSON data</a> used for generating all the certificates.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/Certificate of Participation Generated.pdf" target="_blank">PDF Certificates</a> generated from the sample data.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Certificates"/> <category term="Images"/> <category term="Base64"/> <summary type="html"><![CDATA[Participation Certificates celebrating involvement like the Annual Team Building Day can be made more personal with profile pictures. Use the power of automation to generate certificates efficiently from a dynamic template and Base64-encoded pictures.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/005-participation-certificates-with-pictures/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">Create Employment Agreements with Variable Clauses</title> <link href="https://www.docugenerate.com/blog/create-employment-agreements-with-variable-clauses/" rel="alternate" type="text/html" title="Create Employment Agreements with Variable Clauses"/> <published>2024-01-30T00:00:00+00:00</published> <updated>2024-01-30T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/create-employment-agreements-with-variable-clauses</id> <content type="html" xml:base="https://www.docugenerate.com/blog/create-employment-agreements-with-variable-clauses/"><![CDATA[<h2 id="what-is-an-employment-agreement">What is an Employment Agreement?</h2> <p>An <strong>employment agreement</strong> is a legally binding document that establishes the terms and conditions of employment between an employer and an employee. It outlines the rights, responsibilities, and obligations of both parties, providing a framework for the employment relationship. Employment agreements typically cover <strong>essential aspects</strong> such as job title, duties and responsibilities, compensation, work hours, benefits, termination provisions, and confidentiality requirements.</p> <p>These agreements serve as a foundation for the employment relationship, providing clarity and protection for both employers and employees. They help establish expectations, rights, and obligations, ensuring that both parties understand their roles and responsibilities. Employment agreements also play a crucial role in <strong>protecting the interests of employers</strong>, as they can include provisions related to non-disclosure of confidential information, non-compete clauses, and intellectual property rights.</p> <p>In addition to addressing <strong>legal and practical considerations</strong>, employment agreements can foster a positive work environment by promoting clear communication, setting expectations, and preventing misunderstandings. They provide a comprehensive written record of the agreed-upon terms, which can help resolve disputes and disagreements that may arise during the course of employment.</p> <h2 id="creating-an-employment-agreement">Drafting an Employment Agreement</h2> <p>When it comes to drafting <strong>employment agreements</strong>, one of the most challenging aspects is creating a template that can accommodate <strong>variable clauses</strong>. Traditional templates often require manual editing for each agreement, which can be time-consuming and prone to errors.</p> <p>However, with the use of dynamic conditions, it’s possible to create flexible templates that can generate customized employment agreements efficiently. In this article, we will explore the process of creating employment agreements with variable clauses and how this approach can streamline the <a href="https://www.docugenerate.com/document-generation/">document generation</a> process.</p> <h2 id="creating-a-template-with-merge-tags">Creating a Template with Merge Tags</h2> <p>Creating a template for an employment agreement involves adding <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> that will be replaced with actual data when generating the final document. The template’s initial iteration includes merge tags such as <code class="language-plaintext highlighter-rouge">[employee_name]</code>, <code class="language-plaintext highlighter-rouge">[employer_name]</code>, <code class="language-plaintext highlighter-rouge">[job_title]</code>, and others.</p> <p>To make these merge tags easily recognizable during testing, they are highlighted in yellow within the template and the generated documents. However, it is generally recommended to remove the highlight once the template has been validated and is ready to be used.</p> <p>Handling variable clauses in the template is achieved through the use of <strong>checkboxes</strong>. When filling out the template, the individual responsible for data input can check the corresponding checkbox to select the desired option. In instances where only one option should be chosen, the mention <code class="language-plaintext highlighter-rouge">(Check one)</code> is included in the template to indicate the requirement.</p> <p>However, it is important to note that this approach results in the final document being <strong>longer than necessary</strong> since it includes all possible options for each clause. Additionally, from a privacy perspective, it may disclose more information than required, as employees might not need to know about certain clauses that could exist.</p> <p>You can view the initial version of the template below, which contains only the placeholders and checkboxes, or you can <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/Employment Agreement with Checkboxes.docx">download the template</a> to examine it in detail.</p> <object data="/assets/posts/004-dynamic-employment-agreements/Employment Agreement with Checkboxes.pdf" type="application/pdf" class="inline-pdf-blog"></object> <h2 id="adding-conditions-and-logical-expressions">Adding Conditions and Logical Expressions</h2> <p>While creating a template with multiple options for each clause is a good solution, an even better one is to use <a href="https://www.docugenerate.com/help/articles/how-to-add-conditions-to-a-template/">dynamic conditions</a> and <a href="https://www.docugenerate.com/help/articles/power-up-with-enhanced-syntax/">enhanced syntax</a> in the template. These techniques allow for the inclusion of conditions, negations, and logical expressions that can control which clauses to be included in the final document, instead of using checkboxes.</p> <p>As you can see in the <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/Employment Agreement with Conditions.docx">updated template</a> below, the conditions are highlighted in green to distinguish them within the template. When a document is generated the conditions are evaluated and the corresponding sections are either displayed or not in the final result. And of course, the condition tags don’t appear in the generated document, ensuring a clean and professional final agreement.</p> <p>Simpler conditions and negations like <code class="language-plaintext highlighter-rouge">[#full_time]</code><strong>full time</strong><code class="language-plaintext highlighter-rouge">[/][^full_time]</code><strong>part time</strong><code class="language-plaintext highlighter-rouge">[/]</code> can be used by default on any template. However, in order to use expressions like <code class="language-plaintext highlighter-rouge">[#payments_per_month == 1]</code> the <strong>enhanced syntax</strong> needs to be <a href="https://www.docugenerate.com/help/articles/how-do-i-enable-the-enhanced-syntax/">enabled</a>. By doing so it is also possible to use the “dot notation” in the template to reference object properties like <code class="language-plaintext highlighter-rouge">[#non_compete.option1]</code> and <code class="language-plaintext highlighter-rouge">[#non_compete.option2]</code>.</p> <p>Finally, please note that since the enhanced syntax is enabled for this template, you may observe that merge tags do not contain any whitespaces. It is important to ensure that there are no whitespaces within the merge tags, as this could affect the proper functioning of the document generation process.</p> <object data="/assets/posts/004-dynamic-employment-agreements/Employment Agreement with Conditions.pdf" type="application/pdf" class="inline-pdf-blog"></object> <h2 id="tailoring-the-data-set-to-match-the-template">Tailoring the Data Set to Match the Template</h2> <p>Creating dynamic employment agreements requires working with data that supports object notation. A suitable option for this is using <strong>JSON</strong> (JavaScript Object Notation), which is a lightweight data-interchange format that allows for the organized representation of structured data.</p> <p>Unlike Excel data, which relies on a tabular format, JSON provides a hierarchical structure that aligns well with the variable clauses found in employment agreements. This hierarchical structure allows for better organization and representation of the data, making it easier to handle and manipulate the variables within the agreement.</p> <p>To further enhance the organization and clarity of the JSON data, variables can be <strong>grouped using objects</strong>. Grouping similar variables under relevant object names improves readability and maintainability. For example, variables related to expenses can be grouped under an <code class="language-plaintext highlighter-rouge">expenses</code> object, while variables related to dispute resolution can be grouped under a <code class="language-plaintext highlighter-rouge">dispute</code> object. This approach facilitates the identification and management of specific clauses within the template.</p> <p>You can explore the <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/agreement-data.json" target="_blank">sample JSON data</a> provided, which contains values corresponding to the variables in the template. This will give you context on how the clauses and merge tags will be populated.</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
  </span><span class="p">{</span><span class="w">
    </span><span class="nl">"effective_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"March 29th, 2023"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"employee_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Jane Smith"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"employer_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Dream Marketing Inc."</span><span class="p">,</span><span class="w">
    </span><span class="nl">"job_title"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Marketing Specialist"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"full_time"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
    </span><span class="nl">"duties"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="s2">"Developing marketing campaigns"</span><span class="p">,</span><span class="w">
      </span><span class="s2">"Managing social media accounts"</span><span class="p">,</span><span class="w">
      </span><span class="s2">"Analyzing market trends"</span><span class="w">
    </span><span class="p">],</span><span class="w">
    </span><span class="nl">"fixed_term"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
    </span><span class="nl">"start_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"April 1st, 2023"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"end_date"</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w">
    </span><span class="nl">"probation_period"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w">
    </span><span class="nl">"salary_amount"</span><span class="p">:</span><span class="w"> </span><span class="mi">4000</span><span class="p">,</span><span class="w">
    </span><span class="nl">"salary_interval"</span><span class="p">:</span><span class="w"> </span><span class="s2">"month"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"payments_per_month"</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
    </span><span class="nl">"payment_day"</span><span class="p">:</span><span class="w"> </span><span class="s2">"15th"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"overtime"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="nl">"rate"</span><span class="p">:</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span><span class="w">
      </span><span class="nl">"threshold"</span><span class="p">:</span><span class="w"> </span><span class="mi">40</span><span class="p">,</span><span class="w">
      </span><span class="nl">"period"</span><span class="p">:</span><span class="w"> </span><span class="s2">"week"</span><span class="w">
    </span><span class="p">},</span><span class="w">
    </span><span class="nl">"expenses"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="nl">"entertainment"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"travel"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"meals"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"phone"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"other"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Miscellaneous"</span><span class="w">
    </span><span class="p">},</span><span class="w">
    </span><span class="nl">"work_address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"456 Park Avenue, Cityville, USA"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"work_hours"</span><span class="p">:</span><span class="w"> </span><span class="s2">"9 AM - 6 PM"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"work_days"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Monday to Friday"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"time_off_days"</span><span class="p">:</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span><span class="w">
    </span><span class="nl">"sick_leave_days"</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w">
    </span><span class="nl">"personal_leave_days"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w">
    </span><span class="nl">"other_benefits"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Health insurance, flexible spending account"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"disability_days"</span><span class="p">:</span><span class="w"> </span><span class="mi">60</span><span class="p">,</span><span class="w">
    </span><span class="nl">"disability_percentage"</span><span class="p">:</span><span class="w"> </span><span class="mi">75</span><span class="p">,</span><span class="w">
    </span><span class="nl">"non_compete_months"</span><span class="p">:</span><span class="w"> </span><span class="mi">6</span><span class="p">,</span><span class="w">
    </span><span class="nl">"non_compete"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="nl">"option1"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"option2"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"option3"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"option4"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"other"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Disclose marketing strategies, client lists, and upcoming product launches."</span><span class="w">
    </span><span class="p">},</span><span class="w">
    </span><span class="nl">"confidential_information"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
    </span><span class="nl">"employer_notice_days"</span><span class="p">:</span><span class="w"> </span><span class="mi">30</span><span class="p">,</span><span class="w">
    </span><span class="nl">"employee_notice_days"</span><span class="p">:</span><span class="w"> </span><span class="mi">30</span><span class="p">,</span><span class="w">
    </span><span class="nl">"severance_amount"</span><span class="p">:</span><span class="w"> </span><span class="mi">3000</span><span class="p">,</span><span class="w">
    </span><span class="nl">"governing_state"</span><span class="p">:</span><span class="w"> </span><span class="s2">"New York"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"dispute"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="nl">"court"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w">
      </span><span class="nl">"arbitration"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
      </span><span class="nl">"mediation"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w">
      </span><span class="nl">"mediation_arbitration"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
    </span><span class="p">}</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div> <h2 id="example-of-a-generated-employment-agreement">Example of a Generated Employment Agreement</h2> <p>To illustrate the concepts discussed, you can see an <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/Employment Agreement Generated.pdf" target="_blank">example employment agreement</a> generated based on the template with conditions instead of checkboxes and the provided JSON data.</p> <object data="/assets/posts/004-dynamic-employment-agreements/Employment Agreement Generated.pdf" type="application/pdf" class="inline-pdf-blog"></object> <p>You can generate a variety of agreement versions by simply modifying the data properties. For example, by using <code class="language-plaintext highlighter-rouge">"expenses": null</code> instead of the value in the sample data, the <strong>5. Expenses section</strong> would contain only <em>Employee will NOT be reimbursed for out-of-pocket expenses</em>.</p> <p>Feel free to try generating other employment agreement versions yourself by <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">creating a new template</a> using the <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/Employment Agreement with Conditions.docx">agreement with conditions</a>. Then, paste the <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/agreement-data.json" target="_blank">JSON data</a> into the data items field and modify some of the values as desired.</p> <p><img src="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/new-document.png" alt="Create a new document"/></p> <h2 id="conclusion">Conclusion</h2> <p>Creating employment agreements with variable clauses can be a challenging task, but with the use of enhanced syntax, dynamic conditions, and JSON data, it becomes much more manageable. By employing these techniques, organizations can streamline the document generation process, improve efficiency, and ensure the accuracy and customization of employment agreements.</p> <p>Whether it’s handling different employment types, compensation structures, or benefits packages, dynamic templates provide the flexibility and control needed to generate comprehensive and tailored agreements. This approach empowers businesses to focus on strategic initiatives while reducing administrative burdens.</p> <p>To further enhance your HR processes, consider integrating tools that complement document generation. For example, platforms like <a href="https://www.qandle.com/" target="_blank" rel="nofollow noopener">Qandle</a> offer comprehensive HR solutions for modern workplaces, covering everything from payroll management to employee engagement. Combined with advanced document generation, these tools can ensure efficient contract management within your HR operations.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/Employment Agreement with Conditions.docx">Employment Agreement</a> template with conditions and logical expressions.</li> <li>The sample <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/agreement-data.json" target="_blank">JSON data</a> used for generating the agreement.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/Employment Agreement Generated.pdf" target="_blank">PDF Agreement</a> generated based on the template with conditions and the JSON data.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Contracts"/> <category term="Conditions"/> <category term="Expressions"/> <summary type="html"><![CDATA[Streamline document generation and create customized employment agreements with ease. Discover how enhanced syntax, dynamic conditions, and JSON data can simplify the process, improve efficiency, and ensure accurate agreements.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/004-dynamic-employment-agreements/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">4 Different Ways to Generate Job Offer Letters in Bulk</title> <link href="https://www.docugenerate.com/blog/4-different-ways-to-generate-job-offer-letters-in-bulk/" rel="alternate" type="text/html" title="4 Different Ways to Generate Job Offer Letters in Bulk"/> <published>2024-01-15T00:00:00+00:00</published> <updated>2024-01-15T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/4-different-ways-to-generate-job-offer-letters-in-bulk</id> <content type="html" xml:base="https://www.docugenerate.com/blog/4-different-ways-to-generate-job-offer-letters-in-bulk/"><![CDATA[<h2 id="what-is-a-job-offer-letter">What is a Job Offer Letter</h2> <p>A job offer letter is a formal document that is issued by an employer to a candidate who has been selected for a job position. It provides the details of the job offer, including the position title, start date, compensation, and benefits. It serves as a <strong>written agreement</strong> between the <strong>employer and the candidate</strong>, and sets expectations for the employment relationship.</p> <p>The job offer letter is an important step in the hiring process, as it lays out the <strong>terms and conditions of employment</strong>, and helps to ensure that both the employer and the candidate are on the same page. It also provides an opportunity for the candidate to review the details of the job offer, and to ask questions or request clarifications before accepting the position.</p> <p>In addition to the terms of the job offer, the letter may also include information about the company, such as its mission, values, and culture, as well as any relevant policies and procedures. Overall, the job offer letter is a crucial document that helps to ensure a smooth transition into a new job and a positive working relationship between the employer and the employee.</p> <h2 id="find-the-letter-template">Finding the Right Letter Template</h2> <p>There are several resources available for finding templates for job offer letters. Here are a few options:</p> <ul> <li> <p><strong>Online Template Libraries</strong> that offer free and paid templates for job offer letters. These templates are easy to customize and provide a basic structure for creating a professional-looking job offer letter.</p> </li> <li> <p><strong>Human Resources Websites</strong> that offer templates and sample job offer letters for their members. These templates can be a useful resource for HR professionals and managers who need to create job offer letters for their organizations.</p> </li> <li> <p><strong>Legal Websites</strong> that offer templates and guidance on creating job offer letters that comply with employment laws. These templates can be especially useful for small businesses and startups that need to create legally compliant job offer letters.</p> </li> <li> <p><strong>Professional Service Providers</strong>, like employment law firms and HR consulting firms offer job offer letter templates as part of their services. These templates are typically more comprehensive and may include information on compliance with employment laws, as well as guidance on customizing the letter to meet the specific needs of your organization.</p> </li> </ul> <p>Regardless of the source, it is important to <strong>carefully review</strong> any template or sample job offer letter before using it. A good idea is to consult with a lawyer or HR professional to ensure that the letter complies with all relevant employment laws and regulations.</p> <h2 id="upload-the-template">Get Started by Uploading the Template</h2> <p>For the purpose of this tutorial, we’ll use a standard <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.docx">Job Offer Letter</a> template with a pretty simple structure and containing <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tags</a> like <code class="language-plaintext highlighter-rouge">Employee Name</code>, <code class="language-plaintext highlighter-rouge">Company Name</code>, <code class="language-plaintext highlighter-rouge">Position Title</code>, <code class="language-plaintext highlighter-rouge">Start Date</code> and a few others. On your DocuGenerate account, go ahead and <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">create a new template</a> by uploading the letter template file, and you should see something like in the image below.</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/letter-template.png" alt="Invoice template containing merge tags"/></p> <p>If you want to find more about how to transform an existing letter into a template, take a look at the previous blog article <a href="https://www.docugenerate.com/blog/how-to-transform-an-existing-invoice-into-a-template">How to Transform an Existing Invoice into a Template</a>, the principle being the same.</p> <h2 id="generate-the-job-offer-letters">Generate Job Offer Letters</h2> <p>When it comes to generating job offer letters, having the right template in place is a crucial first step. Once the template is set up, the next step is to generate the letters in bulk. There are two main approaches to doing this. The first approach is to <strong>use the web application</strong> and generate the letters through the web interface, which is the simpler and more straightforward option.</p> <p>The second approach, which is more technical in nature, involves <strong>using the API</strong>. This method is typically used by organizations with more advanced technical requirements and a need for more customization and automation. The API allows the organization to integrate the job offer letter generation process with their existing systems and processes, making it easier to generate the letters in bulk and streamline the hiring process.</p> <p>For each approach, the <strong>data</strong> for generating the letters will come from 2 different sources (an <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.xlsx">Excel file</a> and a <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.json" target="_blank">JSON object</a>), bringing the total number of ways to generate the letters to 4. <strong>So let’s dive in!</strong></p> <h3 id="use-web-app-and-excel-data">1. Using the <strong>Web App</strong> &amp; <strong>Excel</strong> Data</h3> <p>First, let’s generate the job offer letters from the web application and using the <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.xlsx">Excel file</a> as the data source. Click on <code class="language-plaintext highlighter-rouge">New document</code> and then select the <code class="language-plaintext highlighter-rouge">Excel or CSV file</code> option. You can learn more about generating documents with data from Excel in <a href="https://www.docugenerate.com/help/articles/generate-documents-from-an-excel-or-csv-file/">this article</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/web-app-excel-data-source.png" alt="Selecting the Excel data source" class="desktop-width-50"/></p> <p>For each selected row in the Excel file, a PDF document will be generated from the template by replacing the merge tags with the actual data. By default, all rows from the Excel file will be used to generate the job offer letters. But you can also select which ones to use by clicking on the rows, the selected ones being highlighted in yellow. If you want to <strong>quickly preview</strong> how the letter looks, you can just <strong>select one row</strong> like in the video below:</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/web-app-excel-data.gif" alt="Generate a PDF letter from Job Offer template and Excel data"/></p> <p><strong>Important</strong>: In order for the documents to be generated correctly, the <strong>column names</strong> in the Excel file must match exactly the <strong>merge tags</strong> from the template: <code class="language-plaintext highlighter-rouge">Employee Name</code>, <code class="language-plaintext highlighter-rouge">Company Name</code>, <code class="language-plaintext highlighter-rouge">Position Title</code>, <code class="language-plaintext highlighter-rouge">Start Date</code> and so on. You can <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter (Excel data).pdf" target="_blank">download</a> the generated letters if you want to see the end result.</p> <h3 id="use-web-app-and-json-data">2. Using the <strong>Web App</strong> &amp; <strong>JSON</strong> Data</h3> <p>Next, we’ll generate the job offer letters from the web application and using <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.json" target="_blank">JSON data</a>. Click on <code class="language-plaintext highlighter-rouge">New document</code> and then select the <code class="language-plaintext highlighter-rouge">JSON data</code> option. You can learn more about generating documents using JSON in <a href="https://www.docugenerate.com/help/articles/generate-documents-from-json-data/">this article</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/web-app-json-data-source.png" alt="Selecting the JSON data source" class="desktop-width-50"/></p> <p>Open the <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.json" target="_blank">JSON data</a> file and copy its content, or copy it directly from the text box below. As you can see, the JSON value contains the equivalent of the Excel file, but instead of rows we have a list of objects representing the data. And like it was the case for the column names in the Excel file, the <strong>JSON keys</strong> must match exactly the <strong>merge tags</strong> from the template: <code class="language-plaintext highlighter-rouge">Employee Name</code>, <code class="language-plaintext highlighter-rouge">Company Name</code>, <code class="language-plaintext highlighter-rouge">Position Title</code>, <code class="language-plaintext highlighter-rouge">Start Date</code> and so on, in order for the mail merge to be done correctly.</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Gerhardt Le Teve"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Dynabox"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Engineer III"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"5/4/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Ripley Radin"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$49790.29"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$3184.79"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$3394.85"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">43581</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"4/29/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Cally Pollak"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Analog Circuit Design manager"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Jobi Bertson"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Twinte"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Geologist II"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"4/20/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Maxi Poge"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$17782.46"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$4254.18"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$2543.53"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">27069</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"12/18/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Laurene Coldbathe"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Senior Financial Analyst"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Mitchell Brettel"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Kazu"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"VP Accounting"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"4/28/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Paolo Egerton"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$56473.97"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$4753.14"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$3355.65"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">32523</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"4/11/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Laurence Glabach"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Environmental Specialist"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Terrye Barrs"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Twitterwire"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Senior Sales Associate"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"1/11/2023"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Deina Campana"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$2850.24"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$6657.63"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$2666.43"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">32831</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"3/26/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Ginevra Stelfox"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Desktop Support Technician"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Orbadiah Seear"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Zoozzy"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Technical Writer"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"6/7/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Filia Boutcher"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$9147.02"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$410.52"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$9620.76"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">49604</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"10/10/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Tressa Lewendon"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Quality Engineer"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Kaja Kubek"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Kamba"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Software Engineer IV"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"1/7/2023"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Siobhan Rossi"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$57442.88"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$4211.76"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$556.41"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">20061</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"3/12/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Phillipp Cromarty"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Technical Writer"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Sherry Slowly"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Roodel"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Web Designer III"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"12/7/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Ranique Stockdale"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$52731.84"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$454.63"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$8856.27"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">49158</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"4/1/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Vernen Hedaux"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Software Consultant"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Maje McElrea"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Eazzy"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Senior Quality Engineer"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"11/6/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Mabel Alvis"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$93416.00"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$5614.70"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$1808.73"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">23205</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"5/29/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Normie Mariaud"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Staff Scientist"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Babs Vsanelli"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Blogtags"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Food Chemist"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"7/9/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Hertha Jancik"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$94107.02"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$2421.30"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$8328.46"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">32179</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"9/14/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Stearn Dominec"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Marketing Assistant"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Justina Halbord"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"InnoZ"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Chief Design Engineer"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"7/9/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Tandie Goffe"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$97200.78"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$3011.41"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$9805.45"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">33500</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"6/3/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Michal Paling"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Account Representative III"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Mark Dunstall"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Zoonder"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Programmer Analyst IV"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"9/26/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Jennine Lilford"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$73016.76"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$1984.14"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$1870.99"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">13785</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"2/28/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Amble Giller"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Desktop Support Technician"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Delmar O'Rodane"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Trudeo"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Human Resources Manager"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"6/5/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Klemens Drover"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$62596.21"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$414.20"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$7814.08"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">33729</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"7/13/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Shepard Skillen"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Software Engineer III"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Christophorus Breyt"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Skinte"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Structural Analysis Engineer"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"1/12/2023"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Cori Cattemull"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$23244.42"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$8168.93"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$3392.79"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">37771</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"7/12/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Tim Bulstrode"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Nurse"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Ginelle Reams"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Demizz"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Recruiter"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"4/30/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Bartram Whitlaw"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$43442.37"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$1202.09"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$8469.55"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">31971</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"9/14/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Dusty Haisell"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Programmer Analyst III"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Doralynn Korlat"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Topiclounge"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Senior Developer"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"12/24/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Dacy McGrath"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$77291.56"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$9879.53"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$7814.24"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">20870</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"3/30/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Link Coggon"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Assistant Media Planner"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Aile Rist"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Edgeclub"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Cost Accountant"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"11/26/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Evelin Rannald"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$67605.67"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$8648.40"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$636.04"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">12029</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"4/3/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Saw Custance"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Junior Executive"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Ramon Fearn"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Twiyo"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Payment Adjustment Coordinator"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"1/17/2023"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Hunfredo Brinicombe"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$96561.93"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$2201.53"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$5735.85"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">27966</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"10/7/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Kurt Ickovic"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Research Associate"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Laverna Fullalove"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Buzzster"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Civil Engineer"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"10/7/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Avictor Rentalll"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$22680.40"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$9615.83"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$3511.52"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">47127</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"10/12/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Moss Priden"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Community Outreach Specialist"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Lotte Piggford"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Jaxbean"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Electrical Engineer"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"2/13/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Anjela Scone"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$88211.64"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$2298.14"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$209.56"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">39588</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"7/15/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Izabel Kynaston"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Recruiting Manager"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="nl">"Employee Name"</span><span class="p">:</span><span class="s2">"Hansiain Hanmer"</span><span class="p">,</span><span class="nl">"Company Name"</span><span class="p">:</span><span class="s2">"Bluejam"</span><span class="p">,</span><span class="nl">"Position Title"</span><span class="p">:</span><span class="s2">"Project Manager"</span><span class="p">,</span><span class="nl">"Start Date"</span><span class="p">:</span><span class="s2">"3/25/2022"</span><span class="p">,</span><span class="nl">"Manager Name"</span><span class="p">:</span><span class="s2">"Nicolai Aleksich"</span><span class="p">,</span><span class="nl">"Yearly Compensation"</span><span class="p">:</span><span class="s2">"$91649.01"</span><span class="p">,</span><span class="nl">"Bonus Amount"</span><span class="p">:</span><span class="s2">"$3503.64"</span><span class="p">,</span><span class="nl">"Commision Amount"</span><span class="p">:</span><span class="s2">"$6059.65"</span><span class="p">,</span><span class="nl">"Stocks Number"</span><span class="p">:</span><span class="mi">34179</span><span class="p">,</span><span class="nl">"Expiry Date"</span><span class="p">:</span><span class="s2">"3/10/2022"</span><span class="p">,</span><span class="nl">"Name of Signatory"</span><span class="p">:</span><span class="s2">"Lukas Kenchington"</span><span class="p">,</span><span class="nl">"Title of Signatory"</span><span class="p">:</span><span class="s2">"Marketing Manager"</span><span class="p">}]</span><span class="w">
</span></code></pre></div></div> <p>After copying the JSON data, go back to DocuGenerate’s web app and paste the value in the field that says <code class="language-plaintext highlighter-rouge">Enter a JSON array of objects</code>. As opposed to the <a href="#use-web-app-and-excel-data">Excel data</a> option, when using JSON it is not possible to select which items from the JSON array to be used, and by <strong>all data items</strong> will be used to generate the documents.</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/web-app-json-data.gif" alt="Generate multiple PDF letters from Job Offer template and JSON data"/></p> <p>If you want to see the job offer letters generated from the JSON data, you can <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter (JSON data).pdf" target="_blank">download</a> the PDF file.</p> <h3 id="use-api-and-excel-data">3. Using the <strong>API</strong> &amp; <strong>Excel</strong> Data</h3> <p>For the last two sections, we’ll be using <a href="https://api.docugenerate.com/" target="_blank">DocuGenerate’s API</a> to generate the job offer letters. And to make it easier to interact with the API, we created a <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/DocuGenerate.postman_collection.json" target="_blank">Postman collection</a> that you can import into your <a href="https://www.postman.com/" target="_blank" rel="noopener">Postman</a> workspace. After importing the collection, you should see the <code class="language-plaintext highlighter-rouge">Template</code> and <code class="language-plaintext highlighter-rouge">Document</code> endpoints listed like in the following image:</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/postman-api-collection.png" alt="Setting DocuGenerate's API Collection" class="desktop-width-50"/></p> <p>Next, you’ll need to configure the <code class="language-plaintext highlighter-rouge">Authorization</code> section of the Postman collection by entering your unique API key, which can be found on the <a href="https://app.docugenerate.com/settings" target="_blank">Settings page</a> after you log in. For the purpose of this tutorial, we’ll be using the demo key <code class="language-plaintext highlighter-rouge">491c000c5fad32ed7787005b0723ad55</code>, but you can replace it with your own API key.</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/postman-api-key.png" alt="Setting DocuGenerate's API Key in Postman"/></p> <p>Open the <code class="language-plaintext highlighter-rouge">Document / Generate Document</code> endpoint from the Postman collection and specify the <code class="language-plaintext highlighter-rouge">template_id</code> parameter. If you created a template with the <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.docx">Job Offer Letter</a>, use the id of that template. Otherwise, you can use the demo template id <code class="language-plaintext highlighter-rouge">ZtHBhb9jLh6TcZuaVteI</code>, associated with the demo API key.</p> <p>And finally, don’t forget to select the <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.xlsx">Job Offer Letter.xlsx</a> for the <code class="language-plaintext highlighter-rouge">file</code> parameter of the request. The <code class="language-plaintext highlighter-rouge">output_format</code> parameter is optional, the default value being <code class="language-plaintext highlighter-rouge">.docx</code>, but you can also generate the job offer letter in the <code class="language-plaintext highlighter-rouge">.pdf</code>, <code class="language-plaintext highlighter-rouge">.doc</code> or <code class="language-plaintext highlighter-rouge">.odt</code> format, as you can see in the <a href="https://api.docugenerate.com/#/Document/generateDocument" target="_blank">API Reference</a>.</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/postman-post-document-excel.png" alt="Generate multiple PDF letters from Job Offer template with Postman using Excel data"/></p> <p>You can see in the previous image all the request parameters, as well as the response from the server. The <code class="language-plaintext highlighter-rouge">document_uri</code> field is a link to the <a href="https://storage.googleapis.com/docugenerate.appspot.com/documents/GMtZRU1F7Pae3yw8oens/Job%20Offer%20Letter.pdf?GoogleAccessId=firebase-adminsdk-4i7q5%40docugenerate.iam.gserviceaccount.com&amp;Expires=1834036706&amp;Signature=akFb3v5XMR4NkjdGDEdSX04Lp3J40XQFQtuMMudTek5%2FyQWL62uh18GQemiT4pE2XlF%2FYSooNMWDczToNLQ45Eh0WCIyqlXsIfkOpD3m7yQ%2FCqYvv5kWr%2BNUyKgVsFPcBcXYdiq1u6nPSCTYgICzX9i%2F2I91mRiEY7EmQHppB9W7u8C4y%2FLinvUM3aNb34YGV%2Bn7syhjWfng%2Fogu6d%2BBAtvy5BpaU8Duk%2BMDNI4bC6N9aSkgTDadRtnWm4M9YCg2y60DXM4j%2FoYSuE5ijQyDQDrqiDUlrYHLLXr%2FHaG4x%2BkvfZQhGqoyD0dmjI80%2FakxnAOg%2BugKc1NM4LPkgLSJuQ%3D%3D" target="_blank" rel="noopener">generated PDF</a> containing the job offer letters.</p> <h3 id="use-api-and-json-data">4. Using the <strong>API</strong> &amp; <strong>JSON</strong> Data</h3> <p>Finally, the last way to generate the job offer letters is to use the API with JSON data. The request parameters are pretty much the same as <a href="#use-api-and-excel-data">before</a>, but instead of specifying the <code class="language-plaintext highlighter-rouge">file</code> parameter, you need to select the <code class="language-plaintext highlighter-rouge">data</code> parameter and paste the <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.json" target="_blank">JSON data</a> as the value. Take a look at the following video to see what that process looks like:</p> <p><img src="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/postman-post-document-json.gif" alt="Generate multiple PDF letters from Job Offer template with Postman by calling DocuGenerate's API"/></p> <p>Like for the previous response object, the <code class="language-plaintext highlighter-rouge">document_uri</code> field is a link to the <a href="https://storage.googleapis.com/docugenerate.appspot.com/documents/2GhuZ9GIDbFAl2PdEeAr/Job%20Offer%20Letter.pdf?GoogleAccessId=firebase-adminsdk-4i7q5%40docugenerate.iam.gserviceaccount.com&amp;Expires=1834037410&amp;Signature=J2Y7g%2Be3Xr7CvRTfskT3v8%2BGMS6tfFzuEDwvIPM7zH3xQGHcEekos9s7hQTDjeYbYKrJngxhVeOhAAbKhLAahZqwrKBSyuyoXhCMiwiS0Uhfpe8W9a%2BZ973OlBNnOpxZ18DxDwZPmYNq4afFKuxaaNUdYFUXE3RiG5Fs7KOJjNZ8%2FDcSHVm1%2FITzamT96SdYm6KTLNEiuS0bjYaJZ97hAT7DxG5dMRinIZQ1pkRPjXrz8U%2Fe%2BdVeCWMVps6HzONECCM4ismU26waadXiWcsqsd9qi9STAsnc7caaEQASLoZkO6Y0wJXcJao%2FBsby1P7OY2XJx%2F8NyCgzcFWscObgbw%3D%3D" target="_blank" rel="noopener">generated PDF</a> containing the job offer letters. If you need more info about the other fields in the response object, you can find the detailed <code class="language-plaintext highlighter-rouge">Document</code> schema on the <a href="https://api.docugenerate.com/" target="_blank">API Reference</a> page.</p> <h2 id="conclusion">Conclusion</h2> <p>In this article we showcased how to generate job offer letters in bulk from a pre-defined template using 4 different methods. For the first two methods, we used the <a href="https://www.docugenerate.com/document-generation/">web application</a> to generate the letters through the web interface and provided the data either as an <strong>Excel file</strong>, or as a <strong>JSON object</strong>. The last two methods involved using the <a href="https://www.docugenerate.com/pdf-generation-api/">DocuGenerate API</a> with the same two data types as for the first ones. This is a more technical option, but offers greater flexibility in terms of customization and automation.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/DocuGenerate.postman_collection.json" target="_blank">DocuGenerate API Collection</a> for Postman.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.docx">Job Offer Letter</a> template used in this tutorial.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.xlsx">Excel file</a> and the <a href="https://storage.googleapis.com/docugenerate.appspot.com/documents/GMtZRU1F7Pae3yw8oens/Job%20Offer%20Letter.pdf?GoogleAccessId=firebase-adminsdk-4i7q5%40docugenerate.iam.gserviceaccount.com&amp;Expires=1834036706&amp;Signature=akFb3v5XMR4NkjdGDEdSX04Lp3J40XQFQtuMMudTek5%2FyQWL62uh18GQemiT4pE2XlF%2FYSooNMWDczToNLQ45Eh0WCIyqlXsIfkOpD3m7yQ%2FCqYvv5kWr%2BNUyKgVsFPcBcXYdiq1u6nPSCTYgICzX9i%2F2I91mRiEY7EmQHppB9W7u8C4y%2FLinvUM3aNb34YGV%2Bn7syhjWfng%2Fogu6d%2BBAtvy5BpaU8Duk%2BMDNI4bC6N9aSkgTDadRtnWm4M9YCg2y60DXM4j%2FoYSuE5ijQyDQDrqiDUlrYHLLXr%2FHaG4x%2BkvfZQhGqoyD0dmjI80%2FakxnAOg%2BugKc1NM4LPkgLSJuQ%3D%3D" target="_blank" rel="noopener">PDF Letters</a> generated with data from the Excel file.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter.json" target="_blank">JSON data</a> and the <a href="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/Job Offer Letter (JSON data).pdf" target="_blank">PDF Letters</a> generated from the JSON data.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Letters"/> <category term="API"/> <category term="Postman"/> <summary type="html"><![CDATA[The job offer letter is an important step in the hiring process that holds the terms of employment for a new hire. Lean how to generate job offer letters in bulk from a predefined template, using either our web app or our simple REST API.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/003-generate-letters-in-bulk/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">How to Transform an Existing Invoice into a Template</title> <link href="https://www.docugenerate.com/blog/how-to-transform-an-existing-invoice-into-a-template/" rel="alternate" type="text/html" title="How to Transform an Existing Invoice into a Template"/> <published>2023-12-12T00:00:00+00:00</published> <updated>2023-12-12T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/how-to-transform-an-existing-invoice-into-a-template</id> <content type="html" xml:base="https://www.docugenerate.com/blog/how-to-transform-an-existing-invoice-into-a-template/"><![CDATA[<h2 id="what-is-an-invoice">What’s an Invoice?</h2> <p>An invoice is a <strong>document sent by a seller to a buyer</strong>, outlining the goods or services provided and the total cost for those goods or services. It typically includes the date of the transaction, the invoice number, the customer’s contact information, and a description of the goods or services provided. In addition, it may also include the quantity of each item purchased, the unit price, and the total amount due.</p> <p>The invoice serves as a record of the transaction and is often used for accounting and tax purposes. It also serves as a means of payment request to the customer. Invoices are commonly used in business-to-business transactions, but can also be used in consumer transactions.</p> <h2 id="tools-for-generating-invoices">Tools for Generating Invoices</h2> <p>There are a lot of tools allowing you to create invoices, ranging from <strong>Accounting Software</strong>, to good old <strong>Word Processors</strong>. The manual effort needed to create invoices also varies on this scale. With dedicated invoicing software it is generally easier because the offer ready to use templates and have some sort of built-in editor allowing users to fill in the different invoice fields. On the other side of this spectrum are document editors like <strong>Microsoft Word</strong> and spreadsheet editors like <strong>Microsoft Excel</strong> that allow the manual creation of invoices, but offer less out-of-the-box automation.</p> <p>Somewhere in the middle are document generators such as <strong>DocuGenerate</strong>, that can add automation on top of existing templates. Some use WISIWIG web editors to create and edit the templates, but for DocuGenerate we decided to use regular <strong>Word documents</strong> as templates because they are widely used, so you don’t need to learn a new software and also because of the flexibility and customization options that regular Word documents offer. This way, you can easily transform an existing invoice into a reusable template, saving time and effort on future invoicing tasks.</p> <h2 id="creating-the-invoice-template">Creating the Invoice Template</h2> <p>For the purpose of this tutorial, we’ll use a simple <a href="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/Sales Invoice Original.docx">Sales Invoice</a> containing just some basic information and a table with dummy items. You’ll learn how to transform this invoice into a template, so it can be used to generate similar invoices for other clients, that will have the same layout but different content.</p> <h3 id="add-merge-tags">Add Merge Tags</h3> <p>A <a href="https://www.docugenerate.com/help/articles/what-are-merge-tags/">merge tag</a> is a <strong>special placeholder</strong> within a document template that can be automatically replaced with data from a database or spreadsheet. The idea is to generate personalized documents in bulk, rather than having to manually create each one.</p> <p>For example, a template for an invoice might include merge tags for invoice number, the client’s name, address, and other relevant information, which would be automatically filled in for each client based on data stored in a spreadsheet. This saves time and reduces errors compared to manual data entry, and is commonly used in industries such as real estate, finance, and insurance.</p> <p>The <strong>first step</strong> for adding merge tags is to identify the areas of the invoice that need to be dynamic, and for each area select the existing text and replace it with a corresponding merge tag. For example, we’ll replace the text <code class="language-plaintext highlighter-rouge">#0135</code> with <code class="language-plaintext highlighter-rouge">[Invoice No]</code>, then <code class="language-plaintext highlighter-rouge">March 1st, 2023</code> with <code class="language-plaintext highlighter-rouge">[Invoice Date]</code> and so on, as you can see in the following video:</p> <p><img src="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/create-template-from-invoice.gif" alt="Replace the text with merge tags"/></p> <p>After doing the first step, the invoice template should contain the merge tags <code class="language-plaintext highlighter-rouge">[Invoice No]</code>, <code class="language-plaintext highlighter-rouge">[Invoice Date]</code> <code class="language-plaintext highlighter-rouge">[CUSTOMER NAME]</code>, <code class="language-plaintext highlighter-rouge">[STREET]</code>, <code class="language-plaintext highlighter-rouge">[CITY]</code>, <code class="language-plaintext highlighter-rouge">[ST]</code>, <code class="language-plaintext highlighter-rouge">[ZIP CODE]</code>, like in the image below. As you can see, there is no particular rule for formatting the merge tags, you can use all caps, capitalized words, as long as they use the same <a href="https://www.docugenerate.com/help/articles/what-are-tag-delimiters/">tag delimiters</a>, which in this case are <code class="language-plaintext highlighter-rouge">[</code> for the left delimiter and <code class="language-plaintext highlighter-rouge">]</code> for the right delimiter.</p> <p><img src="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/invoice-with-merge-tags.png" alt="Invoice with merge tags"/></p> <p>You are free to use any delimiters you want when creating the template, like for example <code class="language-plaintext highlighter-rouge">{Invoice No}</code>, <code class="language-plaintext highlighter-rouge">[[Invoice No]]</code>, or even more exotic delimiters like <code class="language-plaintext highlighter-rouge">![[[Invoice No]]]!</code>. The DocuGenerate parser can <a href="https://www.docugenerate.com/document-generation/#tags-overview">automatically detect</a> the most commonly used tags when uploading a template, but if you use some uncommon delimiters that are not detected, you can always <a href="https://www.docugenerate.com/help/articles/how-do-i-update-the-tag-delimiters/">update them</a> in the template settings so that the merge tags can be recognized successfully.</p> <h3 id="make-the-items-table-dynamic">Make the Items Table Dynamic</h3> <p>The next step in creating the invoice template is to transform the static <strong>items table</strong> into a dynamic one. Invoice items are the specific <strong>products or services</strong> being billed to a customer. They appear in the invoice in a table or list format and typically include the item name, description, quantity, unit price, and total amount. The invoice items make up the total amount due for the invoice and provide a detailed breakdown of what the customer is paying for.</p> <p>Like for the <a href="#add-merge-tags">first step</a>, we’re going to replace the existing text with corresponding merge tags. For example, <code class="language-plaintext highlighter-rouge">Item 1</code> is replaced with <code class="language-plaintext highlighter-rouge">[Name]</code>, <code class="language-plaintext highlighter-rouge">500</code> is replaced with <code class="language-plaintext highlighter-rouge">[Quantity]</code>, <code class="language-plaintext highlighter-rouge">$175</code> is replaced with <code class="language-plaintext highlighter-rouge">[Price]</code> and <code class="language-plaintext highlighter-rouge">$87,500</code> is replaced with <code class="language-plaintext highlighter-rouge">[Amount]</code>. We only need to edit the first line of the table and delete the content of the other lines, because they will be generated dynamically from the items list.</p> <p>We’re going to use a <a href="https://www.docugenerate.com/help/articles/how-to-add-tables-to-a-template/">special syntax</a> to iterate over the items list and add multiple rows to the table, where <code class="language-plaintext highlighter-rouge">[#Items]</code> marks the beginning of the table loop and <code class="language-plaintext highlighter-rouge">[/]</code> marks the end of the table loop. In the end, the table should look like this:</p> <table class="table table-bordered"> <thead> <tr> <th>ITEM</th> <th>QTY</th> <th>PRICE</th> <th>TOTAL</th> </tr> </thead> <tbody> <tr> <td><code class="language-plaintext highlighter-rouge">[#Items][Name]</code></td> <td><code class="language-plaintext highlighter-rouge">[Quantity]</code></td> <td><code class="language-plaintext highlighter-rouge">[Price]</code></td> <td><code class="language-plaintext highlighter-rouge">[Amount][/]</code></td> </tr> </tbody> </table> <p>And here’s a short video of the whole transformation process of the table containing the items:</p> <p><img src="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/invoice-table.gif" alt="Create a dynamic table"/></p> <h2 id="testing-the-template">Testing the Template</h2> <p>After making all these previous changes, the invoice template should look like this. You can <a href="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/Sales Invoice Template.docx">download a copy</a> of the modified invoice if you don’t want to go through all these steps but rather have the final version of the invoice template for testing.</p> <p><img src="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/invoice-template.png" alt="Final invoice template"/></p> <p>First you’ll need to <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">create a new template</a> by uploading the invoice template file. Then go to <strong>Generate a new document</strong> and select the <a href="https://www.docugenerate.com/help/articles/generate-documents-from-json-data/">JSON data format</a>. You can paste the following JSON value in the input text area, or if you prefer you can <a href="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/invoice-data.json" target="_blank">download</a> a JSON file containing this data.</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
  </span><span class="p">{</span><span class="w">
    </span><span class="nl">"Invoice No"</span><span class="p">:</span><span class="w"> </span><span class="s2">"58-519-8945"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Invoice Date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"03-01-2023"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"CUSTOMER NAME"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Wisozk Inc"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"STREET"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1569 Fair Oaks Way"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"CITY"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Philadelphia"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"ST"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Pennsylvania"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"ZIP CODE"</span><span class="p">:</span><span class="w"> </span><span class="s2">"19184"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Total"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$180"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"Items"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Table"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Quantity"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Price"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$80"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Amount"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$80"</span><span class="w">
      </span><span class="p">},</span><span class="w">
      </span><span class="p">{</span><span class="w">
        </span><span class="nl">"Name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Chairs"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Quantity"</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Price"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$25"</span><span class="p">,</span><span class="w">
        </span><span class="nl">"Amount"</span><span class="p">:</span><span class="w"> </span><span class="s2">"$100"</span><span class="w">
      </span><span class="p">}</span><span class="w">
    </span><span class="p">]</span><span class="w">
  </span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div> <p>It should look something like this in the DocuGenerate web app:</p> <p><img src="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/generate-new-document.png" alt="Final invoice template"/></p> <p>The if you go ahead and generate the PDF document with the default <a href="https://www.docugenerate.com/document-generation/#the-merge-options">merge options</a>, the result should be like the one below. If you don’t want to try it right now, you can just <a href="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/Sales Invoice Generated.pdf" target="_blank">download</a> a copy of the generated PDF invoice to see what it looks like.</p> <p><img src="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/sales-invoice-generated.png" alt="Final invoice template"/></p> <h2 id="conclusion">Conclusion</h2> <p>An invoice is an essential document that outlines the goods or services provided to a buyer, the cost, and other details of a transaction. Invoices serve as a record of the transaction and are used for accounting and tax purposes. There are various tools available to create invoices, including accounting software, word processors, and document generators. In this article, we have demonstrated how to transform a sales invoice into a reusable template by adding merge tags using a document generator.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/Sales Invoice Template.docx">Sales Invoice</a> template with dynamic items table.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/invoice-data.json" target="_blank">JSON data</a> for testing the invoice generation.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/Sales Invoice Generated.pdf" target="_blank">PDF Invoice</a> generated from the JSON data.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Invoices"/> <category term="Templates"/> <category term="Tables"/> <summary type="html"><![CDATA[There are various tools available to create invoices, including accounting software, word processors, and document generators. In this article, we demonstrate how to transform a sales invoice into a reusable template by adding merge tags.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/002-transform-invoice-to-template/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> <entry> <title type="html">How to Use the Templates from the Template Library</title> <link href="https://www.docugenerate.com/blog/how-to-use-the-templates-from-the-template-library/" rel="alternate" type="text/html" title="How to Use the Templates from the Template Library"/> <published>2023-12-01T00:00:00+00:00</published> <updated>2023-12-01T00:00:00+00:00</updated> <id>https://www.docugenerate.com/blog/how-to-use-the-templates-from-the-template-library</id> <content type="html" xml:base="https://www.docugenerate.com/blog/how-to-use-the-templates-from-the-template-library/"><![CDATA[<h2 id="intro">Introducing the Template Library</h2> <p>DocuGenerate’s <a href="https://www.docugenerate.com/templates">Template Library</a> offers a quick and efficient solution for generating high-quality documents. With a wide range of customizable templates available, you can easily create professional invoices, letters, contracts, certificates, and more, without the need for advanced design or formatting skills.</p> <p>Our Template Library is designed to help you get started quickly, with templates that are easy to customize and use. Whether you need to generate a contract for a new client, an invoice for a customer, or a certificate for an award ceremony, our Template Library has you covered.</p> <p>In this article, we’ll take a closer look at the Template Library and explore how you can use its templates to streamline your document generation process. From choosing the right template to customizing it to fit your needs, we’ll walk you through each step of the process, so you can start creating high-quality documents with ease.</p> <h2 id="choosing-a-template">Choosing a Template</h2> <p>The Template Library includes sample templates that you can use to get started right away, without having to create your own templates. These templates are designed to provide a starting point for your document generation needs, and can be easily customized to fit your specific needs.</p> <p>The sample templates are organized in 12 categories as it follows :</p> <ul> <li> <p><a href="https://www.docugenerate.com/templates#contracts">Contracts</a>: Employment Contract, Accounting Contract, Non Disclosure Agreement, Sales Contract</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#proposals">Proposals</a>: Sales Proposal, Price Quote, Project Proposal, Insurance Proposal</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#invoices">Invoices</a>: Marketing Invoice, Repair Invoice, Moving Company Invoice, Business Invoice</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#reports">Reports</a>: Sales Report, Financial Report, Inspection Report, Project Status Report</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#receipts">Receipts</a>: Sales Receipt, Payment Receipt, Donation Receipt, Rent Receipt</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#orders">Orders</a>: Purchase Order, Order Confirmation, Packing Slip, Delivery Note</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#letters">Letters</a>: Cover Letter, Recommendation Letter, Business Letter, Marketing Letter</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#resumes">Resumes</a>: Professional Resume, Modern Resume, Consultant Profile, Candidate Profile</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#labels">Labels</a>: Shipping Label, Address Label, Product Label, Asset Tag</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#certificates">Certificates</a>: Certificate of Achievement, Certificate of Achievement, Certificate of Completion, Certificate of Employment</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#tickets">Tickets</a>: Event Ticket, Conference Badge, Admission Ticket, Raffle Ticket</p> </li> <li> <p><a href="https://www.docugenerate.com/templates#vouchers">Vouchers</a>: Gift Voucher, Discount Coupon, Travel Voucher, Hotel Voucher</p> </li> </ul> <p>You can download all the resources associated with each template by clicking the <strong>Download</strong> button. The ZIP archive includes the DOCX template, a JSON data set, an Excel data file, and a sample PDF document generated using the data set. This allows you to quickly get started with testing DocuGenerate, without having to create your own templates.</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/download-button.png" alt="Download button"/></p> <p>For the purpose of this article, we’ll use the <a href="https://www.docugenerate.com/assets/templates/letters/cover/Cover Letter.zip">Cover Letter</a> template. After you download the <strong>Cover Letter.zip</strong> archive, go ahead and unzip it, and you should see the <strong>Cover Letter</strong> folder. In the next section we’ll go over the folder’s content and look at each file in detail.</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/cover-letter-unzip.png" alt="Unzip the template folder" class="desktop-width-50"/></p> <h2 id="discover-the-files">Discover the Template Files</h2> <p>The first file included in the ZIP archive is the <code class="language-plaintext highlighter-rouge">.docx</code> Word template itself, which serves as the foundation for the document generation process. Each template is designed with merge tags that allow for customization of specific fields. In the case of the <strong>Cover Letter</strong>, the tags are <code class="language-plaintext highlighter-rouge">Name</code>, <code class="language-plaintext highlighter-rouge">Job Title</code>, <code class="language-plaintext highlighter-rouge">Company Name</code> and a few others.</p> <p>You can use this file to create a new reusable template in DocuGenerate, either <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">using the app</a> or <a href="https://www.docugenerate.com/developers/quickstart/#create-template">using the API</a>. Whether you prefer the convenience of the app’s user-friendly interface or the power and control of the API, you have the option to choose which method suits your workflow best.</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/cover-letter-docx.png" alt="The DOCX template file"/></p> <p>The second file included in the ZIP archive is a <code class="language-plaintext highlighter-rouge">.json</code> file, which is a lightweight and easy-to-use data format. This file contains an array of 20 <code class="language-plaintext highlighter-rouge">JSON</code> objects, representing the data items that can be used for mail merging. In order for the mail merge to be done correctly, the <strong>keys</strong> of the JSON objects match exactly the <strong>merge tags</strong> from the template: <code class="language-plaintext highlighter-rouge">Name</code>, <code class="language-plaintext highlighter-rouge">Job Title</code>, <code class="language-plaintext highlighter-rouge">Company Name</code> and so on.</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/cover-letter-json.png" alt="The JSON data file"/></p> <p>The next file, with an <code class="language-plaintext highlighter-rouge">.xlsx</code> extension, is an Excel spreadsheet which contains 20 rows with sample data. Same as for the <strong>JSON keys</strong> previously, the <strong>column names</strong> in the Excel file match exactly the <strong>merge tags</strong> from the template: <code class="language-plaintext highlighter-rouge">Name</code>, <code class="language-plaintext highlighter-rouge">Job Title</code>, <code class="language-plaintext highlighter-rouge">Company Name</code>, etc.</p> <p>This data structure is critical for generating accurate and consistent documents, as it ensures that the correct information is being populated into the correct fields. By matching the <strong>column names</strong> in the Excel file to the <strong>merge tags</strong> in the template, DocuGenerate can automate the document creation process.</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/cover-letter-xlsx.png" alt="The Excel data file"/></p> <p>The last file in the ZIP archive is a generated <code class="language-plaintext highlighter-rouge">.pdf</code> document, which is created using the Word template and the sample data from the Excel spreadsheet. This document is a sample of what you can achieve by using DocuGenerate to <strong>automate your document creation</strong> process.</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/cover-letter-pdf.png" alt="The generated PDF example"/></p> <h2 id="use-the-template">Use the Template to Generate PDF Documents</h2> <p>After getting familiar with the different files, the next step is to use them to generate documents. You can edit the template if you want, or use it as it is to get started quickly. The first step is to upload the Word document in the app to <a href="https://www.docugenerate.com/help/articles/how-do-i-create-a-new-template/">create a new template</a>. Once you do that, you should see something like this:</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/new-template-docx.png" alt="Create the new template"/></p> <p>You can use either the JSON data or the Excel spreadsheet to provide the data for generating the documents. For the first option <a href="https://www.docugenerate.com/help/articles/generate-documents-from-json-data/">using JSON</a>, go ahead and open the <code class="language-plaintext highlighter-rouge">.json</code> file and copy its content to the clipboard. Then paste the copied JSON data into the dedicated text area and proceed through the form steps until you reach the document generation confirmation.</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/new-document-json.png" alt="New document from JSON data"/></p> <p>For the second option <a href="https://www.docugenerate.com/help/articles/generate-documents-from-an-excel-or-csv-file/">using Excel</a>, you’ll need to upload the <code class="language-plaintext highlighter-rouge">.xlsx</code> file in the area where it says <em>Select or drop a .xlsx, .xls, .ods, .csv or .tsv file</em>. You can preview the Excel data and select which rows to use for generating the documents by clicking on them. Please note that by default all the rows will be used for document generation.</p> <p><img src="https://www.docugenerate.com/assets/posts/001-use-the-template-library/new-document-excel.png" alt="New document from Excel data"/></p> <p>After fine-tuning the <a href="https://www.docugenerate.com/document-generation/#the-merge-options">merge options</a> by specifying the <a href="https://www.docugenerate.com/help/articles/select-the-merge-export-format/">output format</a> and other options, everything is set up for generating the cover letters in bulk. You can see below an example of the generated PDF using the ready-to-use template and the sample Excel data:</p> <object data="/assets/posts/001-use-the-template-library/Cover Letter.pdf" type="application/pdf" class="inline-pdf-blog"></object> <p>Now that you’ve seen how to use the <a href="https://www.docugenerate.com/assets/templates/letters/cover/Cover Letter.zip">Cover Letter</a> template, you can try the other templates from the library and start generating documents with ease.</p> <h2 id="conclusion">Conclusion</h2> <p>In conclusion, DocuGenerate’s Template Library provides a wide range of customizable templates that allow you to easily and efficiently generate high-quality documents. By using the templates available in the library, you can save valuable time and resources, without the need for advanced design or formatting skills.</p> <p>Whether you need to generate invoices, letters, contracts, certificates, or other documents, the Template Library has you covered. With sample templates organized by category, you can easily find the right template for your needs, and customize it to fit your specific requirements.</p> <h3 id="resources">Resources</h3> <ul> <li>The <a href="https://www.docugenerate.com/assets/templates/letters/cover/Cover Letter.zip">Cover Letter</a> ZIP archive containing the various template files.</li> <li>The <a href="https://www.docugenerate.com/assets/posts/001-use-the-template-library/Cover Letter.pdf" target="_blank">PDF Letters</a> generated in bulk in this article.</li> </ul>]]></content> <author> <name>DocuGenerate</name> <email>support@docugenerate.com</email> </author> <category term="Resources"/> <category term="Templates"/> <category term="Library"/> <summary type="html"><![CDATA[Our Template Library includes sample templates that you can use to get started right away with DocuGenerate, without having to create your own. These templates are organized by category, and can be easily customized to fit your specific needs.]]></summary> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://www.docugenerate.com/assets/posts/001-use-the-template-library/cover-image.png"/> <media:content medium="image" url="https://www.docugenerate.com/assets/posts/001-use-the-template-library/cover-image.png" xmlns:media="http://search.yahoo.com/mrss/"/> </entry> </feed>