# From AFFiNE

Documents, databases and whiteboards come over from AFFiNE with their images and attachments – through the workspace export.

::: steps

1. In the AFFiNE desktop app, choose the export **Full Backup** (“Export a complete workspace backup”) in the **workspace settings**. This gives a file `Name_….affine` – the whole workspace database with documents, folders, collections, journal and files.
   The web app has no such file; there you export documents as a **Snapshot** (ZIP) – this needs **Enable Snapshot Import Export** switched on under the experimental features of the workspace settings. A snapshot contains documents, databases, whiteboards and files, but no folders, collections, journal dates, properties or icons. Only snapshots from AFFiNE versions up to the end of 2024 (with an `info.json` file) contain tags; newer versions no longer write tags into snapshots. To bring tags, properties and icons along, use the workspace file (`.affine`) – the preview points this out.
2. In Flowplan: **Settings → Import & Export → Import**, choose the target space and pick the `.affine` file or the snapshot ZIP under **AFFiNE, Confluence, Evernote, Google Docs or Obsidian** (source **AFFiNE** or automatic).
3. The preview shows what comes along: pages, folders, files, tags, properties, page icons, whiteboards, databases, collections, days for the journal and how many documents become the content of database records – and what cannot be imported. **Import** creates everything in one step.

:::

What it becomes:

