If your Salesforce organization has the enhanced note-taking tool (Notes) enabled via Set Up Notes, users or administrators may encounter the following error when inserting ContentNote records via the Salesforce API:
Note can't be saved because it contains HTML tags or unescaped characters that are not allowed in a Note.
This error occurs when using tools such as Workbench to insert ContentNote records, or when the insert file contains unsupported HTML tags or incorrectly formatted special characters.
This error occurs when inserting ContentNote records via the Salesforce API using tools other than Data Loader, or when the file content contains unsupported HTML formatting. Salesforce requires that ContentNote records are inserted using Salesforce Data Loader (minimum version 32 required). Attempting to insert ContentNote records via Workbench will always result in this error, as Workbench is an unsupported tool.
Recommended settings when inserting ContentNote records:
Choosing a file type for insert:
When following the steps in the Importing Notes to the ContentNote Object Using Data Loader article, you can specify either an .html or .txt file. Using a .txt file is recommended for the best results.
.html file requirements and limitations:
.txt file requirements and limitations:
` HTML tag; otherwise line breaks are replaced with spaces
<i> Italic text </i><strong> Bold text </strong><u> Underlined text </u><strong><i><u>Formatted Text</u></i></strong>Note: It is not currently possible to insert Notes via Data Loader with advanced formatting such as unordered lists, ordered lists, or indentations using either .html or .txt files.
If you need to migrate legacy Notes to the enhanced Notes tool, externally preparing the data files before import is required. As an alternative, consider maintaining the legacy Notes & Attachments related list on page layouts so users can continue to view past notes, while adding new notes via the Notes related list going forward.
000387974

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.