ResearchOS/Wiki

LabArchives

Bring notebooks out of LabArchives and into ResearchOS as native, file-on-disk tasks, and recover the inline images that LabArchives keeps in the cloud, all without any API credentials.

The shape of the integration

LabArchives and ResearchOS sit at opposite ends of a hand-off, not in a live sync. LabArchives is your ELN of record while you're running experiments, and ResearchOS is where you bring those notebooks once you want them on disk in a structured form. There's no two-way connection, and ResearchOS never writes back to LabArchives.

Everything runs through one entry point under Settings → LabArchives.

  • Import from LabArchives is the import wizard. You download an Offline Notebook ZIP from LabArchives and feed it to the wizard. Every notebook page becomes a ResearchOS task, and every folder becomes a project you can map to your existing project list. No credentials, works offline.

Form-A vs Form-B inline images

LabArchives stores inline images in two ways internally. The legacy path, called Form-A, embeds the image as a binary file inside the notebook page entry itself. The newer path, Form-B, uploads the image to LabArchives' cloud and leaves only a URL behind in the entry body.

When you generate an Offline Notebook export ZIP, only the Form-A images come along. The Form-B URLs are still in the entry text, but the image bytes were never bundled. In a typical recent notebook that's roughly half the inline images.

If you import the ZIP without fetching Form-B images, the wizard writes a missing-… placeholder for each one. Your notes still come across, and the images at those URLs aren't there yet. You can recover them at any time using one of the three paths described below, or remove individual placeholders using the broken-image popup.

When images are recovered, inline images land in the task's notes/Images/ folder and the markdown is rewritten to point at the local copy. File attachments (non-image uploads) land in notes/Files/.

Exporting an Offline Notebook ZIP from LabArchives

The ZIP that ResearchOS imports is LabArchives' built-in Offline Notebook export. Both the import and any image-recovery run depend on having this file first.

  1. Open the notebook you want to export in LabArchives on the web.
  2. Open the ≡ menu → Utilities → Create Offline Notebook. (The exact wording varies a little by institution build.)
  3. Wait. Large notebooks take minutes to assemble, and LabArchives emails you when the ZIP is ready.
  4. Download the ZIP from the email link. Don't unzip it, since ResearchOS reads the raw archive.

Running the import

  1. Go to Settings → LabArchives and click Open import… on the Import from LabArchives card.
  2. On the Choose format step, leave the default (Offline Notebook ZIP). The PDF and Chrome-print formats are sketched in as coming-soon and stay disabled.
  3. Drag the Offline Notebook ZIP into the Upload ZIP step. The wizard parses the bundle and surfaces a preview of pages, folders, and inline images.
  4. On the Preview notebook step, glance through the page list and confirm the entry counts look right.
  5. On the Map projects step, point each LabArchives folder at one of your existing ResearchOS projects, or let the wizard create a new project named <folder> (imported). If that name is already taken, the wizard appends a number ((imported 2), (imported 3)) so you never end up with two projects sharing a name.
  6. If the wizard detected Form-B images (and you're not in demo mode), a Fetch images step appears with two tabs.
    • Generate browser script is the DevTools-script path (see below).
    • Drop your own images is the manual folder/ZIP drop path (see below).
    Either fetch images now or click Skip, leave as placeholders to continue without them.
  7. The Apply step writes everything to disk. When it's finished, the Done step lists what landed where.

Recovering Form-B images

Three paths exist to pull Form-B images into your notes. All three are credential-free, so ResearchOS never asks for your LabArchives password. The wizard hides its Fetch images step in demo mode, but the per-task Rehydrate panel and these recovery paths still work there, since they all run client-side against files you bring in.

Path 1, the DevTools browser script

The Generate browser script tab (in the wizard's Fetch images step, or in the per-task Rehydrate panel) shows a self-contained JavaScript snippet you paste into the browser console while you're logged into LabArchives. Here's what the script does.

  1. Checks that it's running on labarchives.com. It refuses to do anything on other origins.
  2. Fetches each missing image URL using your existing session cookies (no password, no API key, only the session the browser already has from your login).
  3. Packages all successful fetches into a single ZIP and triggers one browser download.

Drop the downloaded ZIP into the Drop your own images tab (or drag it straight into the panel) and ResearchOS matches filenames automatically.

  1. In the Fetch images wizard step (or per-task Rehydrate panel), click the Generate browser script tab and copy the script.
  2. Open LabArchives in your browser and navigate to any page of the notebook you imported. You just need to be logged in.
  3. Open DevTools (F12 or right-click and Inspect), switch to the Console tab, paste the script, and press Enter.
  4. The script logs progress in the console and triggers a single ZIP download when done. Save the ZIP somewhere easy to find.
  5. Switch back to ResearchOS and drop the ZIP into the Drop your own images tab. The panel shows how many filenames matched and stages them for import.
  6. Click Continue with N images. The Apply step writes them to notes/Images/ and rewrites the markdown references.

Path 2, a manual folder or ZIP drop

If you already have the Form-B image files on disk (from a previous download, a screenshot batch, or an export from another tool), use the Drop your own images tab. Drop a folder or a .zip containing the image files and ResearchOS matches them to the expected filenames automatically. No script needed.

This path also accepts the ZIP produced by the DevTools script above, which is why the two-tab flow is designed the way it is. Generate and download in the DevTools tab, then drop the result in the manual tab.

Path 3, the per-image broken-placeholder popup

After import, any task that still has unresolved Form-B images shows broken image placeholders in the Lab Notes editor. Clicking a broken placeholder opens a small popup with three options.

  • Find on LabArchives opens the original image URL in a new tab pointed at mynotebook.labarchives.com. If you're logged in, the image loads and you can right-click and Save. Then use Replace from disk below, or drag the saved file onto the note.
  • Replace from disk opens a file picker. Pick a local image file, and ResearchOS writes it to notes/Images/, rewrites the markdown reference, and removes the entry from the task's _import_source.json sidecar so the popup doesn't re-appear on the next open.
  • Remove reference deletes the broken placeholder from the markdown entirely. Use this when you don't have the image and don't need it.