Integrate Notion and Salesforce
Overview
Integrating Salesforce with third-party applications like Notion allows you to combine their best features to optimize business processes. Salesforce, as a powerful CRM platform, helps manage customer interactions, sales, and marketing, while Notion serves as a versatile tool for organizing information and managing projects. Combining these two platforms opens up new opportunities for task automation and improved data management.
Advantages
- Process Automation: Automatic data exchange between Salesforce and Notion reduces manual work, increasing efficiency and data accuracy.
- Centralized Information Management: Data synchronization ensures access to up-to-date information at any time and from any device.
- Enhanced Collaboration: Integration enables teams to work together effectively, combining CRM data with notes, tasks, and projects in Notion.
Integration methods
- API Integration: For more flexible and customized solutions, you can use the APIs of both platforms. This allows you to configure data synchronization according to your specific needs.
Let's deep in Notion
Notion is a powerful online platform for knowledge management that allows users to create and organize various types of content such as notes, tasks, tables, databases, to-do lists, projects, and more. It is a versatile tool that can be used both individually and in team projects. Here are some key aspects and features of Notion:
Key Features of Notion:
- Notes and Documents:
- Users can create various notes and documents, format text, and insert images, videos, code, and other media.
- Tasks and To-Do Lists:
- You can create tasks, assign them to other users, set deadlines, and track progress.
- Tables and Databases:
- Notion allows the creation of interactive tables and databases that can be used for project management, task tracking, information storage, and more.
- Integrations:
- The platform supports integrations with other popular tools and services, such as Google Drive, Trello, Slack, etc.
- Collaboration:
- Notion enables real-time collaboration, allowing teams to work together effectively on projects.
- Templates:
- Users can use ready-made templates for various purposes or create their own templates to speed up their workflow.
Uses of Notion:
- Personal Productivity:
- Notion can be used to organize personal notes, to-do lists, daily planning, journaling, and more.
- Project Management:
- The platform is ideal for managing projects of any complexity, using kanban boards, Gantt charts, task lists, and other tools.
- Learning and Research:
- Students and researchers can use Notion to store and organize their notes, conduct research, and compile summaries and plans.
- Team Collaboration:
- Teams can use Notion for collaborative work on documents, projects, tracking progress, and sharing information.
Disadvantages of Notion:
- Limitations of the Free Version: Some features may require a paid subscription.
- Learning Curve: It may take time to master all the platform's capabilities.
Specifications
The Notion API enables developers to integrate other software with Notion or automate workflows within the platform. Here’s how it can be applied with Salesforce:
- Sales Teams: Connect Salesforce to Notion to automatically add closed deals to a Notion database, allowing for cross-functional account management.
- Engineering Teams: Integrate Jira with Notion to pull bug tickets into a central database, making them visible to all teams. Similarly, connect Salesforce service cases to Notion for improved collaboration on issue resolution.
For example, sales teams might connect Salesforce to Notion — every time a deal is closed in Salesforce, it’s automatically added to a Notion database so you can manage these accounts cross-functionally on Notion (with teams who aren’t using Salesforce). Or your engineering team might build an integration that connects Jira to Notion, so bug tickets can be pulled into a database where all teams can see what's being worked on.
These integrations centralize information from different tools into Notion, fostering more efficient collaboration.
What can be accomplished with API integration
The API facilitates programmatic interaction with Notion’s databases, pages, and content through various endpoints. This capability allows teams to automate workflows and manage information more efficiently. Here’s a high-level overview:
- Databases: Retrieve and manage database entries in Notion directly from Salesforce.
- Pages & Blocks: Create and customize Notion pages and blocks, integrating data from Salesforce.
- Workspace People: Manage workspace users programmatically, enhancing transparency and collaboration.
Creation connection
Before starting the integration, you need to have:
Notion:
- Active account in Notion.
- Create Internal integration or Public integration in the integration’s settings page. (If you create Internal integration don’t forget Give your integration page permissions)
- Public integration example:
Salesforce:
-
Create Authentication Protocols for Named Credentials
- Provider Type - “Open ID Connect”
- Consumer Key - OAuth Client ID (Notion)
- Consumer Secret - OAuth Client Secret (Notion)
- Authorize Endpoint URL - “https://api.notion.com/v1/oauth/authorize”
- Token Endpoint URL - “https://api.notion.com/v1/oauth/token”
- After saving, you will see "Salesforce Configuration". Copy the "Callback URL" field and paste it into the “Redirect URIs” field in the Notion Basic Information
- Create an OAuth External Credential with the Browser Flow
- Create Principals -
Create Permission Set
- Enable Read, Create, Edit permissions in Object Settings > User External Credentials
- Add External Credential Principals to External Credential Principal Access
After this steps You can see Principal Access in External Credential Principals:
- Create Named Credential
- URL - “https://api.notion.com”
- External Credential - External Credential that was created in the previous steps
- Press the "Authenticate" button located in Setup > Named Credentials > External Credentials > Choose Created External Credential > Actions(Principals) > Authenticate
- Go through Notion integration permissions flow
HTTP SERVICE
This example returns a JSON about all pages on the Notion side
HttpRequest req = new HttpRequest();
Http http = new Http();
req.setEndpoint('callout:Named_Test_Cred/v1/search');
req.setMethod('POST');
req.setHeader('Notion-Version', '2022-06-28');
req.setHeader('Content-Type', 'application/json');
Map<String, Object> payload = new Map<String, Object>();
Map<String, Object> filter = new Map<String, Object>();
filter.put('value', 'page');
filter.put('property', 'object');
payload.put('filter', filter);
req.setBody(JSON.serialize(payload));
HttpResponse res = http.send(req);
This example creating a new database in Notion
String dbName = 'Example Name';
String notionPageId = 'yourExamolePageId';
HttpRequest req = new HttpRequest();
Http http = new Http();
req.setEndpoint('callout:Named_Test_Cred/v1/databases');
req.setMethod('POST');
req.setHeader('Notion-Version', '2022-06-28');
req.setHeader('Content-Type', 'application/json');
Map<String, Object> payload = new Map<String, Object>();
Map<String, Object> parent = new Map<String, Object>();
parent.put('type', 'page_id');
parent.put('page_id', notionPageId);
payload.put('parent', parent);
payload.put('title', new List<Map<String, Object>>{
new Map<String, Object>{
'type' => 'text',
'text' => new Map<String, Object>{
'content' => dbName
}
}
});
payload.put('properties', new Map<String, Object>{
'Name' => new Map<String, Object>{
'title' => new Map<String, Object>()
}
});
req.setBody(JSON.serialize(payload));
HttpResponse res = http.send(req);
Conclusion
Integrating Salesforce with Notion boosts operational efficiency by automating processes, centralizing data, and enhancing teamwork. This powerful combination enables informed decision-making and streamlined workflows, allowing businesses to remain competitive in a dynamic market.

