Automation and Gramps Web API

I’ve not tried to install Gramps Web API yet.

I’m looking at n8n, an automation no/low code tool, some kind of open source version of Zappier or Automate.io, to build worflows and automate data transformation and move it from one tool to another.

I’ve read the Gramps Web API documentation but still wondering if I could interconnect these tools. Query it from an http call from n8n, or even better set up a webhook in n8n that would be called automatically when an update in Gramps is detected by the API to do something with the information.

For example, a change or creation of a to-do note in Gramps could be detected by the API, sent via webhook to n8n as json data, reworked, and then sent to Notion, another kind of no code database which can be addressed thru its API by n8n, where I manage my projects and actions.

Another example could be the reverse: when I change the status of that action in Notion, n8n will detect it with a Notion trigger and send to the Gramps API information notes I’ve added to that action in Notion to add them to the original Gramps to-do note.

Any Gramps Web API expert to tell me if it’s possible?
If it is possible I think I’ll have a lot of ideas to move data from and to Gramps to and from other tools

Hi,

I think it’s possible in principle, I’ll be happy to point you to the right endpoints etc. when you have a specific use case.

One thing to keep in mind though is that the Web API is not designed to be running on the same machine and with the same Gramps database as used by your Gramps desktop while you are using it (you can still run it locally when Gramps is closed).

So for this application it would make sense to deploy the API (or the full Gramps Web app) somewhere on the network (or web) and keep it in sync with your Gramps desktop via the sync addon (athough this is still experimental, see here).

1 Like

I can run it in a Docker container and give it a specific directory shared with my computer for its files.

In parallel I’m doing a workflow that detects when the Gramps automatic backup has just created a new file in order to unzip it in a temporary directory and send the XML file to github which will allow me to see the change history over time.

I could also copy the file to the WebApi container directory and restart the container to pick it up

I’ll let you know when I’ve got it all set up and done some testing. In any case, it is encouraging that this can be possible. Thanks.