Guided Lab Exercise - Upload of Contacts From Google Sheets To Salesforce

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Workato Partner Technical Enablement Program

Basic Phase

Guided Lab Exercise:


Upload of Contacts from Google Sheets to Salesforce
Guided Lab Exercise: Upload of contacts from Google
Sheets to Salesforce

1) Introduction
In this guided lab exercise, you will create a recipe which will take the list of contacts from
Google Sheets and upload them to your Salesforce account. In Salesforce, this means storing
them as accounts and contacts. Accounts are companies that you're doing business with, and
contacts are the people who work for them.

For more information, you may read:


https://trailhead.salesforce.com/content/learn/modules/admin_intro_accounts_contacts/admin_intro_
accounts_contacts_basics.

Your Google Sheets to Salesforce recipe (High level flow)


- When a row is created or updated in Google Sheets:
- If account (company) is new, create account
- If contact is new, create contact and sync fields (email, phone, etc.)

What you’ll learn


- Connect applications and build a recipe that executes basic workflow
- Pull data from application and map into workflow
- Run jobs and utilize the jobs report

2) Setting Up
1. Sign up for a Salesforce Developer Account at: https://developer.salesforce.com/signup

2. Create a Google Spreadsheet and name it as Contacts for Upload into Salesforce. Copy
the data in this document: https://bit.ly/2V5tboW and paste it into this Spreadsheet. If
you do not have a google account, create one at: https://drive.google.com.

3. Log in to your Workato account.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

1
3) Connecting your applications

Set up Google Sheets connection


4. Select the App Connections tab and click Create a new connection (note: you can put
the connection in a folder by selecting the folder first).

5. For the Application, select Google Sheets.

6. Name the connection however you want. We suggest keeping it as unique as possible,
such as including your name in it. (e.g. John Smith Google Sheets Account)

7. Click Link your account.

8. You will be prompted to provide the credentials of your Google Drive account. Enter
your credentials and you will now be able to use this connection anytime to build
recipes in this Workato account. Select the App Connections tab again to create your
next connection.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

2
Set up Salesforce connection
Follow the same steps as above to set up your Salesforce connection.

9. Click Create a new connection.

10. For the Application, select Salesforce.

11. Name the connection however you want (e.g. John Smith Salesforce Account).

12. Keep the Sandbox input field: No, unless you are connecting to your own Salesforce
sandbox account.

13. Click Link your account.

14. Enter the credentials of your Salesforce account and you are now ready to build your
recipe.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

3
4) Building your recipe

Create a new recipe


15. Select the Recipes tab, if you aren’t there already

16. Click Create a new recipe in the upper right.

Setup your recipe


17. Name your recipe eg. Upload of contacts from Google Sheets to Salesforce

18. Choose the folder you want to store your recipe in

19. Pick Trigger from an app as the starting point

20. Click Start building

Set trigger to start on a new or updated row in Google Sheets


21. On the right of the recipe editor, select Google Sheets as the App for your trigger.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

4
22. Next, you will be selecting the Google Sheets account which you have previously
connected to.

23. Select the trigger event as New/updated row in sheet in My Drive (Real Time).

24. Click Next to configure the trigger. Fill up the required input fields based on what you
have created in Step 2:

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

5
Spreadsheet Contacts for Upload into Salesforce
Sheet Sheet 1
Column to monitor All columns
(Note: Selecting this means the recipe will run
whenever there’s any changes in all existing
columns.)

a. It should look like the below:

25. Click Save on the top right corner.

Add an action to search accounts in Salesforce


Now, we will first search the records in Salesforce to see if the account exists.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

6
26. On the left side of the recipe editor, click on the + button to add an Action in an app.

27. On the right side of the recipe editor, select Salesforce as the App and select the
connection which you have created earlier for Salesforce.

28. Select Search records (Account) as the Action.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

7
29. The following fields will have been pre-filled in your action:

Search for Accounts


Limit 150

30. Leave the rest of the optional input fields blank, except for Account Name. Click on the
Account Name field and the view (as shown in the screenshot below) will show up.

31. On the left of the screenshot above, you can find the Recipe data. This is where you can
find the output data from earlier steps to map to your current step. For Salesforce’s
account name, drag and drop Company from the Recipe data. Pay attention to ensure
that you are using Company from your step 1 output, which is the Google Sheet:

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

8
32. Close the view on the right and Save your recipe as a good practice.

Add a conditional action to create account if it is not present


33. Click the + at the bottom of your Action line and select IF condition.

34. Click in the Data field on the right. Select Account ID|Step 2 of the Salesforce action
output. Set the Condition to is not present. It should look like this:

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

9
35. Click your If condition row to close it. Your Actions should now look like the below:

Configure action to create account


36. Click Select app and action to do when condition is met. Select Salesforce as the App
and Create record as the Action.

37. Select Account as Object.

