My workflow.
I have no idea how to work it out to make 2-way sync using DB
constant duplicates
- n8n version: 1.18.0
- Database : Postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker):
- Operating system: Proxmox LXC
My workflow.
I have no idea how to work it out to make 2-way sync using DB
constant duplicates
It looks like your topic is missing some important information. Could you provide the following if applicable.
Hey @Jakub_Pisula,
We have a blog post that I have linked below which goes over the theory and an example of building a 2 way sync although it was created with an old version of n8n the same steps should get you up and running. We also have some examples in our workflow library that may help like this one: Two way sync Pipedrive and MySQL | n8n workflow template
things I would change:
and now how to update tasks?
Something like this? There might be issues, if changes happen too frequently and simultaneously.
How often are tasks updated, and do you really need to check every 30 seconds?
Is one App the “master task list”?
You’d probably need a way to prevent todoist from undoing changes in notion. Something that checks which version is current after the merge node.
Do you have a way to check when todoist tasks where last updated?
Then you can cross reference it with the last edit datetime from notion (which you also write to a separate field in postgres) and only update entries when they are newer.
Now it should keep only the current version.
you have to add all the necessary fields and expressions to the nodes! they have no functionality in my workflow .
If it works, I can make a tutorial in Polish, but I’ll be happy to tag you
no need
actually, I was thinking about rewriting it
Can you share your sql table query to create all the necessary columns and types?
Proszę o to moja baza.
– Table: public.tasks
– DROP TABLE IF EXISTS public.tasks;
CREATE TABLE IF NOT EXISTS public.tasks
(
id uuid NOT NULL,
name text COLLATE pg_catalog.“default”,
url text COLLATE pg_catalog.“default”,
property_task_name text COLLATE pg_catalog.“default”,
property_tags text COLLATE pg_catalog.“default”,
property_assignees text COLLATE pg_catalog.“default”,
property_status text COLLATE pg_catalog.“default”,
property_priority text COLLATE pg_catalog.“default”,
property_summary text COLLATE pg_catalog.“default”,
property_due_start timestamp with time zone,
property_due_end timestamp with time zone,
property_sub_tasks text COLLATE pg_catalog.“default”,
property_is_blocking text COLLATE pg_catalog.“default”,
property_blocked_by text COLLATE pg_catalog.“default”,
property_project text COLLATE pg_catalog.“default”,
id_todoist text COLLATE pg_catalog.“default”,
todoistno boolean,
CONSTRAINT tasks_pkey PRIMARY KEY (id)
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.tasks
OWNER to postgres;
I can’t program and I don’t know Java or Python, so GPT chat will help a lot
But n8n is still hosted in Docker on Proxmox, so it’s also easy to install Postgres and pgadmin.
Working with n8n where we store data in Postgres may be easier and later such a database can be used further, e.g. Gogle calendar, we get a Google ID and we can work
You’re describing me there
In Todoist it’s hard to keep the ID from the notion and this automation is built on the basis of this, am I understanding something wrong?
Yes, the alternative is probably to mirror todoist to Postgres and save the notion id to the postgres entry.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.