Adding data to Google Sheets when a new lead is added to Salesforce
Learn how to use App Connect to connect Salesforce to Google Sheets so that every time a new lead is added in Salesforce, details of that lead are added automatically to a row in a Google Sheets spreadsheet.
Find or create what you need
- An App Connect subscription
- The name and password of your Salesforce account.
To create a free test account in Salesforce rather than use your business account, register for a Developer account from this URL: https://developer.salesforce.com rather than a Trial account. If you connect to App Connect with a Trial account, the Salesforce events don't work.
- To connect IBM App Connect to Google Sheets, you use basic auth with OAuth credentials. You need to provide an OAuth 2.0 client ID, client secret, access token, and refresh token with appropriately selected scopes for Google APIs. Getting those OAuth credentials is described in Getting OAuth client ID, client secret, access token, and refresh token for Google applications.
- A Google Sheets spreadsheet where the first row contains the following column names:
- Company name
- First name
- Last name
- Source
Create your flow
Use the following steps in App Connect to create the flow from scratch.
- From the Designer dashboard, click .
- Complete the following steps. As you progress, App Connect automatically saves your changes. If
you move away from the flow at any stage, the flow is saved as a draft flow that you can complete at
another time.
- Enter a name that identifies the purpose of your flow; for example:
Add row for new lead
. - Select Salesforce as your first application (source).
- Select New lead as the Salesforce event that triggers the action in Google sheets.
- If you haven't already connected a Salesforce account, click Connect and follow the instructions to allow App Connect to connect to your Salesforce account.
- Select Google Sheets as your second application (target).
- Select Create row as the Google Sheets action.
- If you haven't already connected a Google sheets account, click Connect and follow the instructions to allow App Connect to connect to your Google Sheets account.
- Complete the following steps to choose the data that you want to transfer from Salesforce to
Google Sheets:
- Select the Google Sheets spreadsheet (and then the worksheet) that you configured with the column headings.
- For each field that you want to populate, click the Insert a mapping icon , then select the Salesforce field that contains the data that you want to transfer to Google Sheets.
- Enter a name that identifies the purpose of your flow; for example:
- To test the flow, click Start flow, then click Dashboard to exit the flow. Your flow is displayed on your Dashboard and is listening for your event – the addition of a new lead in Salesforce.
Test your flow
- Log in to Salesforce with the account that you configured in App Connect, then create a new lead.
- Add values for Company, First name, Last name, and Email, then save the record.
- Log in to Google Sheets with the account that you configured in App Connect. You can see a new row in your spreadsheet, and the row contains the details of the new lead that you entered in Salesforce.
Conclusion
You created a flow that automatically adds details of a lead to a row in a Google Sheets spreadsheet every time a new lead is added in Salesforce.