mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-15 11:58:31 +00:00
* feat: add `apps` & `actions` attributes to Agent (#3504)
* feat: add app attributes to Agent
* feat: add actions attribute to Agent
* chore: resolve linter issues
* refactor: merge the apps and actions parameters into a single one
* fix: remove unnecessary print
* feat: logging error when CrewaiPlatformTools fails
* chore: export CrewaiPlatformTools directly from crewai_tools
* style: resolver linter issues
* test: fix broken tests
* style: solve linter issues
* fix: fix broken test
* feat: monorepo restructure and test/ci updates
- Add crewai workspace member
- Fix vcr cassette paths and restore test dirs
- Resolve ci failures and update linter/pytest rules
* chore: update python version to 3.13 and package metadata
* feat: add crewai-tools workspace and fix tests/dependencies
* feat: add crewai-tools workspace structure
* Squashed 'temp-crewai-tools/' content from commit 9bae5633
git-subtree-dir: temp-crewai-tools
git-subtree-split: 9bae56339096cb70f03873e600192bd2cd207ac9
* feat: configure crewai-tools workspace package with dependencies
* fix: apply ruff auto-formatting to crewai-tools code
* chore: update lockfile
* fix: don't allow tool tests yet
* fix: comment out extra pytest flags for now
* fix: remove conflicting conftest.py from crewai-tools tests
* fix: resolve dependency conflicts and test issues
- Pin vcrpy to 7.0.0 to fix pytest-recording compatibility
- Comment out types-requests to resolve urllib3 conflict
- Update requests requirement in crewai-tools to >=2.32.0
* chore: update CI workflows and docs for monorepo structure
* chore: update CI workflows and docs for monorepo structure
* fix: actions syntax
* chore: ci publish and pin versions
* fix: add permission to action
* chore: bump version to 1.0.0a1 across all packages
- Updated version to 1.0.0a1 in pyproject.toml for crewai and crewai-tools
- Adjusted version in __init__.py files for consistency
* WIP: v1 docs (#3626)
(cherry picked from commit d46e20fa09bcd2f5916282f5553ddeb7183bd92c)
* docs: parity for all translations
* docs: full name of acronym AMP
* docs: fix lingering unused code
* docs: expand contextual options in docs.json
* docs: add contextual action to request feature on GitHub (#3635)
* chore: apply linting fixes to crewai-tools
* feat: add required env var validation for brightdata
Co-authored-by: Greyson Lalonde <greyson.r.lalonde@gmail.com>
* fix: handle properly anyOf oneOf allOf schema's props
Co-authored-by: Greyson Lalonde <greyson.r.lalonde@gmail.com>
* feat: bump version to 1.0.0a2
* Lorenze/native inference sdks (#3619)
* ruff linted
* using native sdks with litellm fallback
* drop exa
* drop print on completion
* Refactor LLM and utility functions for type consistency
- Updated `max_tokens` parameter in `LLM` class to accept `float` in addition to `int`.
- Modified `create_llm` function to ensure consistent type hints and return types, now returning `LLM | BaseLLM | None`.
- Adjusted type hints for various parameters in `create_llm` and `_llm_via_environment_or_fallback` functions for improved clarity and type safety.
- Enhanced test cases to reflect changes in type handling and ensure proper instantiation of LLM instances.
* fix agent_tests
* fix litellm tests and usagemetrics fix
* drop print
* Refactor LLM event handling and improve test coverage
- Removed commented-out event emission for LLM call failures in `llm.py`.
- Added `from_agent` parameter to `CrewAgentExecutor` for better context in LLM responses.
- Enhanced test for LLM call failure to simulate OpenAI API failure and updated assertions for clarity.
- Updated agent and task ID assertions in tests to ensure they are consistently treated as strings.
* fix test_converter
* fixed tests/agents/test_agent.py
* Refactor LLM context length exception handling and improve provider integration
- Renamed `LLMContextLengthExceededException` to `LLMContextLengthExceededExceptionError` for clarity and consistency.
- Updated LLM class to pass the provider parameter correctly during initialization.
- Enhanced error handling in various LLM provider implementations to raise the new exception type.
- Adjusted tests to reflect the updated exception name and ensure proper error handling in context length scenarios.
* Enhance LLM context window handling across providers
- Introduced CONTEXT_WINDOW_USAGE_RATIO to adjust context window sizes dynamically for Anthropic, Azure, Gemini, and OpenAI LLMs.
- Added validation for context window sizes in Azure and Gemini providers to ensure they fall within acceptable limits.
- Updated context window size calculations to use the new ratio, improving consistency and adaptability across different models.
- Removed hardcoded context window sizes in favor of ratio-based calculations for better flexibility.
* fix test agent again
* fix test agent
* feat: add native LLM providers for Anthropic, Azure, and Gemini
- Introduced new completion implementations for Anthropic, Azure, and Gemini, integrating their respective SDKs.
- Added utility functions for tool validation and extraction to support function calling across LLM providers.
- Enhanced context window management and token usage extraction for each provider.
- Created a common utility module for shared functionality among LLM providers.
* chore: update dependencies and improve context management
- Removed direct dependency on `litellm` from the main dependencies and added it under extras for better modularity.
- Updated the `litellm` dependency specification to allow for greater flexibility in versioning.
- Refactored context length exception handling across various LLM providers to use a consistent error class.
- Enhanced platform-specific dependency markers for NVIDIA packages to ensure compatibility across different systems.
* refactor(tests): update LLM instantiation to include is_litellm flag in test cases
- Modified multiple test cases in test_llm.py to set the is_litellm parameter to True when instantiating the LLM class.
- This change ensures that the tests are aligned with the latest LLM configuration requirements and improves consistency across test scenarios.
- Adjusted relevant assertions and comments to reflect the updated LLM behavior.
* linter
* linted
* revert constants
* fix(tests): correct type hint in expected model description
- Updated the expected description in the test_generate_model_description_dict_field function to use 'Dict' instead of 'dict' for consistency with type hinting conventions.
- This change ensures that the test accurately reflects the expected output format for model descriptions.
* refactor(llm): enhance LLM instantiation and error handling
- Updated the LLM class to include validation for the model parameter, ensuring it is a non-empty string.
- Improved error handling by logging warnings when the native SDK fails, allowing for a fallback to LiteLLM.
- Adjusted the instantiation of LLM in test cases to consistently include the is_litellm flag, aligning with recent changes in LLM configuration.
- Modified relevant tests to reflect these updates, ensuring better coverage and accuracy in testing scenarios.
* fixed test
* refactor(llm): enhance token usage tracking and add copy methods
- Updated the LLM class to track token usage and log callbacks in streaming mode, improving monitoring capabilities.
- Introduced shallow and deep copy methods for the LLM instance, allowing for better management of LLM configurations and parameters.
- Adjusted test cases to instantiate LLM with the is_litellm flag, ensuring alignment with recent changes in LLM configuration.
* refactor(tests): reorganize imports and enhance error messages in test cases
- Cleaned up import statements in test_crew.py for better organization and readability.
- Enhanced error messages in test cases to use `re.escape` for improved regex matching, ensuring more robust error handling.
- Adjusted comments for clarity and consistency across test scenarios.
- Ensured that all necessary modules are imported correctly to avoid potential runtime issues.
* feat: add base devtooling
* fix: ensure dep refs are updated for devtools
* fix: allow pre-release
* feat: allow release after tag
* feat: bump versions to 1.0.0a3
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
* fix: match tag and release title, ignore devtools build for pypi
* fix: allow failed pypi publish
* feat: introduce trigger listing and execution commands for local development (#3643)
* chore: exclude tests from ruff linting
* chore: exclude tests from GitHub Actions linter
* fix: replace print statements with logger in agent and memory handling
* chore: add noqa for intentional print in printer utility
* fix: resolve linting errors across codebase
* feat: update docs with new approach to consume Platform Actions (#3675)
* fix: remove duplicate line and add explicit env var
* feat: bump versions to 1.0.0a4 (#3686)
* Update triggers docs (#3678)
* docs: introduce triggers list & triggers run command
* docs: add KO triggers docs
* docs: ensure CREWAI_PLATFORM_INTEGRATION_TOKEN is mentioned on docs (#3687)
* Lorenze/bedrock llm (#3693)
* feat: add AWS Bedrock support and update dependencies
- Introduced BedrockCompletion class for AWS Bedrock integration in LLM.
- Added boto3 as a new dependency in both pyproject.toml and uv.lock.
- Updated LLM class to support Bedrock provider.
- Created new files for Bedrock provider implementation.
* using converse api
* converse
* linted
* refactor: update BedrockCompletion class to improve parameter handling
- Changed max_tokens from a fixed integer to an optional integer.
- Simplified model ID assignment by removing the inference profile mapping method.
- Cleaned up comments and unnecessary code related to tool specifications and model-specific parameters.
* feat: improve event bus thread safety and async support
Add thread-safe, async-compatible event bus with read–write locking and
handler dependency ordering. Remove blinker dependency and implement
direct dispatch. Improve type safety, error handling, and deterministic
event synchronization.
Refactor tests to auto-wait for async handlers, ensure clean teardown,
and add comprehensive concurrency coverage. Replace thread-local state
in AgentEvaluator with instance-based locking for correct cross-thread
access. Enhance tracing reliability and event finalization.
* feat: enhance OpenAICompletion class with additional client parameters (#3701)
* feat: enhance OpenAICompletion class with additional client parameters
- Added support for default_headers, default_query, and client_params in the OpenAICompletion class.
- Refactored client initialization to use a dedicated method for client parameter retrieval.
- Introduced new test cases to validate the correct usage of OpenAICompletion with various parameters.
* fix: correct test case for unsupported OpenAI model
- Updated the test_openai.py to ensure that the LLM instance is created before calling the method, maintaining proper error handling for unsupported models.
- This change ensures that the test accurately checks for the NotFoundError when an invalid model is specified.
* fix: enhance error handling in OpenAICompletion class
- Added specific exception handling for NotFoundError and APIConnectionError in the OpenAICompletion class to provide clearer error messages and improve logging.
- Updated the test case for unsupported models to ensure it raises a ValueError with the appropriate message when a non-existent model is specified.
- This change improves the robustness of the OpenAI API integration and enhances the clarity of error reporting.
* fix: improve test for unsupported OpenAI model handling
- Refactored the test case in test_openai.py to create the LLM instance after mocking the OpenAI client, ensuring proper error handling for unsupported models.
- This change enhances the clarity of the test by accurately checking for ValueError when a non-existent model is specified, aligning with recent improvements in error handling for the OpenAICompletion class.
* feat: bump versions to 1.0.0b1 (#3706)
* Lorenze/tools drop litellm (#3710)
* completely drop litellm and correctly pass config for qdrant
* feat: add support for additional embedding models in EmbeddingService
- Expanded the list of supported embedding models to include Google Vertex, Hugging Face, Jina, Ollama, OpenAI, Roboflow, Watson X, custom embeddings, Sentence Transformers, Text2Vec, OpenClip, and Instructor.
- This enhancement improves the versatility of the EmbeddingService by allowing integration with a wider range of embedding providers.
* fix: update collection parameter handling in CrewAIRagAdapter
- Changed the condition for setting vectors_config in the CrewAIRagAdapter to check for QdrantConfig instance instead of using hasattr. This improves type safety and ensures proper configuration handling for Qdrant integration.
* moved stagehand as optional dep (#3712)
* feat: bump versions to 1.0.0b2 (#3713)
* feat: enhance AnthropicCompletion class with additional client parame… (#3707)
* feat: enhance AnthropicCompletion class with additional client parameters and tool handling
- Added support for client_params in the AnthropicCompletion class to allow for additional client configuration.
- Refactored client initialization to use a dedicated method for retrieving client parameters.
- Implemented a new method to handle tool use conversation flow, ensuring proper execution and response handling.
- Introduced comprehensive test cases to validate the functionality of the AnthropicCompletion class, including tool use scenarios and parameter handling.
* drop print statements
* test: add fixture to mock ANTHROPIC_API_KEY for tests
- Introduced a pytest fixture to automatically mock the ANTHROPIC_API_KEY environment variable for all tests in the test_anthropic.py module.
- This change ensures that tests can run without requiring a real API key, improving test isolation and reliability.
* refactor: streamline streaming message handling in AnthropicCompletion class
- Removed the 'stream' parameter from the API call as it is set internally by the SDK.
- Simplified the handling of tool use events and response construction by extracting token usage from the final message.
- Enhanced the flow for managing tool use conversation, ensuring proper integration with the streaming API response.
* fix streaming here too
* fix: improve error handling in tool conversion for AnthropicCompletion class
- Enhanced exception handling during tool conversion by catching KeyError and ValueError.
- Added logging for conversion errors to aid in debugging and maintain robustness in tool integration.
* feat: enhance GeminiCompletion class with client parameter support (#3717)
* feat: enhance GeminiCompletion class with client parameter support
- Added support for client_params in the GeminiCompletion class to allow for additional client configuration.
- Refactored client initialization into a dedicated method for improved parameter handling.
- Introduced a new method to retrieve client parameters, ensuring compatibility with the base class.
- Enhanced error handling during client initialization to provide clearer messages for missing configuration.
- Updated documentation to reflect the changes in client parameter usage.
* add optional dependancies
* refactor: update test fixture to mock GOOGLE_API_KEY
- Renamed the fixture from `mock_anthropic_api_key` to `mock_google_api_key` to reflect the change in the environment variable being mocked.
- This update ensures that all tests in the module can run with a mocked GOOGLE_API_KEY, improving test isolation and reliability.
* fix tests
* feat: enhance BedrockCompletion class with advanced features
* feat: enhance BedrockCompletion class with advanced features and error handling
- Added support for guardrail configuration, additional model request fields, and custom response field paths in the BedrockCompletion class.
- Improved error handling for AWS exceptions and added token usage tracking with stop reason logging.
- Enhanced streaming response handling with comprehensive event management, including tool use and content block processing.
- Updated documentation to reflect new features and initialization parameters.
- Introduced a new test suite for BedrockCompletion to validate functionality and ensure robust integration with AWS Bedrock APIs.
* chore: add boto typing
* fix: use typing_extensions.Required for Python 3.10 compatibility
---------
Co-authored-by: Greyson Lalonde <greyson.r.lalonde@gmail.com>
* feat: azure native tests
* feat: add Azure AI Inference support and related tests
- Introduced the `azure-ai-inference` package with version `1.0.0b9` and its dependencies in `uv.lock` and `pyproject.toml`.
- Added new test files for Azure LLM functionality, including tests for Azure completion and tool handling.
- Implemented comprehensive test cases to validate Azure-specific behavior and integration with the CrewAI framework.
- Enhanced the testing framework to mock Azure credentials and ensure proper isolation during tests.
* feat: enhance AzureCompletion class with Azure OpenAI support
- Added support for the Azure OpenAI endpoint in the AzureCompletion class, allowing for flexible endpoint configurations.
- Implemented endpoint validation and correction to ensure proper URL formats for Azure OpenAI deployments.
- Enhanced error handling to provide clearer messages for common HTTP errors, including authentication and rate limit issues.
- Updated tests to validate the new endpoint handling and error messaging, ensuring robust integration with Azure AI Inference.
- Refactored parameter preparation to conditionally include the model parameter based on the endpoint type.
* refactor: convert project module to metaclass with full typing
* Lorenze/OpenAI base url backwards support (#3723)
* fix: enhance OpenAICompletion class base URL handling
- Updated the base URL assignment in the OpenAICompletion class to prioritize the new `api_base` attribute and fallback to the environment variable `OPENAI_BASE_URL` if both are not set.
- Added `api_base` to the list of parameters in the OpenAICompletion class to ensure proper configuration and flexibility in API endpoint management.
* feat: enhance OpenAICompletion class with api_base support
- Added the `api_base` parameter to the OpenAICompletion class to allow for flexible API endpoint configuration.
- Updated the `_get_client_params` method to prioritize `base_url` over `api_base`, ensuring correct URL handling.
- Introduced comprehensive tests to validate the behavior of `api_base` and `base_url` in various scenarios, including environment variable fallback.
- Enhanced test coverage for client parameter retrieval, ensuring robust integration with the OpenAI API.
* fix: improve OpenAICompletion class configuration handling
- Added a debug print statement to log the client configuration parameters during initialization for better traceability.
- Updated the base URL assignment logic to ensure it defaults to None if no valid base URL is provided, enhancing robustness in API endpoint configuration.
- Refined the retrieval of the `api_base` environment variable to streamline the configuration process.
* drop print
* feat: improvements on import native sdk support (#3725)
* feat: add support for Anthropic provider and enhance logging
- Introduced the `anthropic` package with version `0.69.0` in `pyproject.toml` and `uv.lock`, allowing for integration with the Anthropic API.
- Updated logging in the LLM class to provide clearer error messages when importing native providers, enhancing debugging capabilities.
- Improved error handling in the AnthropicCompletion class to guide users on installation via the updated error message format.
- Refactored import error handling in other provider classes to maintain consistency in error messaging and installation instructions.
* feat: enhance LLM support with Bedrock provider and update dependencies
- Added support for the `bedrock` provider in the LLM class, allowing integration with AWS Bedrock APIs.
- Updated `uv.lock` to replace `boto3` with `bedrock` in the dependencies, reflecting the new provider structure.
- Introduced `SUPPORTED_NATIVE_PROVIDERS` to include `bedrock` and ensure proper error handling when instantiating native providers.
- Enhanced error handling in the LLM class to raise informative errors when native provider instantiation fails.
- Added tests to validate the behavior of the new Bedrock provider and ensure fallback mechanisms work correctly for unsupported providers.
* test: update native provider fallback tests to expect ImportError
* adjust the test with the expected bevaior - raising ImportError
* this is exoecting the litellm format, all gemini native tests are in test_google.py
---------
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
* fix: remove stdout prints, improve test determinism, and update trace handling
Removed `print` statements from the `LLMStreamChunkEvent` handler to prevent
LLM response chunks from being written directly to stdout. The listener now
only tracks chunks internally.
Fixes #3715
Added explicit return statements for trace-related tests.
Updated cassette for `test_failed_evaluation` to reflect new behavior where
an empty trace dict is used instead of returning early.
Ensured deterministic cleanup order in test fixtures by making
`clear_event_bus_handlers` depend on `setup_test_environment`. This guarantees
event bus shutdown and file handle cleanup occur before temporary directory
deletion, resolving intermittent “Directory not empty” errors in CI.
* chore: remove lib/crewai exclusion from pre-commit hooks
* feat: enhance task guardrail functionality and validation
* feat: enhance task guardrail functionality and validation
- Introduced support for multiple guardrails in the Task class, allowing for sequential processing of guardrails.
- Added a new `guardrails` field to the Task model to accept a list of callable guardrails or string descriptions.
- Implemented validation to ensure guardrails are processed correctly, including handling of retries and error messages.
- Enhanced the `_invoke_guardrail_function` method to manage guardrail execution and integrate with existing task output processing.
- Updated tests to cover various scenarios involving multiple guardrails, including success, failure, and retry mechanisms.
This update improves the flexibility and robustness of task execution by allowing for more complex validation scenarios.
* refactor: enhance guardrail type handling in Task model
- Updated the Task class to improve guardrail type definitions, introducing GuardrailType and GuardrailsType for better clarity and type safety.
- Simplified the validation logic for guardrails, ensuring that both single and multiple guardrails are processed correctly.
- Enhanced error messages for guardrail validation to provide clearer feedback when incorrect types are provided.
- This refactor improves the maintainability and robustness of task execution by standardizing guardrail handling.
* feat: implement per-guardrail retry tracking in Task model
- Introduced a new private attribute `_guardrail_retry_counts` to the Task class for tracking retry attempts on a per-guardrail basis.
- Updated the guardrail processing logic to utilize the new retry tracking, allowing for independent retry counts for each guardrail.
- Enhanced error handling to provide clearer feedback when guardrails fail validation after exceeding retry limits.
- Modified existing tests to validate the new retry tracking behavior, ensuring accurate assertions on guardrail retries.
This update improves the robustness and flexibility of task execution by allowing for more granular control over guardrail validation and retry mechanisms.
* chore: 1.0.0b3 bump (#3734)
* chore: full ruff and mypy
improved linting, pre-commit setup, and internal architecture. Configured Ruff to respect .gitignore, added stricter rules, and introduced a lock pre-commit hook with virtualenv activation. Fixed type shadowing in EXASearchTool using a type_ alias to avoid PEP 563 conflicts and resolved circular imports in agent executor and guardrail modules. Removed agent-ops attributes, deprecated watson alias, and dropped crewai-enterprise tools with corresponding test updates. Refactored cache and memoization for thread safety and cleaned up structured output adapters and related logic.
* New MCL DSL (#3738)
* Adding MCP implementation
* New tests for MCP implementation
* fix tests
* update docs
* Revert "New tests for MCP implementation"
This reverts commit 0bbe6dee90.
* linter
* linter
* fix
* verify mcp pacakge exists
* adjust docs to be clear only remote servers are supported
* reverted
* ensure args schema generated properly
* properly close out
---------
Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
Co-authored-by: Greyson Lalonde <greyson.r.lalonde@gmail.com>
* feat: a2a experimental
experimental a2a support
---------
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
Co-authored-by: Mike Plachta <mplachta@users.noreply.github.com>
Co-authored-by: João Moura <joaomdmoura@gmail.com>
566 lines
25 KiB
Plaintext
566 lines
25 KiB
Plaintext
---
|
|
title: "HubSpot Integration"
|
|
description: "Manage companies and contacts in HubSpot with CrewAI."
|
|
icon: "briefcase"
|
|
mode: "wide"
|
|
---
|
|
|
|
## Overview
|
|
|
|
Enable your agents to manage companies and contacts within HubSpot. Create new records and streamline your CRM processes with AI-powered automation.
|
|
|
|
## Prerequisites
|
|
|
|
Before using the HubSpot integration, ensure you have:
|
|
|
|
- A [CrewAI AMP](https://app.crewai.com) account with an active subscription.
|
|
- A HubSpot account with appropriate permissions.
|
|
- Connected your HubSpot account through the [Integrations page](https://app.crewai.com/crewai_plus/connectors).
|
|
|
|
## Setting Up HubSpot Integration
|
|
|
|
### 1. Connect Your HubSpot Account
|
|
|
|
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors).
|
|
2. Find **HubSpot** in the Authentication Integrations section.
|
|
3. Click **Connect** and complete the OAuth flow.
|
|
4. Grant the necessary permissions for company and contact management.
|
|
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
|
|
|
### 2. Install Required Package
|
|
|
|
```bash
|
|
uv add crewai-tools
|
|
```
|
|
|
|
## Available Actions
|
|
|
|
<AccordionGroup>
|
|
<Accordion title="hubspot/create_company">
|
|
**Description:** Create a new company record in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `name` (string, required): Name of the company.
|
|
- `domain` (string, optional): Company Domain Name.
|
|
- `industry` (string, optional): Industry. Must be one of the predefined values from HubSpot.
|
|
- `phone` (string, optional): Phone Number.
|
|
- `hubspot_owner_id` (string, optional): Company owner ID.
|
|
- `type` (string, optional): Type of the company. Available values: `PROSPECT`, `PARTNER`, `RESELLER`, `VENDOR`, `OTHER`.
|
|
- `city` (string, optional): City.
|
|
- `state` (string, optional): State/Region.
|
|
- `zip` (string, optional): Postal Code.
|
|
- `numberofemployees` (number, optional): Number of Employees.
|
|
- `annualrevenue` (number, optional): Annual Revenue.
|
|
- `timezone` (string, optional): Time Zone.
|
|
- `description` (string, optional): Description.
|
|
- `linkedin_company_page` (string, optional): LinkedIn Company Page URL.
|
|
- `company_email` (string, optional): Company Email.
|
|
- `first_name` (string, optional): First Name of a contact at the company.
|
|
- `last_name` (string, optional): Last Name of a contact at the company.
|
|
- `about_us` (string, optional): About Us.
|
|
- `hs_csm_sentiment` (string, optional): CSM Sentiment. Available values: `at_risk`, `neutral`, `healthy`.
|
|
- `closedate` (string, optional): Close Date.
|
|
- `hs_keywords` (string, optional): Company Keywords. Must be one of the predefined values.
|
|
- `country` (string, optional): Country/Region.
|
|
- `hs_country_code` (string, optional): Country/Region Code.
|
|
- `hs_employee_range` (string, optional): Employee range.
|
|
- `facebook_company_page` (string, optional): Facebook Company Page URL.
|
|
- `facebookfans` (number, optional): Number of Facebook Fans.
|
|
- `hs_gps_coordinates` (string, optional): GPS Coordinates.
|
|
- `hs_gps_error` (string, optional): GPS Error.
|
|
- `googleplus_page` (string, optional): Google Plus Page URL.
|
|
- `owneremail` (string, optional): HubSpot Owner Email.
|
|
- `ownername` (string, optional): HubSpot Owner Name.
|
|
- `hs_ideal_customer_profile` (string, optional): Ideal Customer Profile Tier. Available values: `tier_1`, `tier_2`, `tier_3`.
|
|
- `hs_industry_group` (string, optional): Industry group.
|
|
- `is_public` (boolean, optional): Is Public.
|
|
- `hs_last_metered_enrichment_timestamp` (string, optional): Last Metered Enrichment Timestamp.
|
|
- `hs_lead_status` (string, optional): Lead Status. Available values: `NEW`, `OPEN`, `IN_PROGRESS`, `OPEN_DEAL`, `UNQUALIFIED`, `ATTEMPTED_TO_CONTACT`, `CONNECTED`, `BAD_TIMING`.
|
|
- `lifecyclestage` (string, optional): Lifecycle Stage. Available values: `subscriber`, `lead`, `marketingqualifiedlead`, `salesqualifiedlead`, `opportunity`, `customer`, `evangelist`, `other`.
|
|
- `linkedinbio` (string, optional): LinkedIn Bio.
|
|
- `hs_linkedin_handle` (string, optional): LinkedIn handle.
|
|
- `hs_live_enrichment_deadline` (string, optional): Live enrichment deadline.
|
|
- `hs_logo_url` (string, optional): Logo URL.
|
|
- `hs_analytics_source` (string, optional): Original Traffic Source.
|
|
- `hs_pinned_engagement_id` (number, optional): Pinned Engagement ID.
|
|
- `hs_quick_context` (string, optional): Quick context.
|
|
- `hs_revenue_range` (string, optional): Revenue range.
|
|
- `hs_state_code` (string, optional): State/Region Code.
|
|
- `address` (string, optional): Street Address.
|
|
- `address2` (string, optional): Street Address 2.
|
|
- `hs_is_target_account` (boolean, optional): Target Account.
|
|
- `hs_target_account` (string, optional): Target Account Tier. Available values: `tier_1`, `tier_2`, `tier_3`.
|
|
- `hs_target_account_recommendation_snooze_time` (string, optional): Target Account Recommendation Snooze Time.
|
|
- `hs_target_account_recommendation_state` (string, optional): Target Account Recommendation State. Available values: `DISMISSED`, `NONE`, `SNOOZED`.
|
|
- `total_money_raised` (string, optional): Total Money Raised.
|
|
- `twitterbio` (string, optional): Twitter Bio.
|
|
- `twitterfollowers` (number, optional): Twitter Followers.
|
|
- `twitterhandle` (string, optional): Twitter Handle.
|
|
- `web_technologies` (string, optional): Web Technologies used. Must be one of the predefined values.
|
|
- `website` (string, optional): Website URL.
|
|
- `founded_year` (string, optional): Year Founded.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/create_contact">
|
|
**Description:** Create a new contact record in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `email` (string, required): Email address of the contact.
|
|
- `firstname` (string, optional): First Name.
|
|
- `lastname` (string, optional): Last Name.
|
|
- `phone` (string, optional): Phone Number.
|
|
- `hubspot_owner_id` (string, optional): Contact owner.
|
|
- `lifecyclestage` (string, optional): Lifecycle Stage. Available values: `subscriber`, `lead`, `marketingqualifiedlead`, `salesqualifiedlead`, `opportunity`, `customer`, `evangelist`, `other`.
|
|
- `hs_lead_status` (string, optional): Lead Status. Available values: `NEW`, `OPEN`, `IN_PROGRESS`, `OPEN_DEAL`, `UNQUALIFIED`, `ATTEMPTED_TO_CONTACT`, `CONNECTED`, `BAD_TIMING`.
|
|
- `annualrevenue` (string, optional): Annual Revenue.
|
|
- `hs_buying_role` (string, optional): Buying Role.
|
|
- `cc_emails` (string, optional): CC Emails.
|
|
- `ch_customer_id` (string, optional): Chargify Customer ID.
|
|
- `ch_customer_reference` (string, optional): Chargify Customer Reference.
|
|
- `chargify_sites` (string, optional): Chargify Site(s).
|
|
- `city` (string, optional): City.
|
|
- `hs_facebook_ad_clicked` (boolean, optional): Clicked Facebook ad.
|
|
- `hs_linkedin_ad_clicked` (string, optional): Clicked LinkedIn Ad.
|
|
- `hs_clicked_linkedin_ad` (string, optional): Clicked on a LinkedIn Ad.
|
|
- `closedate` (string, optional): Close Date.
|
|
- `company` (string, optional): Company Name.
|
|
- `company_size` (string, optional): Company size.
|
|
- `country` (string, optional): Country/Region.
|
|
- `hs_country_region_code` (string, optional): Country/Region Code.
|
|
- `date_of_birth` (string, optional): Date of birth.
|
|
- `degree` (string, optional): Degree.
|
|
- `hs_email_customer_quarantined_reason` (string, optional): Email address quarantine reason.
|
|
- `hs_role` (string, optional): Employment Role. Must be one of the predefined values.
|
|
- `hs_seniority` (string, optional): Employment Seniority. Must be one of the predefined values.
|
|
- `hs_sub_role` (string, optional): Employment Sub Role. Must be one of the predefined values.
|
|
- `hs_employment_change_detected_date` (string, optional): Employment change detected date.
|
|
- `hs_enriched_email_bounce_detected` (boolean, optional): Enriched Email Bounce Detected.
|
|
- `hs_facebookid` (string, optional): Facebook ID.
|
|
- `hs_facebook_click_id` (string, optional): Facebook click id.
|
|
- `fax` (string, optional): Fax Number.
|
|
- `field_of_study` (string, optional): Field of study.
|
|
- `followercount` (number, optional): Follower Count.
|
|
- `gender` (string, optional): Gender.
|
|
- `hs_google_click_id` (string, optional): Google ad click id.
|
|
- `graduation_date` (string, optional): Graduation date.
|
|
- `owneremail` (string, optional): HubSpot Owner Email (legacy).
|
|
- `ownername` (string, optional): HubSpot Owner Name (legacy).
|
|
- `industry` (string, optional): Industry.
|
|
- `hs_inferred_language_codes` (string, optional): Inferred Language Codes. Must be one of the predefined values.
|
|
- `jobtitle` (string, optional): Job Title.
|
|
- `hs_job_change_detected_date` (string, optional): Job change detected date.
|
|
- `job_function` (string, optional): Job function.
|
|
- `hs_journey_stage` (string, optional): Journey Stage. Must be one of the predefined values.
|
|
- `kloutscoregeneral` (number, optional): Klout Score.
|
|
- `hs_last_metered_enrichment_timestamp` (string, optional): Last Metered Enrichment Timestamp.
|
|
- `hs_latest_source` (string, optional): Latest Traffic Source.
|
|
- `hs_latest_source_timestamp` (string, optional): Latest Traffic Source Date.
|
|
- `hs_legal_basis` (string, optional): Legal basis for processing contact's data.
|
|
- `linkedinbio` (string, optional): LinkedIn Bio.
|
|
- `linkedinconnections` (number, optional): LinkedIn Connections.
|
|
- `hs_linkedin_url` (string, optional): LinkedIn URL.
|
|
- `hs_linkedinid` (string, optional): Linkedin ID.
|
|
- `hs_live_enrichment_deadline` (string, optional): Live enrichment deadline.
|
|
- `marital_status` (string, optional): Marital Status.
|
|
- `hs_content_membership_email` (string, optional): Member email.
|
|
- `hs_content_membership_notes` (string, optional): Membership Notes.
|
|
- `message` (string, optional): Message.
|
|
- `military_status` (string, optional): Military status.
|
|
- `mobilephone` (string, optional): Mobile Phone Number.
|
|
- `numemployees` (string, optional): Number of Employees.
|
|
- `hs_analytics_source` (string, optional): Original Traffic Source.
|
|
- `photo` (string, optional): Photo.
|
|
- `hs_pinned_engagement_id` (number, optional): Pinned engagement ID.
|
|
- `zip` (string, optional): Postal Code.
|
|
- `hs_language` (string, optional): Preferred language. Must be one of the predefined values.
|
|
- `associatedcompanyid` (number, optional): Primary Associated Company ID.
|
|
- `hs_email_optout_survey_reason` (string, optional): Reason for opting out of email.
|
|
- `relationship_status` (string, optional): Relationship Status.
|
|
- `hs_returning_to_office_detected_date` (string, optional): Returning to office detected date.
|
|
- `salutation` (string, optional): Salutation.
|
|
- `school` (string, optional): School.
|
|
- `seniority` (string, optional): Seniority.
|
|
- `hs_feedback_show_nps_web_survey` (boolean, optional): Should be shown an NPS web survey.
|
|
- `start_date` (string, optional): Start date.
|
|
- `state` (string, optional): State/Region.
|
|
- `hs_state_code` (string, optional): State/Region Code.
|
|
- `hs_content_membership_status` (string, optional): Status.
|
|
- `address` (string, optional): Street Address.
|
|
- `tax_exempt` (string, optional): Tax Exempt.
|
|
- `hs_timezone` (string, optional): Time Zone. Must be one of the predefined values.
|
|
- `twitterbio` (string, optional): Twitter Bio.
|
|
- `hs_twitterid` (string, optional): Twitter ID.
|
|
- `twitterprofilephoto` (string, optional): Twitter Profile Photo.
|
|
- `twitterhandle` (string, optional): Twitter Username.
|
|
- `vat_number` (string, optional): VAT Number.
|
|
- `ch_verified` (string, optional): Verified for ACH/eCheck Payments.
|
|
- `website` (string, optional): Website URL.
|
|
- `hs_whatsapp_phone_number` (string, optional): WhatsApp Phone Number.
|
|
- `work_email` (string, optional): Work email.
|
|
- `hs_googleplusid` (string, optional): googleplus ID.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/create_deal">
|
|
**Description:** Create a new deal record in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `dealname` (string, required): Name of the deal.
|
|
- `amount` (number, optional): The value of the deal.
|
|
- `dealstage` (string, optional): The pipeline stage of the deal.
|
|
- `pipeline` (string, optional): The pipeline the deal belongs to.
|
|
- `closedate` (string, optional): The date the deal is expected to close.
|
|
- `hubspot_owner_id` (string, optional): The owner of the deal.
|
|
- `dealtype` (string, optional): The type of deal. Available values: `newbusiness`, `existingbusiness`.
|
|
- `description` (string, optional): A description of the deal.
|
|
- `hs_priority` (string, optional): The priority of the deal. Available values: `low`, `medium`, `high`.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/create_record_engagements">
|
|
**Description:** Create a new engagement (e.g., note, email, call, meeting, task) in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `engagementType` (string, required): The type of engagement. Available values: `NOTE`, `EMAIL`, `CALL`, `MEETING`, `TASK`.
|
|
- `hubspot_owner_id` (string, optional): The user the activity is assigned to.
|
|
- `hs_timestamp` (string, optional): The date and time of the activity.
|
|
- `hs_note_body` (string, optional): The body of the note. (Used for `NOTE`)
|
|
- `hs_task_subject` (string, optional): The title of the task. (Used for `TASK`)
|
|
- `hs_task_body` (string, optional): The notes for the task. (Used for `TASK`)
|
|
- `hs_task_status` (string, optional): The status of the task. (Used for `TASK`)
|
|
- `hs_meeting_title` (string, optional): The title of the meeting. (Used for `MEETING`)
|
|
- `hs_meeting_body` (string, optional): The description for the meeting. (Used for `MEETING`)
|
|
- `hs_meeting_start_time` (string, optional): The start time of the meeting. (Used for `MEETING`)
|
|
- `hs_meeting_end_time` (string, optional): The end time of the meeting. (Used for `MEETING`)
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/update_company">
|
|
**Description:** Update an existing company record in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the company to update.
|
|
- `name` (string, optional): Name of the company.
|
|
- `domain` (string, optional): Company Domain Name.
|
|
- `industry` (string, optional): Industry.
|
|
- `phone` (string, optional): Phone Number.
|
|
- `city` (string, optional): City.
|
|
- `state` (string, optional): State/Region.
|
|
- `zip` (string, optional): Postal Code.
|
|
- `numberofemployees` (number, optional): Number of Employees.
|
|
- `annualrevenue` (number, optional): Annual Revenue.
|
|
- `description` (string, optional): Description.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/create_record_any">
|
|
**Description:** Create a record for a specified object type in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `recordType` (string, required): The object type ID of the custom object.
|
|
- Additional parameters depend on the custom object's schema.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/update_contact">
|
|
**Description:** Update an existing contact record in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the contact to update.
|
|
- `firstname` (string, optional): First Name.
|
|
- `lastname` (string, optional): Last Name.
|
|
- `email` (string, optional): Email address.
|
|
- `phone` (string, optional): Phone Number.
|
|
- `company` (string, optional): Company Name.
|
|
- `jobtitle` (string, optional): Job Title.
|
|
- `lifecyclestage` (string, optional): Lifecycle Stage.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/update_deal">
|
|
**Description:** Update an existing deal record in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the deal to update.
|
|
- `dealname` (string, optional): Name of the deal.
|
|
- `amount` (number, optional): The value of the deal.
|
|
- `dealstage` (string, optional): The pipeline stage of the deal.
|
|
- `pipeline` (string, optional): The pipeline the deal belongs to.
|
|
- `closedate` (string, optional): The date the deal is expected to close.
|
|
- `dealtype` (string, optional): The type of deal.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/update_record_engagements">
|
|
**Description:** Update an existing engagement in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the engagement to update.
|
|
- `hs_note_body` (string, optional): The body of the note.
|
|
- `hs_task_subject` (string, optional): The title of the task.
|
|
- `hs_task_body` (string, optional): The notes for the task.
|
|
- `hs_task_status` (string, optional): The status of the task.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/update_record_any">
|
|
**Description:** Update a record for a specified object type in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the record to update.
|
|
- `recordType` (string, required): The object type ID of the custom object.
|
|
- Additional parameters depend on the custom object's schema.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/list_companies">
|
|
**Description:** Get a list of company records from HubSpot.
|
|
|
|
**Parameters:**
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/list_contacts">
|
|
**Description:** Get a list of contact records from HubSpot.
|
|
|
|
**Parameters:**
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/list_deals">
|
|
**Description:** Get a list of deal records from HubSpot.
|
|
|
|
**Parameters:**
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/get_records_engagements">
|
|
**Description:** Get a list of engagement records from HubSpot.
|
|
|
|
**Parameters:**
|
|
- `objectName` (string, required): The type of engagement to fetch (e.g., "notes").
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/get_records_any">
|
|
**Description:** Get a list of records for any specified object type in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `recordType` (string, required): The object type ID of the custom object.
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/get_company">
|
|
**Description:** Get a single company record by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the company to retrieve.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/get_contact">
|
|
**Description:** Get a single contact record by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the contact to retrieve.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/get_deal">
|
|
**Description:** Get a single deal record by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the deal to retrieve.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/get_record_by_id_engagements">
|
|
**Description:** Get a single engagement record by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the engagement to retrieve.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/get_record_by_id_any">
|
|
**Description:** Get a single record of any specified object type by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordType` (string, required): The object type ID of the custom object.
|
|
- `recordId` (string, required): The ID of the record to retrieve.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/search_companies">
|
|
**Description:** Search for company records in HubSpot using a filter formula.
|
|
|
|
**Parameters:**
|
|
- `filterFormula` (object, optional): A filter in disjunctive normal form (OR of ANDs).
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/search_contacts">
|
|
**Description:** Search for contact records in HubSpot using a filter formula.
|
|
|
|
**Parameters:**
|
|
- `filterFormula` (object, optional): A filter in disjunctive normal form (OR of ANDs).
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/search_deals">
|
|
**Description:** Search for deal records in HubSpot using a filter formula.
|
|
|
|
**Parameters:**
|
|
- `filterFormula` (object, optional): A filter in disjunctive normal form (OR of ANDs).
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/search_records_engagements">
|
|
**Description:** Search for engagement records in HubSpot using a filter formula.
|
|
|
|
**Parameters:**
|
|
- `engagementFilterFormula` (object, optional): A filter for engagements.
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/search_records_any">
|
|
**Description:** Search for records of any specified object type in HubSpot.
|
|
|
|
**Parameters:**
|
|
- `recordType` (string, required): The object type ID to search.
|
|
- `filterFormula` (string, optional): The filter formula to apply.
|
|
- `paginationParameters` (object, optional): Use `pageCursor` to fetch subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/delete_record_companies">
|
|
**Description:** Delete a company record by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the company to delete.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/delete_record_contacts">
|
|
**Description:** Delete a contact record by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the contact to delete.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/delete_record_deals">
|
|
**Description:** Delete a deal record by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the deal to delete.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/delete_record_engagements">
|
|
**Description:** Delete an engagement record by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordId` (string, required): The ID of the engagement to delete.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/delete_record_any">
|
|
**Description:** Delete a record of any specified object type by its ID.
|
|
|
|
**Parameters:**
|
|
- `recordType` (string, required): The object type ID of the custom object.
|
|
- `recordId` (string, required): The ID of the record to delete.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/get_contacts_by_list_id">
|
|
**Description:** Get contacts from a specific list by its ID.
|
|
|
|
**Parameters:**
|
|
- `listId` (string, required): The ID of the list to get contacts from.
|
|
- `paginationParameters` (object, optional): Use `pageCursor` for subsequent pages.
|
|
</Accordion>
|
|
|
|
<Accordion title="hubspot/describe_action_schema">
|
|
**Description:** Get the expected schema for a given object type and operation.
|
|
|
|
**Parameters:**
|
|
- `recordType` (string, required): The object type ID (e.g., 'companies').
|
|
- `operation` (string, required): The operation type (e.g., 'CREATE_RECORD').
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
|
|
## Usage Examples
|
|
|
|
### Basic HubSpot Agent Setup
|
|
|
|
```python
|
|
from crewai import Agent, Task, Crew
|
|
|
|
# Create an agent with HubSpot capabilities
|
|
hubspot_agent = Agent(
|
|
role="CRM Manager",
|
|
goal="Manage company and contact records in HubSpot",
|
|
backstory="An AI assistant specialized in CRM management.",
|
|
apps=['hubspot'] # All HubSpot actions will be available
|
|
)
|
|
|
|
# Task to create a new company
|
|
create_company_task = Task(
|
|
description="Create a new company in HubSpot with name 'Innovate Corp' and domain 'innovatecorp.com'.",
|
|
agent=hubspot_agent,
|
|
expected_output="Company created successfully with confirmation"
|
|
)
|
|
|
|
# Run the task
|
|
crew = Crew(
|
|
agents=[hubspot_agent],
|
|
tasks=[create_company_task]
|
|
)
|
|
|
|
crew.kickoff()
|
|
```
|
|
|
|
### Filtering Specific HubSpot Tools
|
|
|
|
```python
|
|
from crewai import Agent, Task, Crew
|
|
|
|
# Create agent with specific HubSpot actions only
|
|
contact_creator = Agent(
|
|
role="Contact Creator",
|
|
goal="Create new contacts in HubSpot",
|
|
backstory="An AI assistant that focuses on creating new contact entries in the CRM.",
|
|
apps=['hubspot/create_contact'] # Only contact creation action
|
|
)
|
|
|
|
# Task to create a contact
|
|
create_contact = Task(
|
|
description="Create a new contact for 'John Doe' with email 'john.doe@example.com'.",
|
|
agent=contact_creator,
|
|
expected_output="Contact created successfully in HubSpot."
|
|
)
|
|
|
|
crew = Crew(
|
|
agents=[contact_creator],
|
|
tasks=[create_contact]
|
|
)
|
|
|
|
crew.kickoff()
|
|
```
|
|
|
|
### Contact Management
|
|
|
|
```python
|
|
from crewai import Agent, Task, Crew
|
|
|
|
# Create agent with HubSpot contact management capabilities
|
|
crm_manager = Agent(
|
|
role="CRM Manager",
|
|
goal="Manage and organize HubSpot contacts efficiently.",
|
|
backstory="An experienced CRM manager who maintains an organized contact database.",
|
|
apps=['hubspot'] # All HubSpot actions including contact management
|
|
)
|
|
|
|
# Task to manage contacts
|
|
contact_task = Task(
|
|
description="Create a new contact for 'Jane Smith' at 'Global Tech Inc.' with email 'jane.smith@globaltech.com'.",
|
|
agent=crm_manager,
|
|
expected_output="Contact database updated with the new contact."
|
|
)
|
|
|
|
crew = Crew(
|
|
agents=[crm_manager],
|
|
tasks=[contact_task]
|
|
)
|
|
|
|
crew.kickoff()
|
|
```
|
|
|
|
### Getting Help
|
|
|
|
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
|
|
Contact our support team for assistance with HubSpot integration setup or troubleshooting.
|
|
</Card>
|