HOW TO USE COLUMS ON A ROW FOR AN ACTIVITY ON GOOGLE SPREADSHEETS

Hi there! I need to know how can a automate my bot to get the 30 columns from the row 2 and download on a file the pictures, wich are stored in urls on this cells. This is all on google spreadsheets. How can I do this? If its not possible, how can I ‘recreate’ the activity ‘for each excel row’? Print screens ar more than welcome. Thank you sm!

To automate the process of downloading pictures from URLs stored in Google Sheets, you can use UiPath along with the Google Sheets API. The Google Sheets API allows you to interact with Google Sheets programmatically, and UiPath provides activities to work with API calls.

Here’s a high-level overview of the steps involved:

  1. Set up Google Sheets API: Before you can use the Google Sheets API, you need to create a project in the Google Developers Console, enable the Google Sheets API, and obtain the necessary credentials (API key or OAuth 2.0 credentials).
  2. Use UiPath Activities: a. Use the “Gsuite Application Scope” activity to set up the connection to Google Sheets using the obtained credentials. b. Use the “Read Range” activity inside the “Gsuite Application Scope” to read the data from Google Sheets. Specify the range as per your requirement (e.g., “A2:AD” to read 30 columns from row 2). c. Use a “For Each” activity to loop through the rows obtained from the “Read Range” activity.
  3. Download Pictures: a. Inside the “For Each” loop, access the URL in the respective cell containing the picture’s link. b. Use the “HTTP Request” activity to download the picture from the URL. c. Save the downloaded image to your desired location on your local system using the “Write Binary File” activity.

As for “recreating” the “For Each Excel Row” activity, UiPath doesn’t have a built-in activity with the exact same name for Google Sheets as it does for Excel. However, using the Google Sheets activities, you can achieve a similar functionality by reading the data using “Read Range” and then iterating through the DataTable using a “For Each Row” activity.

Please note that using APIs and integrating with external services might require some technical expertise, especially when dealing with authentication and API configurations. Make sure you are familiar with the Google Sheets API documentation and follow the best practices for handling credentials securely.

Below are some screenshot examples for using UiPath with Google Sheets:

  1. Setting up Google Sheets API

  2. Read Range activity

  3. For Each Row activity

  4. HTTP Request activity

  5. Write Binary File activity

Hey! I did do the ‘recrate’ the ‘for each row’ exactly like you said but when I need to download the urls on the browser, with the type into activity does not appears the variable of the range.

Hi @Carvalho_Vini

Go to properties panel and wherever you want to enter the variable you can enter from there.


Hope it helps!!
Regards,

Hey! the ‘for each row’ still dont appears on ‘type into’ sadly.

@Carvalho_Vini

Actually to use type into activity you need to use it under Use Application/Browser activity. Can I know what are you typing with type into activity so I will suggest you an answer.

Regards,

1 Like

I need to type on the browser the url of the pictures so I can download them

Can you provide a screenshot?

@Carvalho_Vini

  1. Use “Use Application/Browser” activity an indicate the screen that you get when you open google chrome. refer the below image
  2. Under that in Search tab you can type the URL by giving “Type Into” activity.

Regards,

this is how the links are, I need to open the urls then download the pictures.

try using the click activity

tryied too :sweat: it doen’t recognizes the cells

Have you tried the read cell formula activity?

@Carvalho_Vini Have you tried the above one as I said.

Regards,

1 Like

I also thought about it but would have to do the same activity 30 times

@Carvalho_Vini

If the above steps worked great for you. Please mark it as solution to close the thread. If further help needed I will help you out.

Happy Automation :slightly_smiling_face:
Regards,