Export Salesforce query to new Google Sheet
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
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.
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:
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.
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
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.
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.