Google Sheets Overview

Document Generation allows Salesforce record data to be merged with Google Sheets. Additionally, users will be able to update the Google Sheet with the latest data inside of Salesforce using Drive Connect.

How it works

Merging Google Sheets

Drive Connect’s Drive Links & Drive File components support merging Google Sheets documents. Only after updating to a package with this feature will Google Sheets with merge fields return data from Salesforce (3.31 or after). Our merge generator supports basic, look-up and related list merge fields as well as support for functions and charts.

Merge Limitations

Drive Connect document generation does not support conditional logic merge fields for Google Sheets.

For functions such as SUM, where a range is required, it is highly recommended to leave an empty cell directly below a related list merge field so that the SUM takes the values that dynamically grow from the merge.

Note: If you would prefer not to have an empty row between your totaled formula and your related list, use the hide row option in Google Sheets

Due to limitations from Google Sheets and how charts require valid data points (merge fields themselves do not count) to customize or setup series, only a few charts will be available for merge and these include:

  • Line Charts
  • Area Charts
  • Stepped Charts
  • Column Charts
  • Bar Charts

It is recommended that if you would like to use any specific combination of customization or series in your charts, (stacking or pie chart) that you first merge the sheet as a Google Sheet to get the data and then create a chart from that document.

Note: In order to be able to merge a Google Sheet at all with a chart, the Use Column as Labels within the chart editor must be checked.

Remerge File Data

Only documents that have been merged as a Google Sheet will be given the ability to remerge which is under Update File Data. Once remerged, any supported merge fields will update with new data from the record while also maintaining any manually updated text in the document. Conditional merge fields are not supported on remerge.

Note: If a single cell contains multiple valuables only the merge field will remain on remerge. For example:

In a single cell: Todays Date: {{!Opportunity.CloseDate::MMMM D, YYYY}}

On Merge: Todays Date: [merge field value]

On Remerge: [merge field value]

Also if you have multiple merge fields in a single cell only one of the merge fields will remain. For example:

In a single cell: {{!$Organization.Name}} {{!$Organization.Street}}

On Merge: [merge field value] [merge field value]

On Remerge: [merge field value]

Regenerate as New File

Only documents that have been merged as a Google Sheet will be given the ability to remerge which is under Update File Data. Once regenerated, the document will merge again using the base template of the originally merged document.

For more information on document generation please refer to Generate Google Docs from templates on a Salesforce record.