pip3 install aiohttp python-dotenv pytzpip3 install linkedin_scraperpip3 install boto3python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install aiohttp python-dotenv pytz linkedin_scraper boto3brew install chromedriver- Download from ChromeDriver official site
- Ensure ChromeDriver version matches your Chrome browser version
- Add ChromeDriver to your PATH
chromedriver --versionCreate a .env file in the project root with your CCAI credentials:
CCAI_API_KEY=your_api_key_here
CCAI_CLIENT_ID=your_client_id_here
CCAI_EMAIL_URL=your_email_endpoint_url_here
# Sender Information (used in email signatures)
SENDER_NAME=Your Name
SENDER_TITLE=Your Title
SENDER_EMAIL=your.email@company.com
SENDER_PHONE=+1234567890
SENDER_LINKEDIN=https://www.linkedin.com/in/yourprofile
SENDER_COMPANY=Your Company Name
SENDER_COMPANY_URL=https://yourcompany.com
# AWS Bedrock settings
AWS_REGION=us-east-1# Install AWS CLI if not already installed
brew install awscli
# Configure SSO
aws configure ssoYou'll be prompted for:
- SSO session name (e.g., "my-company")
- SSO start URL (e.g., https://my-company.awsapps.com/start)
- SSO region (e.g., us-east-1)
- Account ID and Role name
- Default region (us-east-1) and output format (json)
# Login to SSO (opens browser)
aws sso login --profile your-profile-name
# Or if set as default profile:
aws sso login# Install AWS CLI
brew install awscli
# Configure credentials
aws configureEnter your AWS Access Key ID, Secret Access Key, region (us-east-1), and output format (json).
Add to your .env file:
AWS_ACCESS_KEY_ID=your_access_key_here
AWS_SECRET_ACCESS_KEY=your_secret_key_here
AWS_REGION=us-east-1
# Optional: Specify AWS profile for SSO
AWS_PROFILE=your-sso-profile-nameThe scripts will attempt to use AWS credentials in this order:
- AWS Profile (if
AWS_PROFILEis set) - SSO profiles supported - Environment Variables (if profile fails or not set) -
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY - Default AWS Credentials - IAM roles, default profile, or AWS CLI configuration
- Go to AWS Bedrock Console
- Navigate to "Model access"
- Enable Amazon Nova Pro model (
us.amazon.nova-pro-v1:0) - Submit the request (approval may take a few minutes)
- Log into LinkedIn in your browser
- Open Developer Tools (F12)
- Go to Application/Storage → Cookies → linkedin.com
- Copy the
li_atcookie value - Add to your
.envfile:
LINKEDIN_SESSION_COOKIE=your_li_at_cookie_value_hereAdd to your .env file:
LINKEDIN_USERNAME=your_linkedin_email@example.com
LINKEDIN_PASSWORD=your_linkedin_passwordNote: Session cookies are more secure and less likely to trigger LinkedIn's security measures.
If you see "WebDriver disabled" messages, re-enable it by editing:
linkedin_mcp_server/error_handler.py
Replace the safe_get_driver() function with:
def safe_get_driver():
"""
Safely get or create a driver with proper error handling.
"""
from linkedin_mcp_server.authentication import ensure_authentication
from linkedin_mcp_server.drivers.chrome import get_or_create_driver
# Get authentication first
authentication = ensure_authentication()
# Create driver with authentication
driver = get_or_create_driver(authentication)
return driverpython3 send_single_email.py "recipient@email.com" "Subject" "Message" 30python3 ai_gmail_outbound.pypython3 send_test_emails.pypython3 simple_test_emails.pyNote: All scripts now support AWS profiles for Bedrock AI generation. They will automatically use the AWS_PROFILE environment variable if set, or fall back to default AWS credentials.
ChromeDriver not found:
brew install chromedriver
# or download manually and add to PATHAWS Bedrock access denied:
- Ensure you have proper AWS credentials configured
- For SSO: Run
aws sso login --profile your-profile-nameto refresh session - Check that Amazon Nova Pro model is enabled in Bedrock console
- Verify your AWS region is set to
us-east-1 - For SSO profiles, ensure the role has Bedrock permissions
AWS SSO session expired:
# Refresh your SSO session
aws sso login --profile your-profile-name
# Check current session status
aws sts get-caller-identity --profile your-profile-nameLinkedIn login issues:
- Use session cookies instead of username/password
- Check if your LinkedIn account has 2FA enabled
- Ensure cookies are fresh (re-login if needed)
Module not found errors:
- Ensure you're in the virtual environment:
source path/to/venv/bin/activate - Install missing dependencies:
pip install <package-name>
Rate limiting:
- LinkedIn may rate limit requests
- Add delays between profile scraping
- Use session cookies for better authentication
aiohttp: For async HTTP requests to CCAI APIpython-dotenv: For loading environment variables from .env filepytz: For timezone handling in email schedulinglinkedin_scraper: For LinkedIn profile and post scrapingselenium: WebDriver automation (installed with linkedin_scraper)boto3: AWS SDK for Bedrock AI email generation
- Never commit your
.envfile to version control - Use session cookies instead of passwords when possible
- Regularly refresh LinkedIn session cookies
- Store AWS credentials securely (use IAM roles when possible)
- Be mindful of LinkedIn's rate limits and terms of service