38. For account name, drag and drop Company|Step 1 from the Recipe data on the left. Pay
attention that you are using Company from the step 1 output:

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

10
39. Close the view on the right and Save your recipe as a good practice.

Add an action to search contacts in Salesforce


Now that we have completed the creation of new accounts, we will now search the records in
Salesforce to see if the contact exists.

40. Click the + at the bottom of your Action line and select Action.

41. Similar to what we have done previously, select Salesforce as the App and Search
records as the Action.

42. Fill in the following fields:

Search for Contact


Limit 150
Email Email | Step 1

Note: If you cannot find the Email field, click on the Show optional fields at the top and
search for Email. Check the box beside Email and click on the Apply changes button at
the bottom.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

11
43. Close the view on the right and Save your recipe as a good practice.

Add a conditional action to create contact if it is not present


44. Click the + at the bottom of your Action line and select IF condition.

45. Click in the Data field and set it to the Contact ID|Step 5 of the Salesforce action output.
Set the Condition to is not present. It should look like this:

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

12
46. Close the view on the right.

47. Click Select app and action to do when condition is met.

48. Select Salesforce as the App and Create record (Contact) as the Action.

49. Fill in the following fields, paying attention to which output steps are being used:

Last Name Last Name | Step 1


Account ID Account ID | Step 2 or Object ID | Step 4
(Note: Toggle to formula mode)
Email Email | Step 1
First Name First Name | Step 1
Mobile Phone Phone | Step 1

Note: If you cannot find the fields above, click on the Show optional fields at the top and
search for the fields you need. Check the boxes and click on the Apply changes button at
the bottom.

a. For Account ID above, change to formula mode

50. Close the view on the right and Save your recipe as a good practice.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

13
Final recipe workflow
This would be how your recipe should look like:

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

14
Test your recipe and make sure that Account and Contact have been created
51. Click on Test recipe on the top right corner which will run the recipe just once.

52. Log in to your Salesforce account. Click on the App Launcher icon at the top left hand
corner of the page as well as Accounts. Do the same for Contacts as well.

a. You should see your new account created:

b. You should also see your new contact created with the appropriate fields filled:

View the job audit trail


53. Back in the Workato platform, click on the Exit button on the top right corner to exit the
full page view of the recipe editor.

54. Look at the jobs in your Jobs tab in Workato. You should see a new job created.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

15
55. Click the Job ID link for the job. You may review the data in the audit trail (e.g. click the
trigger line/output tab and action line/input tab).

Start and run your recipe


56. Now that your recipe is working, head back to your recipe. Click Start recipe on the right
to pick up all available trigger events in Google Sheets.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

16
Customize your job table columns
You may have noticed that the job table which shows your instances of jobs run has some
information at the table level for each job. However the default information and format shown
may not be so useful to you, e.g.:

It is best practice to customize the job table columns to display meaningful data so you can
better understand your job runs at a glance.

57. Stop your recipe, if it is running.

58. Click the three dots at the top right of your job table and select Customize job table.

59. Configure the job table to show some useful data. For example, theName, Emailand
Company fields, as shown below. Do note that the new structure / fields will only be
populated for new runs of your jobs

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

17
60. The new structure / fields will only be populated for new runs of your jobs. Your job
table should now look like the below.

5) Congratulations!
You have successfully created a recipe to upload contacts from Google Sheets to your Salesforce
account. You may now proceed to submit your recipe.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

18
6) Submitting your recipe
Once you have completed your recipe, please follow the steps below for submission:

A. Please insert the name of your company at the start of your recipe name: [Your
Company’s Name] Recipe Name.
Example: [Workato] Upload all contacts from the Google Spreadsheet into Salesforce

B. Next, go into Automation Institute (https://workato.com/institute) → Basic Phase and


click on the Guided Lab Exercise:

C. Click on “Start Quiz” and you will be prompted to submit your recipe link:

D. To obtain your recipe link:

i. In your recipe page, click on Settings. Next, click on Sharing on the left hand side.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

19
ii. You will now see your recipe link which contains the sharing token for private
sharing. It will look something like this:
https://www.workato.com/recipes/1282352?st=098450. Only people with this
link can view your recipe. Click on Copy.

iii. Thereafter, paste it to the input field in Automation Institute:

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

20
iv. Click on Next Question and input the number of hours spent completing this
exercise. This information is solely to provide us with feedback.

v. Click on Next Question you can input any difficulties or feedback on the exercise:

i. If you have no comments, simply leave a “nil” reply.

vi. Thereafter, click on Submit Quiz and you are done! The Workato team will review
your submission and go through this during the upcoming lab hour.

© Copyright 2021 Workato Inc. All rights reserved.


This document contains proprietary information and intellectual property of Workato Inc. Please be aware that
disclosure, copying, distribution or use of this document and the information contained therein is strictly prohibited.

21

You might also like