Web Data Entry Automation. CSV to Salesforce – UiPath Studio

By | January 28, 2020

How to Import Salesforce contacts from a CSV
file using UiPath Studio In this example, we will create a workflow
that will automatically upload contacts from a CSV file into your Salesforce account. Lets say, you have already have a Salesforce
account and you want to import contacts. I will using the most common standard csv format.
Here have an example of a CSV file with Last Name, First Name, Phone and Email Address.
Let’s open UI Path Studio and Create a new workflow by clicking the New workflow box.
Let’s delete the default Opening Sequence so we can start a new one.
The whole automation process will start from opening the web browser, logging in to the
account and entering the data. Let’s start by telling UIPath to imitate our manual actions.
Let’s click on the Record button and Click Record Web
You can type in the full URL in the URL box or you can just put in – salesforce.com. Let’s
leave everything to default. We’ll use IE as our browser.
Let’s click Open. This will open the salesforce website automatically in Internet Explorer.
Now we are in the recording mode. As you can see there’s an orange box every time we
are highlighting an element in the page that’s because UiPath recognizes each element of
the page in which actions can be performed. That means the automation still works. No
matter where the location of the element is. Let’ highlight the Login button and Click
on it. Log in using your Salesforce administrator account. Let’s put in the email address.
This will gives you this pop-up window. Just put in the data and press Enter. Let’s do
same with the password. Then click the Login button. Now that we are logged in, we are ready to
input new data. Go to the contacts tab. Click on New contact.
Let’s fill in the Contact information: Let’s put in the required fields which are highlighted
with a red bar. Let put in the First Name, Last Name. For account name, let’s put in
Salesforce – this is the default for a new Salesforce account. Then email address, phone
number. We are basing the other information from our CSV sample.
Let’s say we have more data to fill out but we need to scroll the page. We can’t
do that since we are on the recording mode. Here’s what we can do, You can press F2
to stop the recording mode in few seconds then we can scroll down the page. There, we
are now ready to fill out more info. When its complete, Click Save and New. And
we are ready to enter new data. But we will stop the recording now. All actions we needed
for the automation process are done. Let’s Press ESC to stop recording and click
Save and Close. Our new Record Sequence will be in our workflow. We can now connect the Recording Sequence
as our Start node by dragging this line to it.
We are ready to test our Recording. But let’s close the Internet Explorer window first.
Go to the Execute tab and click Run button. You can also press F5 as a shortcut.
By the default, before performing an action, the UI path waits for the page to start loading
until the full webpage is loaded. Let’s now create an action to open our CSV
file and capture data from it. In the Activities Bar, search for Read CSV.
Drag and the drop it to the workflow, then double click to open it. Now let’s click
this button to specify the location of the CSV file.
Let’s Go back to the Main window of the workflow. Let’s make this as a start node.
Right-click on it and select Set as Start Node.
The output of this Activity will be stored in a variable which UIPath uses to store and
transfer data between activities. In this case, we will use the data from the CSV file
and store it in a DataTable format. The variable name for the Output value is
set automatically but let’s rename it to make it more readable. Let’s name it dtContacts”.
We’re going to use this later on. Next, we will create an activity that will
fetch the data from the CSV file. Let’s find “For Each Row in Datatable”
in the activities bar. What it does is it will perform a loop to pick up all the data
from the data table in each row. Let’s change the reference variable by changing
this into dtContacts so it will read our CSV file.
While we are on this For Each activity, Let’s give it an output by using a write line action.
Let drag it here in the body. Then type in row(“Last Name”).ToString. This expression
will convert the value from the Last Name from the header of the CSV file to a text
format. Let’s do some test first. Let hit F5 to
run the current workflow. In the Output window, It gives Smith and Ryan. So it works!
Now we are ready to produce the output in Salesforce. Let’s move this into the Recorded
Sequence. Right click on it and select cut. Let’s put it here – right after the the
“New” button has been clicked. I am going to move the action that I wanted
to be repeated inside the “Body” of the For Loop.
Let’s now change the manual inputted values into the value of the data table so I am going
to change this to row(“First Name”).ToString Let’s leave the account name to “salesforce”
since data won’t be changed. What I am putting here is the Exact letter
format from
the CSV file. Ok we’re done.
Let’s make the last changes in the workflow by connecting all the activities.
Let’s rename this to “Salesforce import” Alright, we’re done! Let’s now see it
in action! Let’s execute the workflow by pressing F5. There as you can see. By just one click. It
performs the actions automatically. It logs in. It goes to the Contacts page and enter
the values from the CSV file. That’s it! Now you have a solution of importing
large amount of data to your Salesforce contacts or other CRM Software!
For more helpful tips and tutorials go to support.uipath.com. Thanks for watching!

20 thoughts on “Web Data Entry Automation. CSV to Salesforce – UiPath Studio

  1. Laura Broder Post author

    When I try to use "Open Browser" I get the error, "End of expression expected." Help? http://screencast.com/t/nNIgWmjiBYs

  2. Laura Broder Post author

    I am following this exactly and am getting the error 'System.Data.DataRowCollection' cannot be converted to 'System.Data.DataTable' on my "For Each" action

  3. Arne Jomar Rundhaug Post author

    Good video, annoying music, better without music

  4. Gee Shepherd Post author

    This video is out of date and needs to be updated. There is no up to date documentation on how this is done. Programming > DataTable > LoopExamples is no longer there. Further documentation can not be found on how to do web data entry with UI path and Excel. All documentation leads back to this video.

  5. Ashutosh sinha Post author

    Hi, I have tried the same approach however when it comes to the giving the First Name tab , the recording get failed here and throwing error like Type into 'INPUT 60:2433;a' : Cannot find the UI element corresponding to this selector: <webctrl id='60:2207;a' tag='INPUT' />. Please suggest when i'm missing something

  6. Darshna Kadam Post author

    UI Path basically captures X and Y coordinates of the desktop screen. What if the screen resolution changes?

  7. Hitesh Singh Post author

    Not able to insert value in a column of each row of csv file from windows form , please help
    in elaborated steps

  8. ASFIYA TABASSUM Post author

    Please remove the background music in the video, it's causing lot of disturbance

  9. Nagulmeera Shaiks Post author

    can you tell what is difference between Autoamtion anywhere and uipath Tool???

  10. Nagulmeera Shaiks Post author

    I have experience in AA, what most advance feature in uipath then AA??

  11. Kulguri Jüri Post author

    I dont have the command Read CSV 🙁

  12. B2X Central Post author

    Digital Transformation Advisors® – We provide IT Staffing, TOGAF Architecture, Blockchain, Middleware and more !

  13. siva kumar Post author

    In the contact list i want to select the salutation by dynamically from excel sheet how to do it can u help

  14. Dasharath M Shetty Post author

    hi UI path . i'm getting error while doing orchestar settings . while copying the machine key and orchestar url , i'm getting error like " given header id not found" please help me

  15. Vivek Singh Post author

    It's very complicated, my personal software who made by me is very simple then you.

  16. sanjit mandal Post author

    Watch this video to learn: UiPath ReFramework Overview and interview quetion
    Please Subscribe this channel:

  17. Dasun Kanchana Post author

    free download uipath projects :https://youtu.be/snygW10ee1c


Leave a Reply

Your email address will not be published. Required fields are marked *