Documents

Document flow

This is a tool for automatically generating documents (contracts, invoices, acts, invoices and presentations) directly from a lead, company or contact card. The widget uses Google Docs, Sheets and Slides templates, inserting data from Kommo into them: client details, lead amounts, products and even images. The resulting document can be downloaded as PDF, sent to the client, or uploaded to VLSI for further approval and signature.

Features

Automatic document generation
Flexible work with Google Docs, Sheets, Slides templates
Automatic sending based on triggers
Substitution of data from Kommo (details, amounts, products)
Download to PDF
Integration with VLSI
Declension of full name
Inserting images into documents
Formulas in documents
Setting access rights

Installation and setup guide

Detailed guide for working with widget "Document flow"

Connecting a Google account

  • Log in via Google in widget settings
  • A folder will be automatically created in Google Drive to store documents.
  • All generated documents will be saved in this folder.

Access rights to documents are inherited from the folder settings:

  • If you leave access only for yourself, the documents will be private.
  • If you open access “by link” (read or edit only), you can send links to clients, and they will be able to open the document.
  • If you grant access only to specific Google users, clients will not be able to open a document via a link unless they have an invitation.

Create a template

First way:

  • click “Create a new template”
  • select type: Document / Table / Presentation
  • Specify the name of the template
  • A link to the template document will be generated automatically
  • The template is used to generate documents

Second way:

  • click “Select new template”
  • select type: Document / Table / Presentation

Setting up keys

Next, we need to fill the template with field “keys” in order to fill in information from the lead/contact/company/product card into the document template that was loaded into the widget.

  • In settings, select the entity (Lead / Contact / Company / Lists)
  • Select a field (system and advanced are supported)
  • If necessary, specify the function (in words, initials, declination, etc.).
  • The widget will generate a key (for example: {{contact_info.Email}})
  • Copy the key and paste it into the template in the desired location

Access Settings

By default, the Documents tab is available to everyone. You can restrict rights:

  • Who can edit - only selected employees will be able to create documents

Who can view - restricts access to viewing the Documents tab in a lead, only selected employees will be able to view this tab

Declension name

  • In the keys, select Contacts → Contact name.
  • Please indicate the correct case.
  • The lead card must contain the Last Name, First Name and Patronymic.

Generating a document manually

  • Open the lead → tab Documents
  • Select a template
  • Click “Generate document”

The generated document will appear in the tab

Available actions:

  • copy link
  • download PDF
  • delete

Automatic document generation

  • In the pipeline, open “Customize”
  • Add a Documents trigger

Please indicate:

  • start moment
  • template
  • field for writing a link
  • stage where to transfer the lead after generation
  • Save changes

Dynamic document title

You can use variables (keys) not only in the contents of documents, but also in the name of the template. When generating a document, the name will be automatically filled in with data from the lead.

Example:

  • If you name the template: Account {{num_account_type}} from {{date}}
  • Then the generated documents will be called: Invoice 1 from 12/28/2025, Invoice 2 from 12/29/2025, Invoice 3 from 12/30/2025, etc.

All keys from the widget settings are available, including special ones:

  • {{num_account}} — Document serial number for all templates (general counter)
  • {{num_account_type}} — Document serial number for a specific template
  • {{date}} - Current date

ℹ️Tip: Use {{num_account_type}} to number documents of the same type, for example: Account {{num_account_type}} from {{date}} will create "Account 1", "Account 2", "Account 3", etc.

You can combine any variables that are available in the widget settings for substitution in the document.

Add a Google Docs template

  • First you need to understand what data needs to be filled in the document.
  • An example of our document is located here
  • Paste the required keys into the document
  • The keys are in the widget settings
  • You need to find the required entity, select the function, if necessary, click copy
  • The selected keys must be inserted into the template, in the place where we want to insert information from the entity card
  • It looks something like this:
  • An example of a completed document can be viewed here
  • You can see how to generate a document above.

Add a Google Sheets template

  • Determine what data needs to be filled in the table
  • An example of a table template is located here
  • Insert keys into table cells
  • Keys for data substitution are in the widget settings
  • Select the entity, specify the function if necessary and copy the key
  • Place the keys in the required table cells - data from Kommo will be inserted there
  • Example of a completed table template:
  • An example of the generated table can be viewed here
  • Instructions for creating a document are above.

Add a Google Slides Template

  • Determine what information needs to be included in the presentation
  • An example of a presentation template is located here
  • Add keys to your presentation slides
  • The list of available keys is in the widget settings
  • Select the desired entity, specify the function if necessary and copy the key
  • Paste the copied keys onto the slides in the places where you want the data from Kommo to appear
  • Example of a presentation template with keys:
  • An example of the generated presentation can be viewed here
  • Instructions for generating a document are above.

Setting up an invoice template

  • The widget can generate an invoice document for the last invoice in a lead, for this there are all the necessary keys
  • First you need to create an invoice template (Google Docs), our example is located here
  • Account keys can be found in the Lists entity.
  • All matching keys will be signed Invoices/Purchases.Last Invoice

Adding an image to a document

You can upload an image to a document:

  • Add a File field to the lead and upload an image
  • Insert the {{lead.FieldName}} key into the template

