Skip to navigation

Files and documents

Import folders of Markdown, and send PDF, Word, PowerPoint and other files by link.

Two routes cover most documents. Text you can save as Markdown goes through the import script. Other files go in by link: you give the brain a URL and it downloads the file and extracts the text itself.

You haveRoute
A folder of Markdown filesThe import script
PDF, Word (.docx), PowerPoint (.pptx), HTML or plain text filesA file link
A web pageA file link with kind: "url"
An audio recordingA file link with kind: "transcript"

Folders of Markdown

The Obsidian import script works on any folder of .md files. Use it for a Notion export saved as Markdown, or notes you keep in a plain folder.

The script reads only files ending in .md. Rename .txt notes to .md first, or send them by link.

Put the file somewhere the brain can download it, such as a temporary signed link from your file storage. Then capture it with a kind and a fetchUrl:

kindWhat the brain does with the link
fileExtracts the text from a PDF, Word, PowerPoint, HTML or UTF-8 text file
urlReads the web page
transcriptTranscribes the audio

Older PowerPoint files (.ppt) and other binary formats aren’t supported. Save them as .pptx or PDF first.

This request sends two files in one batch:

curl https://api.livingbrain.com/v1/brains/YOUR_BRAIN_ID/captures/batch \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"items": [
{
"kind": "file",
"fetchUrl": "https://files.example.com/signed/q3-roadmap.pdf",
"label": "Roadmap/Q3 roadmap.pdf",
"originRef": "drive:q3-roadmap.pdf:v4"
},
{
"kind": "file",
"fetchUrl": "https://files.example.com/signed/pricing-review.pptx",
"label": "Sales/Pricing review.pptx",
"originRef": "drive:pricing-review.pptx:v2"
}
]
}'
  • label shows on each page’s list of sources. A file’s path or title works well.
  • originRef stops the brain from compiling the same file twice. Include a version or modified date in it, so a new version of the file is captured again.
  • The link must still work when the brain gets to it. Captures compile in the background, so give a signed link enough time, and check the sources for any that failed.

The same request works from the SDKs. See Capturing knowledge.