Anytype

Starting with v0.104.0, Trilium is able to import data from Anytype from JSON imports which preserve most of the formatting and the metainformation.

Import process#

The first step is to export the data from Anytype:

  • To export a single page:
    • Select the page to export.
    • Press the […] at the top-right of the window and select Export.
    • Ensure the following options are set:
      • Export format: Any-Block
      • File Format: JSON
      • Zip archive: On
      • Include linked objects: On
      • Include files: On
      • Include archived objects: On
  • To export an entire channel:
    • Select the desired channel from the left bar.
    • Underneath the channel icon in the left sidebar, press the name of the channel with an arrow and select Channel Settings.
    • In the left sidebar, look for the Integrations section and select Export.
    • Press Any-Block.
    • Ensure the following options are set:
      • File Format: JSON
      • Zip archive: On
      • Include files: On
      • Include archived objects: On

In Trilium Notes:

  1. In the Note Tree, right click and select Import into note.
  2. In the Import from section, select Anytype.
  3. Upload the ZIP.

Supported features#

The following features are preserved by Trilium during the import process:

  • Basic formatting (bold, italic, underline, strikethrough, headings, colors, highlights, inline code).
  • Lists (numbered or bullet)
  • Images and files are handled as Attachments.
  • To-do lists
  • Toggle sections
  • Tables
  • Inline Mermaid Diagrams
  • Math Equations
  • Highlight blocks are imported as block quotes.
  • Code blocks, with a best-effort attempt to restore the language.
  • Links between other imported pages are converted to Internal (reference) links if they are part of the same import.
    • Applies to both block links and inline links.
  • Collections are imported as Trilium-native Collections (see below).
    • Files inside collections are imported as File notes.
  • Dividers (line, dots) are imported as horizontal rules.
  • Admonitions are preserved, including its emoji (added as part of the content).
  • Creation and modification date of pages is preserved.

Collections#

Collections created in Anytype are imported on a best-effort basis, preserving both the view mode and the page properties as Promoted Attributes.

The following view modes are supported:

The following types are supported:

Anytype property typeTrilium
Text / SelectSingle-valued text label
NumberSingle-valued number label
Multi-selectOne text label per option (multi)
Date / Date with time
  • datetime if the time is included.
  • date if only dates.
FileThe files are preserved as attachments, and a link to them is prepended to the content of the note for visibility.
Checkboxboolean label (true/false).
URL / Email / Phoneurl label (mailto:, tel: prefix)

Reporting issues#

When importing your Anytype notes, you might find issues in how a note is imported; in that case consider reporting it.

When reporting such an issue make sure to provide the following information:

  • A .zip export of the original note (and children if applicable). This allows us to reproduce the issue.
  • A screenshot with how it originally looked like before the import and how it looks after the import.