Automate generating Files from templates

Drive Connect Automation allows users to automatically generate a Drive Connect template and link it to the Drive Links component by selecting the New File from Template operation in a Record-Triggered or Schedule-Triggered flow.

For more information on setting up a flow using the Automate Drive action, see the Using Drive Connect Automation with Salesforce flows article.

New File from Template

In your flow, open a new action element node and follow the steps below:

  1. Click the Operation picklist and select New File from Template
  2. Under Template, select the drop down option From Drive and then click on Select a Template
  3. Select a template file from your Drive Connect templates folder within the Google picker
  4. You can also create a new file from template if you know the template ID. Select From a Text Variable from the template drop down. If you create a text variable with the template ID as a value you can use that to generate the files. 
  5. Select a Destination for the template to be created in Drive. For more information on destination locations, see the Automate Drive Destination Locations article.
  6. Select a Generated File Format of each file type:

    Google Doc

    PDF Document (.pdf)
    Microsoft Word (.docx)

    Google Sheet
    PDF Document (.pdf)
    Comma Separated Values (.csv)
    Microsoft Excel (.xlsx)

    Google Slide
    PDF Document (.pdf)

    Microsoft PowerPoint (.pptx)
    If you selected From a Text Variable or From Drive without selecting a template then you will see a new set of generated file formats.

Note: If you receive a warning regarding insufficient access for the Automated Process User, ensure the folder location you select is accessible by the Automated Process User with full edit rights. For more information, please see the Granting Access to Folders in Drive article.

  • Optionally set whether the new file should be linked to the Salesforce record

Child Operations

When selecting New File from Template as your top-level operation, you can add additional child operations by selecting Add Child Operation

Below is a breakdown of each child operation and their behavior:

Save File to Salesforce

This child operation will save the generated Drive Connect template from the parent operation to salesforce. For more information on using Save File to Salesforce, see the Save a linked Google Drive File to Salesforce article.

Note: You can add Update Record Field as a child operation to Save to Salesforce. The values for this are: Salesforce Content Document ID, Salesforce Content Version ID, Salesforce Content Document Record URL, Salesforce Content Document Public Link.

New Drive Shortcut

This child operation allows you to auto-create a Drive Shortcut of the parent Drive file in any destination location. If selecting this operation, complete the following steps below:

  1. For Shortcut Name, the parent file name can be modified
    • Similar to files, you can utilize merge fields in the shortcut name by selecting the brackets button within the field
  2. Select a Destination for the shortcut to be created in Google Drive. For more information on destination locations, see the Automate Drive Destination Locations article

This child operation allows you to link the parent-level file to the parent Salesforce record. If selecting this operation, complete the following steps below:

  1. Select a Lookup Field to Parent Record

Update Record Field

This child operation allows you to update a field from a Salesforce record with a value of either Google Drive Folder URL, Google Drive Folder ID, Salesforce Content Document ID or Salesforce Content Version ID. If selecting this operation, complete the following steps below:

  1. Select a Field that will be updated when the automation triggers
  2. Select a Value

 

For more information on saving and activating your flow, see the Using Drive Connect Automation with Salesforce flows article.