Lý thuyết
40 phút
Bài 10/15

Integrations

Tích hợp AI agents với CRM, databases và external APIs

🔗 Integrations

Kết nối AI agents với business systems.

Integration Landscape

Common Integrations

Text
1CRM:
2- Salesforce
3- HubSpot
4- Pipedrive
5- Zoho
6
7Databases:
8- Airtable
9- Google Sheets
10- Notion
11- Supabase
12
13Communication:
14- Slack
15- Microsoft Teams
16- Email
17- SMS
18
19E-commerce:
20- Shopify
21- WooCommerce
22- Stripe
23
24Productivity:
25- Google Workspace
26- Microsoft 365
27- Calendars

CRM Integration

HubSpot

Text
1Use cases:
2- Create/update contacts
3- Log conversations
4- Create deals
5- Trigger workflows

Setup in Make

Text
11. Add HubSpot module
22. Authenticate (OAuth)
33. Select action:
4 - Create Contact
5 - Update Contact
6 - Search Records
7 - Create Deal

Agent + HubSpot Flow

Text
1When agent captures lead info:
2
31. Agent collects:
4 - Name
5 - Email
6 - Company
7 - Interest
8
92. Make workflow:
10 - Search existing contact
11 - If exists → Update
12 - If new → Create contact
13 - Create deal
14 - Assign to sales rep
15
163. Notify sales team

Salesforce

Text
1Similar pattern:
21. Connect Salesforce
32. Map fields
43. Create/update records
54. Trigger Salesforce automations

Database Integration

Airtable

Text
1Perfect for:
2- Storing conversation logs
3- Product catalog
4- FAQ database
5- User preferences

Setup

Text
11. Create Airtable base
22. Design tables
33. Get API key
44. Connect in Make

Example: Log Conversations

Text
1Airtable table: Conversations
2Fields:
3- conversation_id
4- user_id
5- channel
6- messages (long text)
7- sentiment
8- topics (multi-select)
9- resolved (checkbox)
10- created_at
11- updated_at

Workflow

Text
1After each conversation:
2
31. Get conversation data
42. Analyze sentiment
53. Extract topics
64. Create/update Airtable record
75. Tag with categories

Google Sheets

Text
1Simple integration:
2- Append rows
3- Update cells
4- Read data
5- Query data
6
7Use for:
8- Quick logging
9- Simple databases
10- Reporting
11- Sharing with team

Notion

Text
1Knowledge management:
2- Create pages
3- Update databases
4- Search content
5- Link resources
6
7Good for:
8- Documentation
9- Knowledge base source
10- Task tracking

External APIs

REST APIs

Text
1General pattern:
21. HTTP module in Make
32. Set URL
43. Set method (GET/POST/PUT)
54. Add headers (auth)
65. Add body (if needed)
76. Parse response

Authentication Types

Text
1API Key:
2Headers: {"X-API-Key": "your_key"}
3
4Bearer Token:
5Headers: {"Authorization": "Bearer token"}
6
7OAuth:
8- Redirect flow
9- Exchange code for token
10- Refresh tokens
11
12Basic Auth:
13Headers: {"Authorization": "Basic base64(user:pass)"}

Example: Weather API

Text
1Get weather for user's city:
2
31. User: "What's the weather in Hanoi?"
42. Extract city: "Hanoi"
53. HTTP GET: api.openweathermap.org/...?q=Hanoi
64. Parse response
75. Agent: "It's currently 28°C in Hanoi with clouds"

Example: E-commerce API

Text
1Check order status:
2
31. User: "Track order #12345"
42. Extract order number
53. HTTP GET: yourstore.com/api/orders/12345
64. Parse: status, shipping, ETA
75. Agent: "Your order shipped and arrives Tuesday"

Calendar Integration

Google Calendar

Text
1Use cases:
2- Check availability
3- Book appointments
4- Send invites
5- Reschedule meetings

Booking Flow

