AI CRM Integration: Automate Contact Management & Follow-ups
AI CRM Integration
Section titled “AI CRM Integration”Use Cases
Section titled “Use Cases”- Lead enrichment: Auto-fill contact data
- Email generation: Personalized outreach
- Meeting summaries: Auto-update CRM
- Next best action: AI recommendations
- Sentiment analysis: Prioritize hot leads
HubSpot + AI
Section titled “HubSpot + AI”Zapier Workflow
Section titled “Zapier Workflow”Trigger: New contact in HubSpot→ ChatGPT: Generate personalized email→ HubSpot: Create email task→ Slack: Notify sales repAPI Integration
Section titled “API Integration”import requestsfrom openai import OpenAI
HUBSPOT_API_KEY = "your-key"client = OpenAI()
def enrich_contact(contact_id): # Get contact from HubSpot contact = get_hubspot_contact(contact_id)
# AI enrichment prompt = f"""Based on this info, suggest: - Industry - Company size - Pain points - Best approach
Contact: {contact['company']}, {contact['title']} """
suggestions = client.chat.completions.create( model="gpt-4", messages=[{"role": "user", "content": prompt}] ).choices[0].message.content
# Update HubSpot update_hubspot_contact(contact_id, {"notes": suggestions})Salesforce + AI
Section titled “Salesforce + AI”Einstein Integration
Section titled “Einstein Integration”- Built-in AI features
- Lead scoring
- Opportunity insights
Custom AI
Section titled “Custom AI”from simple_salesforce import Salesforce
sf = Salesforce(username='...', password='...', security_token='...')
def ai_lead_scoring(lead_id): lead = sf.Lead.get(lead_id)
score_prompt = f"""Score this lead (0-100): Company: {lead['Company']} Industry: {lead['Industry']} Title: {lead['Title']} Engagement: {lead['Email_Opens__c']} opens """
score = get_ai_score(score_prompt)
# Update Salesforce sf.Lead.update(lead_id, {'AI_Score__c': score})Pipedrive + AI
Section titled “Pipedrive + AI”n8n Workflow
Section titled “n8n Workflow”{ "nodes": [ { "name": "Pipedrive Trigger", "type": "n8n-nodes-base.pipedriveTrigger", "webhookId": "new_deal" }, { "name": "AI Analysis", "type": "n8n-nodes-base.openAi", "parameters": { "operation": "message", "text": "Analyze this deal and suggest next steps: {{$json.title}}" } }, { "name": "Update Pipedrive", "type": "n8n-nodes-base.pipedrive", "parameters": { "operation": "update", "resource": "deal", "notes": "={{$json.choices[0].message.content}}" } } ]}Meeting Transcription → CRM
Section titled “Meeting Transcription → CRM”def meeting_to_crm(audio_file, deal_id): # Transcribe transcript = client.audio.transcriptions.create( model="whisper-1", file=audio_file )
# Extract action items analysis = client.chat.completions.create( model="gpt-4", messages=[{ "role": "user", "content": f"""Extract from meeting: - Key discussion points - Action items (who, what, when) - Next meeting date - Deal stage recommendation
Transcript: {transcript.text}""" }] )
# Update CRM update_deal(deal_id, analysis.choices[0].message.content)Smart Follow-ups
Section titled “Smart Follow-ups”def generate_followup(contact_id, last_interaction): context = get_contact_history(contact_id)
email = client.chat.completions.create( model="gpt-4", messages=[{ "role": "user", "content": f"""Write follow-up email: Contact: {context['name']} at {context['company']} Last interaction: {last_interaction} Their interest: {context['notes']} Our product: {product_description}
Goal: Move to next stage Tone: Professional, helpful Length: <150 words""" }] )
return email.choices[0].message.contentFound an issue? Open an issue!