- **Where it goes:** a workspace file (`.affine`) with several items at the top – folders, documents outside folders, collections – arrives below **one page named after the AFFiNE workspace**; the preview names it (“Everything below a page …”). A **snapshot** and a workspace with a single item at the top go **straight into the target space** – no empty page above them. A whiteboard counts with its document; journal documents go into the journal.
- **Folders** become pages with their documents below them. A document in several folders lives in the first one; the others link to it. Documents outside folders sit at the top level – below the workspace page, if there is one.
- **Place documents with exactly one link below it** (a switch in the preview, on by default; the preview shows how many): a document outside folders that exactly one other document links to in its text goes below that document instead of the top level. Chains nest (C below B below A). Documents in folders, journal days, the content of database records and documents linked only from a database, whiteboard or journal day stay where they are. When two documents link to each other, the first goes below the other. Links are unchanged; the switch doesn't apply when importing as a database.
- **Text:** headings, paragraphs, bulleted and numbered lists, **to-dos** with their check mark, toggle lists, quotes, code blocks with their language, callouts (kind by colour: red → caution, orange/yellow → warning, green → tip, purple → important, otherwise note; their emoji becomes the [callout's symbol](/formatting#your-own-symbol-and-colour)), dividers, tables, LaTeX (block and inline), bold, italic, underline, strike-through, code, links, text and highlight colours.
- **Links between documents** – in the text (@ references), as linked-doc or synced-doc cards and as AFFiNE app links – point to the imported pages. Synced documents become links. References to a block (references and doc cards with a block, app links with `?blockIds=`) lead to that block; references to shapes on the canvas (`elementIds`) lead to the page.
- **Tags** become the page's tags, with their colours from AFFiNE (as a new database: the *Tags* property).
- **Properties** of a document (text, number, checkbox, date) become [page properties](/page-tags#tags-and-properties) of the same name; missing ones are created by the import if you may manage the workspace. Deleted properties and AFFiNE's own fields (created by, mode, template …) are left out.
- **Icons:** an emoji as the icon of a document, folder or collection becomes the page's icon. Icons from AFFiNE's own icon library have no counterpart; the preview gives their number.
- **Images and attachments** are uploaded and shown in their place – as when uploading in the editor: images as images, **PDFs with a preview** (they open in the viewer), **audio and video with a player**, other files as links. Bookmarks and embeds (YouTube, Figma, GitHub …) become links.
- **Databases** become a database page below their document and appear in the document at the same place as an embedded database. Columns: title, text, number, select, multi-select, date, checkbox, link (URL), progress (number in percent) and created. Rows keep their content as the record's document. Table views stay tables, kanban views become boards by the same column. Columns keep the order of the AFFiNE view (not the order they were created in); hidden columns stay hidden and column widths are kept (80 to 800 pixels). Image columns are not imported.
- **Documents made from database rows:** if you turned a row of a database into a document of its own in AFFiNE (the row's title is then a reference to the document), that document becomes the **record's content** – text, images, attachments, embedded databases and links, as for any page. It gets **no page of its own**; links to the document (in text, as cards, from collections and on whiteboards) lead to the record, and a folder that held the document lists a link to it. The record keeps the row's title and columns; if the title is nothing but the reference, it takes the document's title. This also applies when the row's only content is the card of a linked or synced document, and to snapshots that contain the document.
  - If such a document consists of nothing but a database (in AFFiNE a database always lives in a document), the record shows that database as an embedded view, and the database itself sits **below the record's database page** – records have no subpages. Documents linked only from such records also go below the database instead of the top of the space, and databases that sit only on a document's whiteboard in AFFiNE become database pages below their document.
- **Templates:** documents marked as templates in AFFiNE become [workspace templates](/templates#your-own-templates) (category *Other*, with emoji and tags) instead of pages; a document that is only a database becomes a database template. Links to a template become text. Only the workspace file (`.affine`) says whether a document is a template – from a snapshot, templates become ordinary pages. If you may not edit the workspace, the templates are saved as "Only me". The import preview shows how many there are.
  - From the workspace file (`.affine`) the document's **emoji icon** (as the record's icon) comes along, its **tags** go into a multi-select column **“Tags”** (or “Schlagwörter”) of the database, and its **properties** into columns of the same name and a matching type where the row has no value – values in the row's own columns always stay as they are. If the database has no such column, the tags or properties are left out; the preview gives their number.
  - If **several rows** refer to the same document, the first one (in the order of the import) gets the content; the others keep their own content and start with a link to that record. A **journal document** stays a day in the journal, and a row that refers to the document holding its own database only gets a link.
  - The document's own databases are created where the document was (in its folder or at the top) and stay embedded in the record; a whiteboard of the document is placed there too, and its card points to the record.
  - When importing **as a new database**, databases are left out; such documents then become records of the new database like all others.
- **Whiteboards (edgeless):** a document's text always becomes a document. If its edgeless canvas holds more than the note with the text – shapes, connectors, texts, images, frames, further notes, drawings, mind maps – or AFFiNE opens the document in edgeless mode, a whiteboard **“Name – Whiteboard”** is created next to it. Document and whiteboard are linked: the document starts with a link to the whiteboard, and a card on the whiteboard points to the document (where the note was). Shapes (rectangle, rounded, ellipse, diamond, triangle) with text and colours, connectors (straight, elbow, curved, with arrows and labels, attached to their shapes), texts, brush strokes, images, frames, further notes (as sticky notes), groups and mind maps (nodes as shapes, branches as connectors) come along. Whatever has no counterpart is left out; the preview gives the number.
- **Collections** each become a page **“Collection: Name”** with links to their documents as of the import: those added by hand and those the rules match (tags, created/updated, title, favourites, journal). The rules are written on the page as text. If not every rule can be evaluated (rules on custom properties, for example), only the documents added by hand are listed, with a note. A collection in a folder lives in that folder.
- **Journal:** AFFiNE's journal documents go into the workspace's [journal](/journal), each into the matching day – the journal in the target space, else one in the workspace you may write in; if there is none, the import creates one. A missing day is created; an existing day gets the text appended at the end (under the AFFiNE document's title).
- Documents in AFFiNE's **trash** are not imported. HTML embeds and data views are left out; the preview names them.
- Whiteboards, databases and journal days only come along when importing **as pages**; as a new database every document becomes a record.
- **Large workspaces:** the `.affine` file may be larger than 100 MB (see the [limits above](/migrate#confluence-evernote-google-docs-and-obsidian)). The server writes it straight to disk while it is uploaded, reads the documents one at a time while converting them, and images and attachments one at a time while writing them – memory only ever holds one document and one file. Workspaces with thousands of documents go in one import (up to `FLOWPLAN_IMPORT_MAX_DOCS`, 10,000 pages by default); folders nested deeper than 50 levels are merged into the level above. A reverse proxy in front must let such large requests through (see [Coolify and reverse proxies](/coolify-and-proxy#pangolin-traefik-and-other-proxies)).
- Safety: the file is only read; the size, number and nesting of documents are limited, text never comes in as HTML, and links keep only `http`, `https` and `mailto`.