In order to change the image size, you need: for example, you need to insert a logo image into the document, look for the key in the settings and add :h50 before the closing brackets, where h is the height and 50 is the size in pixels

  • add {{lead.Photo1:h(number of pixels)}} height or {{lead.Photo2:w(number of pixels)}} - width to the key
  • The widget maintains proportions, so you need to specify either the width or height, depending on what dimensions you need to substitute the photo for
  • Example of a generated image:

!!! If, when generating a document, the image inserted into the document is not displayed in the generated document, then you need to download all the images from the document to your computer and load them from the computer into the template

!!! If you are inserting an image into a Google Sheet, these dimensions will not matter. In order to foresee the dimensions in advance, you need to stretch the cell into which the image will be inserted to the required size, then the inserted image will take the size of the cell

Examples of standard documents

Integration with SABY

Integration with SABY is setting up automatic data exchange between your Kommo and the SABY platform.

It allows:

  • transfer documents from your system to SABY without manual copying;
  • synchronize directories (items, contractors, etc.);
  • automate workflows and reduce manual data entry.

Why is integration needed?

Integration solves the following problems:

  • Save time. There is no need to manually upload and download files or transfer data from one system to another.
  • Reducing errors. The human factor is eliminated when entering data, which increases its accuracy.
  • Increased processing speed. Documents and data are transferred instantly, speeding up business processes.
  • Data centralization. All information is synchronized and available in a single environment.
  • Meeting deadlines. Fast sending of reports and documents reduces the risk of late fines.
  • Ease of use. Employees work in a familiar accounting system, and SABY performs the functions of electronic document reporting and reporting “behind the scenes.”

To do this you need:

  • In the settings, select or add a legal entity. face
  • Click "Connect SABY", enter your account number, login and password.
  • Click "Save"
  • If necessary, enable the “Set task for signature” checkbox and select the employee who will sign the documents
  • After setting up the SABY connection, you must click Save

To upload a document to SABY, open the lead → Documents tab → click the SABY icon.

Formulas in documents

The templates can use not only simple arithmetic operations, but also other formulas based on Google Sheets functions.

  • Formula are inserted directly into the template in the format [[=...]].
  • You can use arithmetic operations +, -, *, /, parentheses and Google Sheets functions.
  • Not only calculations of amounts are supported, but also rounding, conditions, selection of minimum or maximum values, text and date formatting.
  • Example of a basic formula: [[=SUM({{lead.Price}}+{{lead.Delivery}})]]

Formula examples:

[[=ROUND({{lead.Сумма}}*1.2; 2)]]
[[=IF({{lead.Скидка}}>0; "Со скидкой"; "Без скидки")]]
[[=MAX({{lead.Сумма1}}; {{lead.Сумма2}})]]
[[=TEXT(TODAY(); "dd.mm.yyyy")]]

This approach allows you to use not only numerical calculations in a document, but also logic, comparisons, rounding, text substitution, and working with dates.

Generated documents

The “Generated” tab is designed to view and search for all generated documents in the system. It provides a convenient interface for:

  • display a list of documents
  • search by key parameters
  • page navigation (pagination)
Formed tab

UPD, Invoice, TORG-12, Act (XML Templates)

In the XML templates section, you can generate electronic documents in a structured format for further sending via EDI and signing with an electronic signature.

  • UPD - universal transfer document
  • Invoice - for issuance and transmission electronically
  • TORG-12 - delivery note
  • Act - act of work performed or services provided

ℹ️Important: XML document formats are used within the framework of the new Federal Tax Service requirements for electronic document management. To exchange formalized documents via EDI, it is necessary not only to generate a document, but also to sign it with a qualified electronic signature.

To generate documents in XML format, you need to go to settings, find the XML Templates block and enable the checkbox next to the desired template.

Settings - XML ​​Templates block
  • Save settings

Next, go to the lead, go to the Documents tab, and select the desired template.

Selecting an XML template in the Documents tab

SelectLegal. face

Selecting a legal entity

And select the account for which you want to generate XML.

Selecting an account for XML generation

After generating the XML file, the document must be signed electronically. Typically, a qualified electronic signature (CES) of a manager or authorized employee is used.

  1. Generate the required XML document in the widget and save the file to your computer.
  2. Make sure that the CEP certificate is installed on your computer and that you have access to the signature media if the certificate is stored on a token.
  3. Install the CryptoPro CSP program. If necessary, additionally configure the signing module or utility through which XML files are signed in your company.
  4. Open the signing tool, select the XML file, provide the signer certificate, and sign.
  5. Next, select the appropriate option for working with the document: independent signing and sending to the client using any agreed exchange method, or uploading XML into the EDF system, if signing and exchange are carried out within the EDF.

If you are signing documents through CryptoPro for the first time, you usually need to: install CryptoPro CSP, check that the certificate is visible in the system, connect the signing token, and only then select the XML file for signing.

If your organization performs signing according to internal regulations or through a separate EDI service, be guided by the requirements of this service: in some cases you only need an XML file, and in some cases you need XML along with a separate signature file.

Data transfer information

ℹ️The servers of this service (Google Drive) are located outside the Russian Federation. If you process personal data of citizens of the Russian Federation, we recommend that you ensure compliance with the requirements of Federal Law No. 152-FZ “On Personal Data” regarding cross-border data transfer.