feature: Add crm tool with salesforce and hubspot support #176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CRM Tools
Description
The CRM Tools are designed for seamless interaction with popular CRM platforms like Salesforce and HubSpot.
These tools allow you to integrate with CRM systems, perform data operations,
and automate tasks such as lead management, email campaigns, and more.
Currently, the following CRM platforms are supported:
To successfully use these tools, you need to have the appropriate API keys and credentials set in your environment.
Installation
To start using the CRM Integration Tools, you must first install the
crewai_tools
package.This can be easily done with the following command:
pip install 'crewai[tools]'
Setup
Before you begin, ensure you have set the required environment variables for both Salesforce and HubSpot.
Environment Variables
You need to set the following environment variables:
For Salesforce:
SALESFORCE_API_KEY
: Your Salesforce API keySALESFORCE_BASE_URL
: Base URL for Salesforce APISALESFORCE_CLIENT_ID
: Salesforce Client IDSALESFORCE_CLIENT_SECRET
: Salesforce Client SecretSALESFORCE_REFRESH_TOKEN
: Salesforce refresh tokenFor HubSpot:
HUBSPOT_API_KEY
: Your HubSpot API keyHUBSPOT_BASE_URL
: Base URL for HubSpot APIYou can set these environment variables using the terminal or by including them in a
.env
file.Example of
.env
file:Examples
Creating Salesforce Tool Using Factory
Here is how you can use the
CrmToolFactory
to create a Salesforce integration tool and fetch data from Salesforce:Creating HubSpot Tool Using Factory
Similarly, you can create a HubSpot tool instance using the factory and fetch data from HubSpot: