Make the AI Re-read Every Notion Page It Writes (Line Breaks, Garbled Text, Stray Links)
When you ask an AI to write to a Notion page, it reports back that the write is complete. However, that report isn't always accurate. Opening pages written via the Notion MCP later on, I repeatedly found formatting issues—newlines left as literal "\n" text, or non-ASCII characters such as Japanese mutating into different glyphs.
In this article, I categorize the corruptions that actually occurred in my environment into five patterns, summarizing how to detect and prevent each one. I previously covered how to connect the integration in Connect Claude Code to Notion: Setting Up Notion MCP. Here, as a follow-up, I dive deeper into how to verify the page after writing.
Five Patterns of Corruption
Note that what I describe here is "what happened in my specific environment using that particular writing method." Because tools are constantly updated, some of these issues may already be fixed. That is precisely why building a systematic habit of verification is so valuable.
| Pattern | What Happened | How to Spot It |
|---|---|---|
| 1. Newlines and tabs | Newlines appeared as literal "\n" and tabs as characters like "t" | Re-read the page immediately after writing |
| 2. Special characters and non-ASCII text | Non-ASCII characters (such as Japanese) mutated into similar-looking glyphs | Re-read and inspect proper nouns and numbers |
| 3. Auto-linking | Strings resembling filenames were automatically turned into external links | Re-read to check if text was formatted as a link |
| 4. Overwriting human-set state | Checkbox toggles were altered by the AI | Compare checkbox states before and after writing |
| 5. Reader-side omissions | Page links appeared blank, leading to false reports of broken links | Inspect the same location using a different reading method |
Verification Workflow After Writing
- 1. WriteHave the AI write to the page
- 2. Re-readHave the AI read the same page again
- 3. Cross-checkCompare intended content against newlines, characters, links, and checkboxes
- 4. FixCorrect only the corrupted parts and re-read once more
Pattern 1: Newlines inserted as literal "\n" strings
In my environment, when using a method that appends text to the end of a page, newlines failed to render as actual line breaks and were instead inserted as literal "\n" text (in practice, often leaving just an "n"). The same happened with tabs. Furthermore, when writing a toggle block under a heading, the toggle markup itself was saved as literal characters, resulting in broken text with backslashes.
Depending on the syntax used, it did sometimes insert correctly. The difference was that manually typing "\n" into an argument passed as a string broke it, whereas passing an actual raw newline inserted it properly. The official Notion documentation (Notion-flavored Markdown) states that if you want to break lines within a single paragraph, you should use <br>. Handling newlines is sensitive to how the input is formatted, so verifying by re-reading is the most reliable approach.
Pattern 2: Non-ASCII characters mutating into different glyphs
When I had the AI construct non-ASCII text such as Japanese using escape sequences in the form of "\uXXXX", the characters sometimes mutated into different glyphs. For instance, the Japanese word 様式 would become 样式 (with the simplified Chinese form of the first character): visually similar, but a different character. On some days, this occurred in over 50 places during a single task. When trying to fix them, the re-entered character codes were sometimes wrong again.
There was also a pitfall with combining characters like Japanese voiced sound marks (dakuten). Appending a combining voiced sound mark after ヘ looks identical to ベ, but it is a different sequence from the precomposed single character ベ. As a result, searching for it later to fix it resulted in no matches.
The fix is simple: have the AI write non-ASCII text directly as raw characters rather than escape codes. Even so, errors won't drop to zero, so after writing, I re-read the page and visually inspect proper nouns, numbers, and dates.
Pattern 3: Strings unexpectedly converting into links
In my environment, writing strings that look like filenames or domains directly in the text—such as CLAUDE.md or claude.ai—automatically turned them into links. Because .md is also an actual top-level domain, clicking it could navigate to an unrelated external website.
Another issue occurred when appending full-width parentheses or non-ASCII characters such as Japanese immediately after a URL: the subsequent text was swallowed into a single giant link. Here is how to prevent it:
- Wrap filenames and code in backticks as inline code
- Never place characters immediately after a URL. Refer to Notion pages using mentions (
<mention-page url="…">)
Pattern 4: AI overwriting human-set states
This was an architectural design issue rather than a text encoding problem. In an automated process that recreated a page's list from scratch each time, I instructed the AI to "preserve the checked states." Instead, the AI arbitrarily toggled checkboxes, while still logging "no changes." Even explicitly stating "do not modify checkboxes on your own judgment" failed to prevent this.
It is safest never to let AI regenerate states that humans manage manually (such as checkboxes). Rather than replacing the entire page, make minimal targeted edits specifying only lines to add or remove. Once created, never let the AI touch lines containing checkboxes. In official Notion documentation, checkboxes are represented as - [ ] and - [x]. Counting and comparing these two before and after writing allows you to spot unexpected changes.
Pattern 5: The reader overlooking existing content
The final pitfall involves reading rather than writing. When reading a database using SQL, page links within the body text appeared blank, leading to a false report that "the links are missing." In reality, opening the page showed the links were intact. The official Notion documentation notes that SQL output may omit mention text, link targets, and formatting, and that their absence does not necessarily mean the content is broken.
When something "looks broken," verify the same location using a different reading method (such as reading the page directly) before reporting or attempting to fix it.
How to Prompt for "Re-read and Verify"
Prompting manually every time is tedious, so I use a standard template. I ask as follows:
After writing, re-read the page and report on the following checks:
1. Ensure newlines have not turned into literal text like "\n"
2. Confirm proper nouns, numbers, and dates match the intended content
3. Verify that filenames have not unexpectedly become links
4. Check that checkbox states match what they were before writing
If any corruption is found, fix that section and re-read the page once more.
The key here is not asking "Did you finish writing?", but specifically requesting "Report the results of re-reading item by item." Rather than asking the AI for impressions of its own work, force it to produce factual evidence from re-reading.
Document Rules in CLAUDE.md
Remembering these instructions each time is difficult, so I document the inspection rules in CLAUDE.md, which Claude Code reads on every run.
## Rules for Writing to Notion
- Write non-ASCII characters directly without using character escape codes
- When appending to the end of a page, replace using the existing final sentence as an anchor
- Wrap strings that resemble filenames or domains in backticks
- Do not place non-ASCII characters immediately after a URL
- For checkbox lines, only add or delete; never overwrite existing lines
- After writing, re-read the page and report on the checklist above
I describe how to write these rules in detail in Put Your “House Rules” in CLAUDE.md So You Don't Have to Repeat Them. If you run routine tasks daily, another option is writing via the Notion API (Write a Row to the Notion API with Only Python's Standard Library). Whichever method you choose, the workflow of re-reading after writing remains the same.
Summary
- Never take an AI's "I wrote it" report at face value—always have it re-read the same page to verify.
- The five corruption patterns are literal newlines, mutated non-ASCII characters, unintended auto-links, overwritten human-set states, and reader-side omissions.
- Instruct the AI to "report item by item" during verification, and document these rules in
CLAUDE.md.