- Query Accounts, Contacts, Leads, Cases, and other standard objects using SOQL.
- Display and filter CRM records in dashboards and internal tools.
- Create and update records via the Salesforce REST API.
- Run custom SOQL queries for reporting and data exports.
Common use cases and example apps
How to connect Salesforce
Workspace admins and owners can connect Salesforce. You can create multiple Salesforce connections using different orgs or External Client Apps, which is useful for separating production and sandbox environments. When the connection is created, Salesforce becomes available across all projects in the workspace. Anyone building in a project can ask Lovable in chat to link their project to it.Prerequisites
Before connecting Salesforce, make sure you have:- A Salesforce org (Developer Edition, production, or sandbox)
- A Salesforce External Client App with OAuth enabled (see Step 1 below)
- Lovable workspace owner or admin role
All API requests made through this connector count against your Salesforce org’s API limits. Billing and quota are handled directly by Salesforce, not Lovable.
Step 1: Create a Salesforce External Client App
Salesforce uses External Client Apps to authorize third-party access via OAuth. You need to create one to get a Client ID and Client Secret for Lovable.Salesforce no longer allows creating new Connected Apps. External Client Apps are their replacement, and the Lovable connector works identically with both. If you already have a connection set up with a Connected App, it keeps working and needs no migration.
1
Open Setup in Salesforce
Sign in to your Salesforce org. Click the gear icon in the top-right corner and select Setup.
2
Navigate to App Manager
In the left sidebar, search for App Manager and select it under Apps.
3
Create a new External Client App
Click New External Client App in the top-right corner.Fill in the required fields:
- Name: for example,
Lovable Integration - API Name: auto-populated from the name
- Contact Email: your email address
- Distribution State: leave set to Local
4
Enable OAuth settings
Expand the Enable OAuth section and check Enable OAuth.Set the Callback URL to:Under Selected OAuth Scopes, add:
- Manage user data via APIs (api)
- Perform requests at any time (refresh_token, offline_access)
5
Retrieve your credentials
Open your new app in Setup → External Client App Manager, select the Settings tab, and expand OAuth Settings.Click Consumer Key and Secret to view your credentials:
- Consumer Key: this is your Client ID
- Consumer Secret: this is your Client Secret
Step 2: Connect Salesforce to Lovable
1
Open Salesforce in Connectors
Go to Connectors → App connectors and select Salesforce.
2
Add a connection
Click Add connection.
3
Enter your credentials
Fill in the connection fields:
- Display name: name the connection, for example
Salesforce Prod. This name is only used inside Lovable to identify the connection. - Environment: select Production for production orgs and Developer Edition. Select Sandbox only if your org is a
test.salesforce.comsandbox. - Account URL: your org’s My Domain URL, for example
https://acme.my.salesforce.com. Find this in Setup → My Domain. - Client ID: the Consumer Key from your External Client App.
- Client Secret: the Consumer Secret from your External Client App.
4
Choose who can access this connection
Under Who can access this connection, decide who in your workspace can use the connection:
- Only you (default): only the person creating the connection can use it and its associated data.
- Invite specific people: only you and explicitly added workspace members can use the connection and its associated data.
- Invite entire workspace: click Invite entire workspace to make the connection available to everyone in your Lovable workspace.
5
Authorize with Salesforce
Click Connect. The Salesforce authorization window opens, so make sure your browser doesn’t block pop-ups. If it does, Lovable redirects you instead.Sign in to Salesforce if prompted, review the requested permissions, and click Allow.You’ll be redirected back to Lovable with a confirmation.
Limitations
The Salesforce connector cannot:- Access orgs outside the
*.salesforce.comdomain. - Use Salesforce Bulk API or Streaming API endpoints.
Need each end user to sign in with their own Salesforce account and act on their own data? Use the Salesforce app user connector instead.
Troubleshooting
I get a redirect_uri_mismatch error when connecting.
I get a redirect_uri_mismatch error when connecting.
Your Salesforce External Client App has the wrong callback URL. In your Salesforce app settings, set the callback URL to exactly:Save the change in Salesforce, wait a few minutes for it to take effect, and connect again. Setups created before July 8, 2026 may have copied an incorrect URL from an earlier version of this page.
How to unlink projects from a connection
Editors and above can remove specific projects from a connection without deleting the connection entirely. The connection will remain available for other projects. To unlink projects:1
Open Connectors
Open Connectors, then go to App connectors, and select .
2
Open the connection
Open the connection you want to manage.
3
Select projects
Under Linked projects, check the projects you want to unlink.
4
Confirm
Click Unlink projects and confirm.
How to delete a connection
Workspace admins and owners can delete connections. Other members can delete a connection if they created it, or if they have been explicitly granted access to it. Before deleting, review the Linked projects section to see which projects are currently using the connection. To delete a connection:1
Open Connectors
Open Connectors, then go to App connectors, and select .
2
Open the connection
Open the connection you want to remove.
3
Review linked projects
Review the Linked projects section.
4
Delete
Under Delete this connection, click Delete and confirm.