How to import a .grist file into an existing document without losing formulas?

Hello everyone,

I’m reaching out with a question regarding importing .grist documents.

I have a .grist file that includes formulas, and I would like to **integrate it into an existing Grist document, without losing those formulas.

I chatted with Grist’s AI assistant, who explained that there’s no direct method to import a .grist file into an existing table. The suggested workaround involves:

  1. Creating a temporary document and importing the .grist file into it.
  2. Manually copying the formulas and data.
  3. Pasting everything into the relevant table of the existing document.
  4. Deleting the temporary document.

:point_right: This process involves a lot of manual copy-paste, which becomes tedious when dealing with a large number of formulas or complex structures.

My question:

Is there a more direct solution or built-in feature that would allow importing a .grist file into an existing document while keeping the formulas?
Or, do you have any tips to simplify the transfer of formulas, structure, and data?

Here’s a screenshot of the response from the Grist AI assistant for reference :

Thanks in advance for your help! :pray:

I answered this at Discord

using the plugin API, we can see every formula and every data in Grist, even the types of columns.

in THEORY we can create a Widget that maps the entire document and creates a JSON and then use n8n with the Grist main API to rebuild the table, using grist.docApi.updateRecords(‘_grist_Tables_column’, …)

1 Like

not simple, but feasible. And once you have a widget mapping everything and exporting the json, and some app (or n8n) using Grist Rest API to write it as new tables/columns, I guess you can reuse.