Connect your app to Salesforce
Connect your Lovable workspace to Salesforce to view, query, and update CRM records like Accounts, Contacts, and Cases directly in your app. It uses an External Client App from Salesforce so your team can build dashboards and tools with live data.
Workspace admins or owners who want their Lovable apps to view or update customer and sales data stored in Salesforce.
Do this, in order
- 1
Log in to Salesforce Setup, navigate to App Manager, and click New External Client App.
Salesforce requires an External Client App to give external tools like Lovable secure API access.
- 2
Enable OAuth in the External Client App settings, set the Callback URL to https://api.lovable.dev/workspaces/connectors/standard/oauth/callback, and add the 'api' and 'refresh_token, offline_access' scopes.
This allows Lovable to securely log in, query data via APIs, and stay connected without repeated logins.
- 3
Open External Client App Manager in Salesforce, view OAuth Settings, and copy both the Consumer Key (Client ID) and Consumer Secret (Client Secret).
Lovable needs these secret credentials to identify and authenticate your app with Salesforce.
- 4
In Lovable, navigate to Connectors, select Salesforce, click Connect, and enter your details: Display Name, Environment, My Domain Account URL, Client ID, and Client Secret.
This points Lovable to your specific Salesforce organization and credentials.
- 5
Set your sharing permissions (Private, specific members, or entire workspace), click Connect, and approve the authorization prompt in Salesforce.
This grants permissions to workspace members and confirms the live connection to Salesforce.
Paste this into your project
Use Salesforce and build a dashboard showing open Cases by priority and status, allowing users to view details for each case.
Words decoded
- External Client App
- Salesforce's modern way of granting third-party tools secure access to your CRM without giving out your direct password.
- SOQL
- Salesforce Object Query Language, a search syntax used inside Salesforce to look up specific records like Accounts and Leads.
- OAuth
- A secure sign-in system that lets one service access another using permissions without sharing your actual password.
- Sandbox
- An isolated copy of your Salesforce environment used for testing features without touching real customer data.
Where people get stuck
- Getting a redirect_uri_mismatch error means the callback URL entered in Salesforce does not match https://api.lovable.dev/workspaces/connectors/standard/oauth/callback exactly.
- Browser pop-up blockers can block the Salesforce login authorization screen when you click Connect.
- API requests made by this integration count against your Salesforce organization's API quota, billed by Salesforce.
- This connector cannot use Salesforce Bulk API, Streaming API, or orgs outside the *.salesforce.com domain.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.