How do I connect a self-hosted GRIST to an SQL View also on our servers?

Just need a table, updated let’s say, once every 2 hours, with the info on construction jobs coming from another system.

I suppose best method would be to generate an SQL View and connect Grist to it?

Hello, what did you end up with regarding this topic?

End up with nothing.

BUT I plan to test doing that through n8n (free automation tool). I think n8n can connect to an SQL View, fetch data and send to Grist.

n8n works well, but due to the fact that there is no function to update data like Zapier, you have to create complex structures.

My request for this is here:

1 Like

Yeah I tried n8n and was glad to see it working to insert data inside Grist.
Didn’t realize though that it had no support for update… :expressionless:

@BiBo hope to see your request being fulfilled

I haven´t played much with n8n, but would those complex structures be created once and be saved as a trigger or something, to be reused?

  • Sub-Workflows: You can create a workflow specifically designed to handle a task (e.g., “Create or Update Record in Grist”).
  • Reusable Workflows: Save this workflow and call it inside other workflows using the Execute Workflow node.
  • Input/Output Management: Pass necessary data into the sub-workflow and return outputs to the parent workflow.

Input:

  • Record ID
  • New Data
    Steps:
  1. Check if Record Exists (HTTP Request to Grist API GET /records)
  2. If Exists:
    Update Record (HTTP Request to Grist API PATCH /records)
  3. If Not Exists:
    Create Record (HTTP Request to Grist API POST /records)
    Output:
  • Updated or Created Record Details