Introduction
Sanity uses a proprietary JSON format called Portable Text. When you export content to Sanity, Cloudpress will automatically convert the content to the correct Portable Text format. It will convert your text with the formatting, headings, tables, code blocks, etc. However, you may want to export custom content not supported by Cloudpress. For example, Sanity has Portable Text blocks such as the geopoint and file blocks, for which there is no corresponding representation in Google Docs and Notion.
You can edit the content in Sanity after you export it with Cloudpress to add these blocks, but that requires an extra step. Also, if you re-export the source content with Cloudpress, all your changes will be lost.
To work around this problem, Cloudpress introduced a feature called Raw Content Blocks that allows you to add the source code for Portable Text blocks like these to your source document. When Cloudpress exports your content and encounters a Raw Content Block, it will send the content of that block to Sanity as-is.
The rest of this document will walk you through this feature by demonstrating how to add a geopoint and file block your content and have Cloudpress export it correctly to Sanity.
Get the JSON representation of your Portable Text blocks
First, you must get the JSON representation of the Portable Text block(s) you want to export. Create an empty item in Sanity containing the Portable Text elements to export - in this example, ageopoint and file block.
Next, we need to get the underlying JSON code for these blocks. To do that, open the overflow menu and select the Inspect menu item.
Switch to the Raw JSON tab to see a text outline of the JSON for this document.
You can see the body property is an array that contains two objects that represent the geopoint and file blocks. To copy the JSON for a block, highlight the JSON code for the block you want to include in your Raw Content Block and copy it to the clipboard.
For example, here is the JSON of the geopoint:
geopoint and the file.
Export your custom Portable Text
To export the Portable Text elements, you must define a raw content block using the@@begin_raw_content and @@end_raw_content processing directives.
- Denote the start of a raw content block by by adding the
@@begin_raw_contentdirective to your document. - After that, add the JSON for the Portable Text element(s)
- Finally, close off a raw content block, use the
@@end_raw_contentdirective.
- Using Google Docs
- Using Notion

@@begin_raw_content and @@end_raw_content directives as raw content and will export it to Sanity as-is. It is therefore important that the content you specify is valid JSON. If not, Sanity will prevent Cloudpress from exporting the content.
When the document in the screenshots above is exported to Sanity, it will result in the correct Portable Text content being created.