Artisan IMG > Salesforce (salesforce) (dd966f42-81e8-4770-a3d8-d095ca41ab45)
Artisan IMG > Google Sheets (sheets) (a894e6ff-8a08-4375-ac35-ab9b5d2bc849)

Export Salesforce query to new Google Sheet

Workflow
Sales
Beginner

This is a 'Workflow' template which means that it is a single standalone workflow.

Some workflow templates can be modified to work with other workflow templates - e.g. to convert a data sync between two services from uni-directional to bi-directional

Overview
Copy

This template will allow you to take a small set of Salesforce records (maximum 2,000) at a time and create a new Google Sheet from them. Upon completion a user is emailed about the a newly created report. For example a list of leads associated to a certain sales team member.

If there is a need to quickly make a google sheet from a set of Salesforce objects, this can be accomplished with the following Tray.io template. It takes a single Salesforce query and aligns it to a new Google Sheet. The resulting workflow can be set to a schedule if preferred.

Connectors Used
Copy

The following connectors are used in this template. This is provided for reference only - there is no need to read through the linked connector pages, as all you need to know for this template is explained here:

End Result
Copy

The images below show a newly created and populated Google spreadsheet based off the primary Salesforce query sent.

As well as the email notification sent to the user.

Prerequisites
Copy

This workflow assumes the following:

  • You have authentications to Salesforce and Google Sheets

  • You only wish to pull records from a single SFDC object type

Getting Live
Copy

In order to configure this workflow for use, simply:

For educational purposes, the rest of this page will take you through how the workflow template is built to achieve the desired results.

This will help deepen your understanding of Tray.io and will give you the power to maintain and edit your workflow as necessary.

Workflow logic
Copy

The overall logic of the workflow is:

Section 1 grabs the salesforce records from a Salesforce connector. This performs a single query to Salesforce with an object type, desired fields, and a set of conditions.

Section 2 creates a new Google Sheet spreadsheet and adds a Header row based on the API names of the fields selected in the Salesforce step. The report can be adjusted later for column names and order.

Section 3 loops through the SFDC records and, for each record, creates a new row of data in the spreadsheet based on each record’s field values.

Section 4 sends an email reminder to the user to tell them their report is ready / updated.

Step-by-step breakdown
Copy

Section 1: Get Salesforce record details
Copy

Section 2: Create Google spreadsheet and add headers
Copy

Section 3: Add data to spreadsheet
Copy

Section 4: Send email notification
Copy