Enable your agents to manage spreadsheet data through Google Sheets. Read rows, create new entries, update existing data, and streamline your data management workflows with AI-powered automation. Perfect for data tracking, reporting, and collaborative data management.
Description: Get rows from a Google Sheets spreadsheet.
Parameters:
spreadsheetId (string, required): Spreadsheet - Use Connect Portal Workflow Settings to allow users to select a spreadsheet. Defaults to using the first worksheet in the selected spreadsheet.
limit (string, optional): Limit rows - Limit the maximum number of rows to return.
Description: Create a new row in a Google Sheets spreadsheet.
Parameters:
spreadsheetId (string, required): Spreadsheet - Use Connect Portal Workflow Settings to allow users to select a spreadsheet. Defaults to using the first worksheet in the selected spreadsheet..
worksheet (string, required): Worksheet - Your worksheet must have column headers.
additionalFields (object, required): Fields - Include fields to create this row with, as an object with keys of Column Names. Use Connect Portal Workflow Settings to allow users to select a Column Mapping.
Description: Update existing rows in a Google Sheets spreadsheet.
Parameters:
spreadsheetId (string, required): Spreadsheet - Use Connect Portal Workflow Settings to allow users to select a spreadsheet. Defaults to using the first worksheet in the selected spreadsheet.
worksheet (string, required): Worksheet - Your worksheet must have column headers.
filterFormula (object, optional): A filter in disjunctive normal form - OR of AND groups of single conditions to identify which rows to update.
additionalFields (object, required): Fields - Include fields to update, as an object with keys of Column Names. Use Connect Portal Workflow Settings to allow users to select a Column Mapping.
from crewai import Agent, Task, Crewfrom crewai_tools import CrewaiEnterpriseTools# Get enterprise tools (Google Sheets tools will be included)enterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token")# Create an agent with Google Sheets capabilitiessheets_agent = Agent( role="Data Manager", goal="Manage spreadsheet data and track information efficiently", backstory="An AI assistant specialized in data management and spreadsheet operations.", tools=[enterprise_tools])# Task to add new data to a spreadsheetdata_entry_task = Task( description="Add a new customer record to the customer database spreadsheet with name, email, and signup date", agent=sheets_agent, expected_output="New customer record added successfully to the spreadsheet")# Run the taskcrew = Crew( agents=[sheets_agent], tasks=[data_entry_task])crew.kickoff()
from crewai_tools import CrewaiEnterpriseTools# Get only specific Google Sheets toolsenterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token", actions_list=["google_sheets_get_row", "google_sheets_create_row"])data_collector = Agent( role="Data Collector", goal="Collect and organize data in spreadsheets", backstory="An AI assistant that focuses on data collection and organization.", tools=enterprise_tools)# Task to collect and organize datadata_collection = Task( description="Retrieve current inventory data and add new product entries to the inventory spreadsheet", agent=data_collector, expected_output="Inventory data retrieved and new products added successfully")crew = Crew( agents=[data_collector], tasks=[data_collection])crew.kickoff()
from crewai import Agent, Task, Crewfrom crewai_tools import CrewaiEnterpriseToolsenterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token")data_analyst = Agent( role="Data Analyst", goal="Analyze spreadsheet data and generate insights", backstory="An experienced data analyst who extracts insights from spreadsheet data.", tools=[enterprise_tools])# Task to analyze data and create reportsanalysis_task = Task( description=""" 1. Retrieve all sales data from the current month's spreadsheet 2. Analyze the data for trends and patterns 3. Create a summary report in a new row with key metrics """, agent=data_analyst, expected_output="Sales data analyzed and summary report created with key insights")crew = Crew( agents=[data_analyst], tasks=[analysis_task])crew.kickoff()
from crewai import Agent, Task, Crewfrom crewai_tools import CrewaiEnterpriseToolsenterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token")data_updater = Agent( role="Data Updater", goal="Automatically update and maintain spreadsheet data", backstory="An AI assistant that maintains data accuracy and updates records automatically.", tools=[enterprise_tools])# Task to update data based on conditionsupdate_task = Task( description=""" 1. Find all pending orders in the orders spreadsheet 2. Update their status to 'processing' 3. Add a timestamp for when the status was updated 4. Log the changes in a separate tracking sheet """, agent=data_updater, expected_output="All pending orders updated to processing status with timestamps logged")crew = Crew( agents=[data_updater], tasks=[update_task])crew.kickoff()
from crewai import Agent, Task, Crewfrom crewai_tools import CrewaiEnterpriseToolsenterprise_tools = CrewaiEnterpriseTools( enterprise_token="your_enterprise_token")workflow_manager = Agent( role="Data Workflow Manager", goal="Manage complex data workflows across multiple spreadsheets", backstory="An AI assistant that orchestrates complex data operations across multiple spreadsheets.", tools=[enterprise_tools])# Complex workflow taskworkflow_task = Task( description=""" 1. Get all customer data from the main customer spreadsheet 2. Create monthly summary entries for active customers 3. Update customer status based on activity in the last 30 days 4. Generate a monthly report with customer metrics 5. Archive inactive customer records to a separate sheet """, agent=workflow_manager, expected_output="Monthly customer workflow completed with updated statuses and generated reports")crew = Crew( agents=[workflow_manager], tasks=[workflow_task])crew.kickoff()