- Updated: March 22, 2026
- 7 min read
Integrating OpenClaw with HubSpot, Salesforce, and Pipedrive on UBOS
Integrating OpenClaw Sales‑Assistant with HubSpot, Salesforce, and Pipedrive on UBOS is a three‑step process: configure the CRM app, expose the required webhooks in OpenClaw, and deploy the code via the UBOS CLI.
1. Introduction
OpenClaw is a lightweight, AI‑powered sales‑assistant that can surface leads, schedule follow‑ups, and enrich contact data in real time. When you connect OpenClaw to the three most popular CRMs—HubSpot, Salesforce, and Pipedrive—your sales team gains a single source of truth and a unified automation layer.
Why integrate?
- Eliminate manual data entry across platforms.
- Trigger AI‑driven recommendations the moment a lead is created.
- Maintain compliance with a single audit trail on the UBOS platform overview.
2. Prerequisites
UBOS Account & Access
You need an active UBOS homepage subscription. The UBOS pricing plans include a free tier suitable for development and testing.
OpenClaw Instance on UBOS
Deploy OpenClaw using the Web app editor on UBOS. Follow the OpenClaw hosting guide for a one‑click launch.
API Credentials for Each CRM
Gather the following before you start:
- HubSpot client ID & secret.
- Salesforce Connected App consumer key & secret.
- Pipedrive personal API token.
Store these secrets in UBOS environment variables (see the deployment tips later).
3. HubSpot Integration
Step 1 – Create a HubSpot App
Log in to your HubSpot developer account, navigate to Apps & Integrations → Create app, and note the client ID and client secret. Set the redirect URI to https://your-openclaw-instance.com/oauth/callback.
Step 2 – Install OpenClaw on UBOS
Use the UBOS CLI to push the OpenClaw repository:
ubos login
ubos push openclaw --env HUBSPOT_CLIENT_ID=YOUR_ID HUBSPOT_CLIENT_SECRET=YOUR_SECRET
For a smoother experience, enable the Workflow automation studio to visualize webhook flows.
Step 3 – Add HubSpot Webhook in OpenClaw
In the OpenClaw admin UI, go to Integrations → Webhooks** and add a new HubSpot webhook pointing to /api/hubspot/contact-sync. Choose the Contact creation event.
Step 4 – Sample Node.js Code for Contact Sync
The following snippet demonstrates how OpenClaw can push a new contact to HubSpot using the official SDK:
const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({
accessToken: process.env.HUBSPOT_ACCESS_TOKEN
});
async function syncContact(contact) {
try {
const response = await hubspotClient.crm.contacts.basicApi.create({
properties: {
email: contact.email,
firstname: contact.firstName,
lastname: contact.lastName,
phone: contact.phone,
company: contact.company
}
});
console.log('HubSpot contact created:', response.id);
} catch (error) {
console.error('HubSpot sync error:', error);
}
}
// Example payload from OpenClaw webhook
module.exports = async (req, res) => {
const contact = req.body;
await syncContact(contact);
res.status(200).send('OK');
};
Step 5 – Test the Integration
Use Postman to POST a sample contact to /api/hubspot/contact-sync. Verify the record appears in HubSpot under Contacts → All contacts. If you encounter authentication errors, double‑check the OAuth token refresh logic in your UBOS environment variables.
4. Salesforce Integration
Step 1 – Set Up a Connected App
In Salesforce Setup, search for App Manager → New Connected App**. Enable OAuth Settings**, set the callback URL to https://your-openclaw-instance.com/oauth/callback, and select the following scopes:
- Access and manage your data (api)
- Perform requests on your behalf at any time (refresh_token, offline_access)
Step 2 – Configure OAuth Scopes
After saving, note the Consumer Key and Consumer Secret**. Add them to UBOS as SF_CONSUMER_KEY and SF_CONSUMER_SECRET.
Step 3 – Deploy OpenClaw with Environment Variables
ubos push openclaw \
--env SF_CONSUMER_KEY=YOUR_KEY \
--env SF_CONSUMER_SECRET=YOUR_SECRET \
--env SF_USERNAME=YOUR_SF_USERNAME \
--env SF_PASSWORD=YOUR_SF_PASSWORD
Step 4 – Sample Apex/REST Code for Lead Creation
OpenClaw can call Salesforce’s REST API directly. Below is a minimal Node.js example that mimics an Apex‑style payload:
const axios = require('axios');
const qs = require('querystring');
async function getAccessToken() {
const tokenResponse = await axios.post(
'https://login.salesforce.com/services/oauth2/token',
qs.stringify({
grant_type: 'password',
client_id: process.env.SF_CONSUMER_KEY,
client_secret: process.env.SF_CONSUMER_SECRET,
username: process.env.SF_USERNAME,
password: process.env.SF_PASSWORD
})
);
return tokenResponse.data.access_token;
}
async function createLead(lead) {
const token = await getAccessToken();
const response = await axios.post(
`${process.env.SF_INSTANCE_URL}/services/data/v57.0/sobjects/Lead/`,
{
FirstName: lead.firstName,
LastName: lead.lastName,
Company: lead.company,
Email: lead.email,
Phone: lead.phone
},
{
headers: { Authorization: `Bearer ${token}` }
}
);
console.log('Lead created with Id:', response.data.id);
}
// Webhook handler
module.exports = async (req, res) => {
await createLead(req.body);
res.status(200).send('Lead synced');
};
Step 5 – Verify Data Flow
Open Salesforce and navigate to App Launcher → Leads → All Leads. A new record should appear after you trigger the OpenClaw webhook. Use the Salesforce Developer Docs for deeper debugging.
5. Pipedrive Integration
Step 1 – Generate API Token
Log into Pipedrive, go to Settings → API, and copy the personal token. This token grants full access to deals, contacts, and activities.
Step 2 – Configure OpenClaw Pipeline on UBOS
In the OpenClaw UI, create a new pipeline named PipedriveDealSync and map the following fields:
- Deal title →
subject - Value →
value - Contact email →
email
Step 3 – Sample Python Code for Deal Creation
import os
import requests
API_TOKEN = os.getenv('PIPEDRIVE_TOKEN')
BASE_URL = 'https://api.pipedrive.com/v1'
def create_deal(deal):
url = f"{BASE_URL}/deals?api_token={API_TOKEN}"
payload = {
'title': deal['subject'],
'value': deal['value'],
'person_id': get_or_create_person(deal['email'])
}
response = requests.post(url, json=payload)
response.raise_for_status()
print('Deal created ID:', response.json()['data']['id'])
def get_or_create_person(email):
# Search for existing person
search_url = f"{BASE_URL}/persons/search?term={email}&api_token={API_TOKEN}"
r = requests.get(search_url)
data = r.json()
if data['data']['items']:
return data['data']['items'][0]['item']['id']
# Create new person if not found
create_url = f"{BASE_URL}/persons?api_token={API_TOKEN}"
r = requests.post(create_url, json={'name': email, 'email': email})
r.raise_for_status()
return r.json()['data']['id']
# Flask webhook endpoint
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/api/pipedrive/deal-sync', methods=['POST'])
def deal_sync():
deal = request.json
create_deal(deal)
return jsonify({'status': 'ok'}), 200
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8080)
Step 4 – Debugging Tips
- Enable UBOS log streaming to capture HTTP 4xx/5xx responses.
- Validate the token scope by calling
GET /v1/users/mebefore creating deals. - Use
curl -vlocally to reproduce webhook payloads.
6. Deployment Tips for UBOS
UBOS CLI – Push & Rollback
The UBOS CLI is your primary deployment tool. A typical workflow looks like:
# Build locally
npm run build
# Push to UBOS
ubos push openclaw --env-file .env
# Verify health
ubos health openclaw
If a deployment fails, run ubos rollback openclaw to revert to the previous stable version.
Secure Environment Variables
Never hard‑code secrets. Store them in UBOS’s encrypted vault:
ubos secret set HUBSPOT_CLIENT_ID your_id
ubos secret set HUBSPOT_CLIENT_SECRET your_secret
# Repeat for Salesforce & Pipedrive
Reference them in your code via process.env.VAR_NAME (Node) or os.getenv (Python).
Monitoring & Health Checks
UBOS provides built‑in health endpoints (/healthz) and log aggregation. Pair them with the Enterprise AI platform by UBOS to set up alerts for failed webhook deliveries.
Example curl health check:
curl -s https://your-openclaw-instance.com/healthz | jq .
{
"status": "ok",
"uptime": "72h",
"webhooks": {
"hubspot": "connected",
"salesforce": "connected",
"pipedrive": "connected"
}
}
7. Conclusion
By following the steps above, developers can turn OpenClaw into a universal sales‑assistant that automatically syncs contacts, leads, and deals across HubSpot, Salesforce, and Pipedrive—all while leveraging UBOS’s low‑code deployment model. The result is a tighter sales funnel, reduced manual effort, and real‑time AI insights that scale with your organization.
Ready to get your own OpenClaw instance up and running? Visit the OpenClaw hosting guide for a quick start, then explore the UBOS templates for quick start to accelerate future integrations.
Need a partner to accelerate your AI journey? Check out the UBOS partner program or explore AI marketing agents for complementary use‑cases.
8. References
- HubSpot API Docs – developers.hubspot.com
- Salesforce REST API Guide – developer.salesforce.com
- Pipedrive API Reference – pipedrive.readme.io
- UBOS Documentation – UBOS homepage
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.