Text
1Agent conversation:
2User: "Book a meeting with sales"
3Agent: "When works for you?"
4User: "Tuesday afternoon"
5Agent: [Checks calendar]
6 "I have 2pm or 4pm available. Which do you prefer?"
7User: "2pm"
8Agent: [Creates event]
9 "Done! Meeting booked for Tuesday 2pm.
10 You'll receive a calendar invite shortly."

Implementation

Text
1Make workflow:
2
31. Search calendar for free slots
42. Filter by business hours
53. Present options to user
64. On selection:
7 - Create calendar event
8 - Add attendees
9 - Send invitations
105. Confirm to user

Email Integration

Sending Emails

Text
1Triggers:
2- After conversation ends
3- Lead captured
4- Support ticket created
5- Follow-up reminders

Example: Follow-up Email

Text
1After sales conversation:
2
31. Conversation ends
42. Extract discussed topics
53. AI generates personalized email:
6 "Hi [Name],
7 Great chatting with you about [topic].
8 As discussed, here's [relevant info].
9 Let me know if you have questions!"
104. Send via Gmail/SendGrid

Email Parsing

Text
1Process incoming emails:
2
31. Email received
42. Parse content
53. Classify type
64. Extract key info
75. Route to agent or create ticket
86. Auto-respond if appropriate

Slack/Teams Integration

Notifications

Text
1Alert team when:
2- New lead captured
3- Escalation needed
4- High-value customer
5- Negative sentiment detected

Slack Message

Text
1Make module: Slack - Post Message
2
3Channel: #sales-leads
4Message:
5"🔥 New Lead!
6Name: {{name}}
7Company: {{company}}
8Interest: {{interest}}
9Score: {{score}}
10<{{crm_link}}|View in CRM>"

Slack Bot

Text
1Build agent in Slack:
21. Create Slack app
32. Configure webhooks
43. Process messages in Make
54. Respond in Slack
6
7Use case:
8- Internal support bot
9- Company knowledge Q&A
10- Quick data lookups

Webhook Patterns

Incoming Webhooks

Text
1Receive data from external systems:
2
31. Create webhook in Make
42. Get URL
53. Configure in source system
64. Process incoming data
75. Trigger workflows

Outgoing Webhooks

Text
1Send data to external systems:
2
31. Action in agent
42. Make workflow triggered
53. HTTP POST to external URL
64. Include relevant data
75. Handle response

Real-time Updates

Text
1Keep systems in sync:
2
3Agent creates ticket
4
5Webhook to CRM
6
7CRM creates record
8
9Webhook back: record created
10
11Agent confirms to user

Data Mapping

Field Mapping

Text
1Map agent data to external fields:
2
3Agent → CRM
4─────────────────────────────
5user_name → First Name
6user_email → Email
7conversation_topic → Lead Source
8interest_level → Lead Status
9notes → Description

Data Transformation

Text
1Transform data formats:
2
3Date: "January 5, 2026" → "2026-01-05"
4Phone: "0912345678" → "+84912345678"
5Currency: "1000000" → "1,000,000 VND"

Error Handling

Handle Integration Errors
Text
1Common issues:
2- API timeout
3- Invalid data
4- Authentication expired
5- Rate limits
6- Service down
7
8Solutions:
91. Retry with backoff
102. Queue for later
113. Fallback behavior
124. Alert team
135. Log for debugging

Security Best Practices

Security
Text
11. Use OAuth when possible
22. Store keys securely (not in code)
33. Use least privilege
44. Encrypt sensitive data
55. Audit access logs
66. Rotate credentials regularly
77. Use IP whitelisting
88. Validate all inputs

Monitoring Integrations

Health Checks

Text
1Monitor:
2- API response times
3- Error rates
4- Data sync status
5- Rate limit usage

Alerts

Text
1Alert when:
2- API failures
3- Sync delays
4- Authentication issues
5- Unusual patterns

Bài Tập

Practice

Build Integration Flow:

  1. Set up Airtable for conversation logs
  2. Connect Google Calendar for booking
  3. Integrate with HubSpot (or similar CRM)
  4. Add Slack notifications
  5. Create email follow-up workflow
  6. Test full integration cycle

Tiếp theo: Bài 11 - Error Handling