### Verify Project Installation Output Source: https://documentation-dev.botcity.dev/tutorials/python-automations/legacy-templates/web Example of the expected console output confirming successful installation of the project in development mode. ```text <... other output from installation ...> Running setup.py develop for HelloWebBot Successfully installed HelloWebBot-1.0 ... ``` -------------------------------- ### Complete BotCity Recorder Example Source: https://documentation-dev.botcity.dev/plugins/recorder A full implementation example showing the instantiation, recording start, bot action, and recording stop. ```python from botcity.core import DesktopBot from botcity.plugins.recorder import BotRecorderPlugin def main(): # Instantiate the DesktopBot bot = DesktopBot() # Define the URL with the search term `countdown timer 5 minutes`. url = "https://www.google.com/search?q=countdown+timer+5+minutes" # Instantiate the recorder with the bot and file recorder = BotRecorderPlugin(bot, "test.avi") # Start recording recorder.start() # Invoke the browser to open the URL. bot.browse(url) print("Waiting for a little bit...") bot.wait(10000) # Stop the recorder recorder.stop() ``` -------------------------------- ### Successful installation output Source: https://documentation-dev.botcity.dev/tutorials/python-automations/legacy-templates/desktop Example of the terminal output confirming the successful installation of the project. ```text <... other output from installation ...> Running setup.py develop for HelloBot Successfully installed HelloBot-1.0 ... ``` -------------------------------- ### Complete Email Plugin Code Example Source: https://documentation-dev.botcity.dev/plugins/email A comprehensive example demonstrating the import, instantiation, IMAP configuration, and basic setup for the Botcity Email Plugin. This serves as a starting point for more complex email operations. ```python # Import the plugin from botcity.plugins.email import BotEmailPlugin # Instantiate the plugin email = BotEmailPlugin() # Configure IMAP with the gmail server email.configure_imap("imap.gmail.com", 993) ``` -------------------------------- ### Installation and Import Source: https://documentation-dev.botcity.dev/plugins/http Instructions on how to install and import the Botcity HTTP Plugin. ```APIDOC ## Installation ```pip install botcity-http-plugin``` ## Importing the Plugin ```from botcity.plugins.http import BotHttpPlugin``` ``` -------------------------------- ### Finish task examples Source: https://documentation-dev.botcity.dev/cli/task-finish?q= Examples demonstrating how to finish tasks with various parameters and status types. ```bash ./BotCLI task finish -taskId "123" -totalItems 100 -processedItems 100 -failedItems 0 ``` ```bash ./BotCLI task finish -taskId "14" -message "The task is finished" -totalItems 5 -processedItems 5 -failedItems 0 ``` ```bash ./BotCLI task finish -taskId "15" -message "Bot skipped 2 rows." -finishType "PARTIALLY_COMPLETED" -totalItems 10 -processedItems 9 -failedItems 1 ``` -------------------------------- ### Installation and Importing Source: https://documentation-dev.botcity.dev/plugins/aws/s3?q= Instructions on how to install the botcity-aws-s3-plugin and import it into your Python project. ```APIDOC ## Installation ```python pip install botcity-aws-s3-plugin ``` ## Importing the Plugin ```python from botcity.plugins.aws.s3 import BotAWSS3Plugin ``` ``` -------------------------------- ### Install Slack Plugin Source: https://documentation-dev.botcity.dev/plugins/slack Install the required package via pip. ```bash pip install botcity-slack-plugin ``` -------------------------------- ### Complete Excel Automation Example Source: https://documentation-dev.botcity.dev/plugins/microsoft/excel A full example demonstrating the end-to-end workflow from instantiation to saving a file. ```python from botcity.plugins.excel import BotExcelPlugin # Instantiate the plugin bot_excel = BotExcelPlugin() # Read from an Excel File bot_excel.read('read.xlsx') # Add a row bot_excel.add_row([0, 22]) # Sort it by columns A and B in descending order bot_excel.sort(['A', 'B'], False) # Print the result print(bot_excel.as_list()) # Save it to a new file bot_excel.write('write.xlsx') ``` -------------------------------- ### Install the HTTP Plugin Source: https://documentation-dev.botcity.dev/plugins/http?q= Install the required package via pip. ```bash pip install botcity-http-plugin ``` -------------------------------- ### Installation Source: https://documentation-dev.botcity.dev/plugins/aws/sqs Install the BotCity AWS SQS plugin using pip. ```APIDOC ## Installation ```pip pip install botcity-aws-sqs-plugin ``` ``` -------------------------------- ### Install BotCity Recorder Plugin Source: https://documentation-dev.botcity.dev/plugins/recorder Install the plugin package using pip. ```python pip install botcity-recorder-plugin ``` -------------------------------- ### Define workspace example Source: https://documentation-dev.botcity.dev/cli/workspace-set Example of setting the active workspace to a specific label. ```bash ./BotCLI workspace set -label "MyWorkspace" ``` -------------------------------- ### Install BotCity Maestro SDK (Python) Source: https://documentation-dev.botcity.dev/maestro/maestro-sdk/setup?q= Install the BotCity Maestro SDK using pip for Python projects. ```bash pip install botcity-maestro-sdk ``` -------------------------------- ### Complete BotFTPPlugin Example Source: https://documentation-dev.botcity.dev/plugins/ftp A comprehensive example demonstrating creating a directory, setting it as the current directory, uploading multiple local files, listing server files, and disconnecting. Requires 'os' module for local file handling. ```python from botcity.plugins.ftp import BotFTPPlugin import os # Connecting to server ftp = BotFTPPlugin("", "", "") # Creating a new directory and setting it to the current working directory dir_path = ftp.create_directory('tests/my_directory') ftp.set_current_directory(dir_path) # For each file in the local folder, upload it to the folder created on the server local_folder = 'downloads/files' for file in os.listdir(local_folder): ftp.upload_file(os.path.join(local_folder, file)) ftp.list_files() # Closes the connection with the server ftp.disconnect() ``` -------------------------------- ### Install BotCity Maestro SDK (NPM) Source: https://documentation-dev.botcity.dev/maestro/maestro-sdk/setup?q= Install the BotCity Maestro SDK using npm for Javascript projects. ```bash npm i @botcity/botcity-maestro-sdk ``` -------------------------------- ### Install project dependencies Source: https://documentation-dev.botcity.dev/faq?q= Use this command to install or upgrade project dependencies defined in the requirements.txt file. ```bash pip install --upgrade -r requirements.txt ``` -------------------------------- ### Get Upcoming Calendar Events Source: https://documentation-dev.botcity.dev/plugins/google/calendar?q= Retrieve upcoming calendar events using the `get_events()` method. This example iterates through the events and prints their attendees, description, and start date. ```python # Get upcoming calendar events events = googlecalendar.get_events() # For each event: prints the participants, description and start date. for ev in events: print(ev.attendees) print(ev.description) print(ev.start) ``` -------------------------------- ### User First Login Example Source: https://documentation-dev.botcity.dev/cli/login Example of how to perform the first login to the system using the BotCLI command with email and password arguments. ```bash ./BotCLI login -email "user_email@gmail.com" -password "UserPassword" ``` -------------------------------- ### Install BotCity SDK via CLI Source: https://documentation-dev.botcity.dev/getting-started/botcity-studio-sdk?q= Use the wizard install command to set up the SDK. Authentication via email and password is required. ```bash wizard install --email "user@server.com" --password "bot32r$3usr74" ``` ```bash wizard install --dir "C:\BotCity" --server "https://developers.botcity.dev" --email "user@server.com" --password "bot32r$3usr74" --organization "superbots" --runner "vm-01" ``` -------------------------------- ### Install BotCity AWS SQS Plugin Source: https://documentation-dev.botcity.dev/plugins/aws/sqs Install the necessary package using pip. This command should be run in your terminal. ```bash pip install botcity-aws-sqs-plugin ``` -------------------------------- ### Install Project Dependencies Source: https://documentation-dev.botcity.dev/tutorials/javascript-automations/web Install the Javascript package dependencies for your project. Navigate to your project folder and run this command. ```bash npm install ``` -------------------------------- ### Initialize and Run a WebBot Source: https://documentation-dev.botcity.dev/frameworks/web/python?q= Demonstrates how to instantiate a WebBot, configure the WebDriver path, navigate to a URL, and stop the browser. ```python from botcity.web import WebBot def main(): # Instantiate the WebBot bot = WebBot() # Configure whether or not to run on headless mode bot.headless = False # Set the WebDriver path bot.driver_path = "" # Opens the BotCity website. bot.browse("https://www.botcity.dev") # Wait 3 seconds before closing bot.wait(3000) # Finish and clean up the Web Browser bot.stop_browser() if __name__ == '__main__': main() ``` -------------------------------- ### Import BotSecretsManagerPlugin Source: https://documentation-dev.botcity.dev/plugins/aws/secrets-manager?q= Import the necessary class after installation to start using its functionalities. ```python from botcity.plugins.aws.secretsmanager import BotSecretsManagerPlugin ``` -------------------------------- ### Import BotAWSSQSPlugin Source: https://documentation-dev.botcity.dev/plugins/aws/sqs Import the plugin into your Python script after installation to start using its functionalities. ```python from botcity.plugins.aws.sqs import BotAWSSQSPlugin ``` -------------------------------- ### Start Browser Source: https://documentation-dev.botcity.dev/frameworks/web/navigation?q= Initializes the browser with default settings, preparing it for use. This method does not open the browser visually. ```Python # Start the selected browser. bot.start_browser() ``` -------------------------------- ### Start Browser (Java) Source: https://documentation-dev.botcity.dev/frameworks/web/navigation?q= Initializes the browser with default settings, preparing it for use. This method does not open the browser visually. ```Java // Start the selected browser. startBrowser(); ``` -------------------------------- ### Import BotAWSLambdaPlugin Source: https://documentation-dev.botcity.dev/plugins/aws/lambda Import the BotAWSLambdaPlugin class into your Python code after installation to start using its functionalities. ```python from botcity.plugins.aws.lambda_functions import BotAWSLambdaPlugin ``` -------------------------------- ### Example log creation command Source: https://documentation-dev.botcity.dev/cli/log-create Demonstrates creating a log named 'demoLog' with specific column configurations passed as a JSON string. ```bash ./BotCLI log create -activityLabel "demoLog" -columns '[{"name":"Date/Time","label":"timestamp","width":"150"},{"name":"Records","label":"numRecords","width":"100"}]' ``` -------------------------------- ### Import MS365 OneDrive Plugin Source: https://documentation-dev.botcity.dev/plugins/ms365/onedrive?q= Import the necessary plugin class after installation to start using its functionalities. ```python from botcity.plugins.ms365.onedrive import MS365OneDrivePlugin ``` -------------------------------- ### Import BotAWSLambdaPlugin Source: https://documentation-dev.botcity.dev/plugins/aws/lambda?q= Import the necessary plugin class into your Python code after installation to start using its functionalities. ```python from botcity.plugins.aws.lambda_functions import BotAWSLambdaPlugin ``` -------------------------------- ### Import Bot Whatsapp Plugin Source: https://documentation-dev.botcity.dev/plugins/whatsapp?q= Import the BotWhatsappPlugin class into your Python script after installation to start using its features. ```python from botcity.plugins.whatsapp import BotWhatsappPlugin ``` -------------------------------- ### Complete Google Drive Integration Source: https://documentation-dev.botcity.dev/plugins/google/drive?q= A full example combining plugin initialization, file searching, and downloading. ```python # Import the plugin from botcity.plugins.googledrive import BotGoogleDrivePlugin # Set the path of the credentials json file credentials = './resources/credentials.json' # Instantiate the plugin googledrive = BotGoogleDrivePlugin(credentials) # Get the id of the file named "my_image.png" stored on the drive file_id = googledrive.search_file_by_name("my_image.png") # With the obtained id, download the file googledrive.download_file(file_id, './images/my_image_from_drive.png') ``` -------------------------------- ### Initialize BotAWSSQSPlugin Source: https://documentation-dev.botcity.dev/plugins/aws/sqs Instantiate the plugin. You can use the default configuration if `.aws` folder is set up, or provide credentials directly. ```python # Using the ".aws" folder sqs = BotAWSSQSPlugin() # Alternative using the credentials as constructor arguments sqs = BotAWSSQSPlugin( use_credentials_file=False, access_key_id='', secret_access_key='', region_name='' # default-region='us-east-1' ) ``` -------------------------------- ### Import Botcity Email Plugin Source: https://documentation-dev.botcity.dev/plugins/email Import the BotEmailPlugin class into your Python script after installation to start using its features. ```python from botcity.plugins.email import BotEmailPlugin ``` -------------------------------- ### Import Botcity Telegram Plugin Source: https://documentation-dev.botcity.dev/plugins/telegram Import the BotTelegramPlugin into your Python script after installation to start using its Telegram integration features. ```python from botcity.plugins.telegram import BotTelegramPlugin ``` -------------------------------- ### Create bot.py entry point with Selenium Source: https://documentation-dev.botcity.dev/tutorials/custom-automations/python-custom A sample bot.py file demonstrating browser automation using Selenium. ```python # This bot will access BotCity's Youtube channel and collect the number of subscribers. # Importing the Selenium package from selenium import webdriver # Setting to use Chrome driver = webdriver.Chrome(executable_path="") # Accessing the Google homepage driver.get("https://google.com") # Searching for BotCity Youtube channel in the search bar search_bar = driver.find_element_by_name("q") search_bar.send_keys("BotCity RPA Youtube") # Clicking on the "I'm Feeling Lucky" button feeling_lucky_button = driver.find_element_by_xpath("/html/body/div[1]/div[3]/form/div[1]/div[1]/div[3]/center/input[2]") feeling_lucky_button.click() # Collecting the number of subscribers from the Youtube page subscribers = driver.find_element_by_id("subscriber-count").text print(f"Subscribers Count: {subscribers}") # Closing the browser driver.quit() ``` -------------------------------- ### Get Last Found Element Information Source: https://documentation-dev.botcity.dev/frameworks/web/computer-vision?q= Retrieve details of the most recently found element. The Java example shows how to access coordinates and dimensions. ```Python # Get the last element found on the screen. last_element = bot.get_last_element() # Printing the element coords. print(last_element) ``` ```Java // Get the last element found on the screen. State lastElement = getLastElement(); // Printing the element coords. System.out.println(lastElement.getX()); System.out.println(lastElement.getY()); System.out.println(lastElement.getWidth()); System.out.println(lastElement.getHeight()); ``` -------------------------------- ### Project folder structure examples Source: https://documentation-dev.botcity.dev/tutorials/custom-automations/python-custom Standard directory layouts for zipped bot projects. ```text CustomBot.zip ├── bot.py <- File containing code or importing other python scripts. └── requirements.txt <- File describing the python dependencies for your bot. ``` ```text CustomBot ├── bot.py ├── script.py ├── my_functions.py ├── utils.py └── requirements.txt ``` -------------------------------- ### Get Files from Specific Parent Folder Source: https://documentation-dev.botcity.dev/plugins/ms365/onedrive?q= Retrieve files and folders from a specified parent folder within OneDrive. The folder path must start with '/' and follow the pattern '/path/to/parent_folder'. ```python onedrive = MS365OneDrivePlugin(service_account=service) # Getting files from parent folder 'subfolder' drive_items = onedrive.get_files_from_parent_folder(folder_path="/myFolder/subFolder") for item in drive_items: if item.is_file: item.download() ``` -------------------------------- ### Start Browser Source: https://documentation-dev.botcity.dev/frameworks/web/navigation?q= Starts the selected browser, setting default configurations and preparing it for use. This method does not open the browser visually. ```APIDOC ## Start Browser You can start the selected browser. This method does not open the browser, it just sets the default settings and leaves it ready to use. ### Method `bot.start_browser()` (Python) `startBrowser()` (Java) ### Description Initializes the browser driver and sets up the environment for automation. ``` -------------------------------- ### Complete Botcity CSV Plugin Usage Source: https://documentation-dev.botcity.dev/plugins/csv A complete example demonstrating the installation, import, instantiation, reading, adding rows, sorting, printing, and writing of CSV data using the Botcity CSV plugin. ```python from botcity.plugins.csv import BotCSVPlugin # Instantiate the plugin bot_csv = BotCSVPlugin() # Read from a CSV File bot_csv.read('read.csv') # Add a row bot_csv.add_row([0, 22]) # Sort it by columns with header H1 and H2 in descending order bot_csv.sort(['H1', 'H2'], False) # Print the result print(bot_csv.as_list()) # Save it to a new file bot_csv.write('write.csv') ``` -------------------------------- ### Get Calendar Events within a Date Range Source: https://documentation-dev.botcity.dev/plugins/google/calendar?q= Filter calendar events by a date range using `date_min` and `date_max` parameters. This example retrieves events between April 10, 2022, and May 10, 2022, and prints their creator, summary, and end date. ```python from datetime import datetime # Dates that will be used as a reference to return events first_date = datetime(2022, 4, 10) last_date = datetime(2022, 5, 10) # Only events that are between 10/04/2022 and 10/05/2022 will be considered events = googlecalendar.get_events(date_min=first_date, date_max=last_date) # For each event: prints the creator, summary and end date. for ev in events: print(ev.creator) print(ev.summary) print(ev.end) ``` -------------------------------- ### Setting up Connection Source: https://documentation-dev.botcity.dev/plugins/aws/lambda Configure AWS credentials either by creating the `.aws` folder or passing credentials directly to the constructor. ```APIDOC ## Setting up connection Note There are two different ways to authenticate. **1. Creating the `.aws` folder in the _home directory_ , you need to create two files.** ```ini # ~/.aws/config [default] region= ``` ```ini # ~/.aws/credentials [default] aws_access_key_id= aws_secret_access_key= ``` **2. Passing credentials in the class constructor.** ### Python ```python # Using the `.aws` folder lambda_funtion = BotAWSLambdaPlugin() # Alternative using the credentials as constructor arguments lambda_funtion = BotAWSLambdaPlugin( use_credentials_file=False, access_key_id='', secret_access_key='', region_name='' ) ``` ``` -------------------------------- ### Install Botcity Twilio SMS Plugin Source: https://documentation-dev.botcity.dev/plugins/twilio/sms?q= Install the plugin using pip. Ensure you have Python and pip installed. ```bash pip install botcity-twilio-sms-plugin ``` -------------------------------- ### Instantiate and Configure Plugin Source: https://documentation-dev.botcity.dev/plugins/google/cloud-vision Create an instance of the plugin and provide the path to your Google Cloud service account credentials. ```Python # Instantiate the plugin cloudvision = BotCloudVisionPlugin() # Setup the path to the service account key credentials JSON file cloudvision.credentials("/credentials.json") ``` -------------------------------- ### Install BotCity Google Sheets Plugin Source: https://documentation-dev.botcity.dev/plugins/google/sheets Install the necessary package using pip. Ensure you have Python and pip installed. ```bash pip install botcity-googlesheets-plugin ``` -------------------------------- ### Install Google Calendar Plugin Source: https://documentation-dev.botcity.dev/plugins/google/calendar?q= Install the Google Calendar plugin using pip. Ensure you have Python and pip installed. ```python pip install botcity-googlecalendar-plugin ``` -------------------------------- ### Initialize BotCity Maestro SDK Source: https://documentation-dev.botcity.dev/tutorials/custom-automations/python-custom Use from_sys_args to instantiate the Maestro SDK with parameters provided by the Runner. ```python # Importing the BotCity Maestro SDK from botcity.maestro import * ... # Runner passes the server url, the id of the task being executed, # the access token and the parameters that this task receives (when applicable). maestro = BotMaestroSDK.from_sys_args() # Task parameters are passed as a dictionary ``` -------------------------------- ### Import and Instantiate BotCity Maestro SDK (C#) Source: https://documentation-dev.botcity.dev/insights/reporting-data-complete?q= Import necessary namespaces, instantiate the Maestro SDK using system arguments, and fetch the current task's execution details asynchronously. ```csharp // Import for integration with BotCity Maestro SDK using Dev.BotCity; using Dev.BotCity.MaestroSdk.Model.Execution; // Instantiating the Maestro SDK BotMaestroSDK maestro = BotMaestroSDK.FromSysArgs(); // Fetching the details of the current task being executed Execution execution = await maestro.GetExecutionAsync(maestro.GetTaskId()); ``` -------------------------------- ### Install Google Calendar Plugin Source: https://documentation-dev.botcity.dev/plugins/google/calendar Install the Google Calendar plugin using pip. Ensure you have Python and pip installed. ```python pip install botcity-googlecalendar-plugin ``` -------------------------------- ### Deploy New Java Bot Source: https://documentation-dev.botcity.dev/cli/bot-deploy?q= Example of deploying a new Java bot. Ensure the bot ID, version, and file path are correct. ```bash ./BotCLI bot deploy -version 1.0 -botId "MyBot" -file "my_bot.jar" -java ``` -------------------------------- ### Install Google Drive Plugin Source: https://documentation-dev.botcity.dev/plugins/google/drive Install the BotCity Google Drive plugin using pip. Ensure you have Python and pip installed. ```python pip install botcity-googledrive-plugin ``` -------------------------------- ### Get Element Coordinates Source: https://documentation-dev.botcity.dev/frameworks/desktop/computer-vision This section details how to get the coordinates (X, Y) of a specific UI element. It also covers an option to get the centered coordinates. ```APIDOC ## Get Element Coordinates ### Description Searches for a specific UI element and returns its coordinates (X, Y), or its centered coordinates. ### Method `get_element_coords` (Python), `getCoordinates` (Java), `getElementCoords` (Javascript) ### Parameters - **label** (string) - Required - The label or identifier of the element. - **matching** (float) - Optional (Python) - The confidence level for matching the element. - **waiting_time** (integer) - Optional (Java) - The maximum time to wait for the element. - **centered** (boolean) - Optional (Python) - If true, returns the centered coordinates. ### Request Example (Python) ```python ele = bot.get_element_coords(label="test_element", matching=0.97) print(ele) element_centered = bot.get_element_coords_centered(label="test_element", matching=0.97) print(element_centered) ``` ### Request Example (Java) ```java Point ele = getCoordinates("", 10000, false); System.out.println(ele); ``` ### Request Example (Javascript) ```javascript const elementCoords = await desktopBot.getElementCoords('test_element') ``` ### Response - **coordinates** (object or Point) - An object or Point containing the X and Y coordinates of the element. ``` -------------------------------- ### Start Edge with Existing Profile (Python) Source: https://documentation-dev.botcity.dev/how-to/automation-with-an-existing-profile?q= Configure BotCity Web Framework to launch Microsoft Edge using an existing profile. Import `default_options` from `botcity.web.browsers.edge` and provide the `user_data_dir` path. This allows reusing saved sessions and settings. ```Python from botcity.web import WebBot, Browser from botcity.web.browsers.edge import default_options def main(): # Instantiate the WebBot. bot = WebBot() # Configure whether or not to run on headless mode bot.headless = False profile_path = "/" # Fetch the default options for my preferred browser # Pass in the headless, download_folder_path and user_data_dir # to be used when building the default_options def_options = default_options( headless=bot.headless, user_data_dir=profile_path # Inform the profile path that wants to start the browser ) # Update the options to use the customized Options. bot.options = def_options # Opens the browser on the BotCity website with an existing profile bot.browse("https://botcity.dev") ... ``` -------------------------------- ### Initialize Maestro SDK in C# Source: https://documentation-dev.botcity.dev/maestro/maestro-sdk/setup Use BotMaestroSDK.FromSysArgs() to initialize the Maestro SDK in C#. ```C# // Getting the arguments passed by the Runner BotMaestroSDK maestro = BotMaestroSDK.FromSysArgs(); ``` -------------------------------- ### Installation Source: https://documentation-dev.botcity.dev/plugins/captcha?q= Install the BotCity Captcha plugin using pip. ```APIDOC ## Installation ```python pip install botcity-captcha-plugin ``` ``` -------------------------------- ### Start Browser Source: https://documentation-dev.botcity.dev/frameworks/web/navigation Initializes the browser, setting default configurations for subsequent operations. This method does not open the browser visually. ```APIDOC ## Start Browser ### Description Starts the selected browser, setting default configurations and preparing it for use without visually opening it. ### Method `bot.start_browser()` (Python) `startBrowser()` (Java) ### Endpoint N/A (Local execution) ### Parameters None ### Request Example ```python # Python bot.start_browser() ``` ```java // Java startBrowser(); ``` ### Response None ``` -------------------------------- ### Install the Outlook Plugin Source: https://documentation-dev.botcity.dev/plugins/ms365/outlook?q= Install the required package via pip. ```Python pip install botcity-ms365-outlook-plugin ``` -------------------------------- ### Complete OCR Example Source: https://documentation-dev.botcity.dev/plugins/google/cloud-vision A full script demonstrating instantiation, configuration, and text extraction. ```Python # Instantiate the plugin cloudvision = BotCloudVisionPlugin() # Setup the path to the service account key credentials JSON file cloudvision.credentials("/credentials.json") # Read the text from the image cloudvision.read("otter_crossing.jpg") # Print the text from the image print(cloudvision.full_text()) ``` -------------------------------- ### Installation Source: https://documentation-dev.botcity.dev/plugins/hashicorp/vault?q= Install the BotCity HashiCorp Vault plugin using pip. ```APIDOC ## Installation ```python pip install botcity-hashicorp-vault-plugin ``` ``` -------------------------------- ### WebBot Initialization and Basic Usage Source: https://documentation-dev.botcity.dev/frameworks/web/python This snippet demonstrates how to instantiate the WebBot, configure its properties like headless mode and driver path, and perform basic browser operations such as navigating to a URL and closing the browser. ```APIDOC ## Python Example: Basic WebBot Usage ### Description This example shows how to initialize a `WebBot` instance, set its configuration, open a website, wait for a few seconds, and then close the browser. ### Method `main()` function demonstrating `WebBot` usage. ### Endpoint N/A (Local script execution) ### Code ```python from botcity.web import WebBot def main(): # Instantiate the WebBot bot = WebBot() # Configure whether or not to run on headless mode bot.headless = False # Set the WebDriver path bot.driver_path = "" # Opens the BotCity website. bot.browse("https://www.botcity.dev") # Wait 3 seconds before closing bot.wait(3000) # Finish and clean up the Web Browser bot.stop_browser() if __name__ == '__main__': main() ``` ``` -------------------------------- ### Install the Excel Plugin Source: https://documentation-dev.botcity.dev/plugins/ms365/excel Install the required package via pip. ```python pip install botcity-ms365-excel-plugin ``` -------------------------------- ### Import and instantiate Maestro SDK Source: https://documentation-dev.botcity.dev/insights/reporting-data-complete Initialize the SDK and establish a connection to the Orchestrator. ```python # Importing the Maestro SDK dependency from botcity.maestro import * # Disabling errors if there is no connection with the Orchestrator BotMaestroSDK.RAISE_NOT_CONNECTED = False # Instantiating the Maestro SDK maestro = BotMaestroSDK.from_sys_args() # Getting the details of the current task being executed execution = maestro.get_execution() ``` ```java // Importing the Maestro SDK dependency import dev.botcity.maestro_sdk.*; ... public void action(BotExecution botExecution) { try { // Instantiating the Maestro SDK BotMaestroSDK maestro = new BotMaestroSDK(); maestro.login(botExecution); ... ``` ```csharp // Import for integration with BotCity Maestro SDK using Dev.BotCity; using Dev.BotCity.MaestroSdk.Model.Execution; // Instantiating the Maestro SDK BotMaestroSDK maestro = BotMaestroSDK.FromSysArgs(); // Fetching the details of the current task being executed Execution execution = await maestro.GetExecutionAsync(maestro.GetTaskId()); ``` -------------------------------- ### Initialize Botcity Maestro SDK in JavaScript Source: https://documentation-dev.botcity.dev/maestro/features/credentials Import and instantiate the Botcity Maestro SDK in JavaScript. Log in using server, user, and key, then fetch task details. ```javascript // Import for integration with BotCity Maestro SDK const { BotMaestroSdk } = require('@botcity/botcity-maestro-sdk') // Getting parameters passed by Runner const args = process.argv.slice(2) const [server, taskid, token] = args // Login with information from the Dev. Environment page const maestro = new BotMaestroSdk() maestro.login("YOUR_SERVER_HERE", "YOUR_USER_HERE", "YOUR_KEY_HERE") // Fetching the details of the current task being executed const executionTask = await maestro.getTask(taskid) ``` -------------------------------- ### Installation Source: https://documentation-dev.botcity.dev/plugins/hashicorp/vault Install the BotCity HashiCorp Vault plugin using pip. ```APIDOC ## Installation ### Python ``` pip install botcity-hashicorp-vault-plugin ``` ``` -------------------------------- ### Complete Google Drive File Download Example Source: https://documentation-dev.botcity.dev/plugins/google/drive This complete script demonstrates importing the plugin, authenticating, searching for a file by name, and downloading it to a specified local path. ```python # Import the plugin from botcity.plugins.googledrive import BotGoogleDrivePlugin # Set the path of the credentials json file credentials = './resources/credentials.json' # Instantiate the plugin googledrive = BotGoogleDrivePlugin(credentials) # Get the id of the file named "my_image.png" stored on the drive file_id = googledrive.search_file_by_name("my_image.png") # With the obtained id, download the file googledrive.download_file(file_id, './images/my_image_from_drive.png') ``` -------------------------------- ### Install BotCity Maestro SDK (NuGet) Source: https://documentation-dev.botcity.dev/maestro/maestro-sdk/setup?q= Install the BotCity Maestro SDK using the dotnet CLI for C# projects. ```bash dotnet add package BotCity.Maestro.SDK ``` -------------------------------- ### Install the Gmail Plugin Source: https://documentation-dev.botcity.dev/plugins/google/gmail Install the required package via pip. ```bash pip install botcity-gmail-plugin ``` -------------------------------- ### Setting up Connection Source: https://documentation-dev.botcity.dev/plugins/aws/sqs?q= Configure authentication for the AWS SQS plugin using either the `.aws` folder or by passing credentials directly to the constructor. ```APIDOC ## Setting up connection There are two different ways to authenticate: **1. Using the `.aws` folder:** Create `config` and `credentials` files in your `~/.aws/` directory. ```ini # ~/.aws/config [default] region= ``` ```ini # ~/.aws/credentials [default] aws_access_key_id= aws_secret_access_key= ``` **2. Passing credentials in the class constructor:** ```python # Using the `.aws` folder (default behavior) sqs = BotAWSSQSPlugin() # Alternative using the credentials as constructor arguments sqs = BotAWSSQSPlugin( use_credentials_file=False, access_key_id='', secret_access_key='', region_name='' ) ``` You can also set default `queue_name` and `queue_url`: ```python sqs = BotAWSSQSPlugin() sqs.queue_name = '' sqs.queue_url = '' ``` ``` -------------------------------- ### Install Discord Plugin Source: https://documentation-dev.botcity.dev/plugins/discord Install the required package via pip. ```bash pip install botcity-discord-plugin ``` -------------------------------- ### Setting up Connection Source: https://documentation-dev.botcity.dev/plugins/aws/sqs Configure authentication for the AWS SQS plugin using either the `.aws` folder or by passing credentials directly to the constructor. ```APIDOC ## Setting up connection There are two different ways to authenticate. **1. Creating the `.aws` folder in the _home directory_ , you need to create two files.** ```ini # ~/.aws/config [default] region= ``` ```ini # ~/.aws/credentials [default] aws_access_key_id= aws_secret_access_key= ``` **2. Passing credentials in the class constructor.** ```python # Using the `.aws` folder sqs = BotAWSSQSPlugin() # Alternative using the credentials as constructor arguments sqs = BotAWSSQSPlugin( use_credentials_file=False, access_key_id='', secret_access_key='', region_name='' ) ``` You can set default `queue_name` and `queue_url`. ```python sqs = BotAWSSQSPlugin() sqs.queue_name = '' sqs.queue_url = '' ``` ``` -------------------------------- ### Initialize Botcity Maestro SDK in Java Source: https://documentation-dev.botcity.dev/maestro/features/credentials Import and instantiate the Botcity Maestro SDK in Java. Log in using the provided BotExecution object and handle potential exceptions. ```java // Import for integration with BotCity Maestro SDK import dev.botcity.maestro_sdk.*; ... public void action(BotExecution botExecution) { try { // Instantiating the Maestro SDK BotMaestroSDK maestro = new BotMaestroSDK(); maestro.login(botExecution); ... ``` -------------------------------- ### Install the CSV Plugin Source: https://documentation-dev.botcity.dev/plugins/csv?q= Install the required package via pip. ```Python pip install botcity-csv-plugin ``` -------------------------------- ### Instantiate BotCity Recorder Source: https://documentation-dev.botcity.dev/plugins/recorder Initialize the plugin by passing the bot instance and an optional file path for the output video. ```python # Instantie the bot bot = DesktopBot() # Instantiate the recorder # Required parameter: bot with the process to be recorded # Optional parameter: path and file name with extension recorder = BotRecorderPlugin(bot, r"resources\test.avi") ``` -------------------------------- ### Installation Source: https://documentation-dev.botcity.dev/plugins/aws/lambda Install the BotCity AWS Lambda plugin using pip. ```APIDOC ## Installation ### Python ```python pip install botcity-aws-lambda-plugin ``` ``` -------------------------------- ### Install WhatsApp Plugin Source: https://documentation-dev.botcity.dev/plugins/whatsapp Install the required Python package via pip. ```Python pip install botcity-whatsapp-plugin ```