Prerequisites:
PreReq 2: Configure your python environment (Will be covered in below step by step guide) https://community.kryonsystems.com/KryoNet/s/feed/0D51o00006ppDQNCA2
Steps:
Setting Google vision API for Google Drive and sheets
Configure Kryon Studio/Robot python environment
Run python script in studio to get the data
Info: For google vision API, you must have gmail account. Signup with same account for Google vision API on below link and access the console: https://console.cloud.google.com/home/dashboard
Setting Google vision API for Google Drive and sheets
1. Go to "Google cloud console" and search for the user
2. Create a new project as shown below
3. Click on go to API Overview

5. Search for Google Drive API
6. Enable Google Drive API
7. Search for Google sheets API and Enable it as well
8. Create credential for access Google sheet API
9. Choose authorization and save the credential in json format
10. Downloaded json file
11. Json file contains client email , copy all the contents within quotes
12. Open a google sheet on a browser e.g. in my case i created "BankData"
13. Share the google sheet with client email obtained in step 11, as shown in below screen.
Note: There is no fixed way to create Project, enable API and get credential file in json format. You can search on google and check youtube videos guide for the same. Above steps just to contain all help at one place.
Configure Kryon Studio/Robot python environment
1. Open CMD window and navigate to python folder located inside Kryon Studio or Kryon Robot installed location i.e. C:Program File Kryon Studio Python
2. And type >> pip install gspread oauth2clienT. And then hit Enter as shown below:
3. Above steps will install required packages for working with google spread sheet using python
4. Use Run Script AC from Kryon Studio as guided in below steps
Run python script in studio to get the data
1. Open Kryon Studio and create a new Wizard and name it as required.
2. Add Run Script AC and add below python code
import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ["https://www.googleapis.com/auth/drive"] creds = ServiceAccountCredentials.from_json_keyfile_name("C:\temp\MyGoogleSheetProject.json", scope) client = gspread.authorize(creds) sheet = client.open("BankData").sheet1 data = sheet.get_all_records() print(data)
3. Your AC should look like as below :
3. And below is the result from variable Var_MyDT
4. You can match with google sheet screen shot which is shared above.
5. Once data inside Kryon studio, now you can manipulate it as required with many other AC inside Kryon Studio.
More Information: https://developers.google.com/sheets/api/guides/authorizing