Why is that a problem with the Seatable node in n8n? It triggers with Seatable cloud right? We are using the same code for both
I just create a cloud account to test it out. it is not working too. maybe something wrong with my setup?
Same problem here. Using Seatable Cloud. My Trigger node doesn’t fire after adding a row through a form… I deactivated and reactivated my N8N workflow, I deleted and added back the “Row Created” field in Seatable, yet it still doesn’t fire. I’ve only tested with 1 min poll time so far. When I hit “execute workflow” it works fine. Very intriguing
Many thanks for sharing these details @leprodude and @Benjamin123. The trigger node uses different queries for manual and production executions (you can see both here).
My first guess would be that the _ctime
field used to detect when a row is created no longer has the expected format. I’ll throw a few additional console.log
s at the code and see if I can find out more.
Okay, I think I see what’s happening here. n8n queries new SeaTable rows using timestamps in the GMT timezone (which is also the time zone SeaTable returns timestamps in). However, at least on the SeaTable cloud version it seems SeaTable requires a local timestamp in the query (but returns a GMT/UTC timestamp in the result).
I am not sure if it’s the same time zone for all SeaTable instances (if so, a fix would be easy to implement) or if this is a setting somewhere. I’ve posted on their forum to find out more and will keep you updated
So it seems this discrepancy between query (not accepting standardized ISO 8601 values including a time zone indicator) and result (using the aforementioned format) is intentional here (some more information on this has been posted on their forum since I asked about this).
This means for self hosted SeaTable instances you could set your SeaTable server time zone to UTC/GMT as per their docs and the trigger should work as expected (as this is the time zone n8n uses for database queries). That’s, of course, not an option for their cloud version (or when you are not an admin of your SeaTable instance) and so far I am not aware of a method of reliably identifying the time zone there unfortunately.
I hope I am simply overlooking something here and there is a way to programmatically identify the time zone used by SeaTable (or take a given zone into account when querying). If not, we might need to add a time zone setting to the SeaTable credentials in n8n.
Hello,
correct me if i am wrong. Does it mean that if we set both n8n and seatable to the same timezone, seatable trigger should work?
I am using selfhosted n8n and seatable. and below is timezone setting in docker-compose.yml
It does not seems to work. below is seatable trigger setup.
currently i am using cron node to check for newly created ( below is my workflow )
use the record create time +1 min and check if it is greater than “now” using “if node”. it is quite a lot of nodes, but it works.
however, my country has power failure from time to time. and using cron node will trigger a lot of workflow error ( every min ) if i am using above setup.
I am hoping seatable trigger will at least prevent triggering workflow error.
If there is any better way of checking newly created record, please guide me as well.
Hey, you would only need to set the SeaTable time zone to UTC as per their example docker compose file:
TIME_ZONE=Etc/UTC
This is the time zone they use for the created timestamp of a row and also the time zone used by n8n to query these.
The n8n time zone can remain unchanged.
Hello
i have change seatable timezone to following
and run command
docker-compose down
and
dock-compose up -d
delete existing node, recreate a new seatable trigger node. it is still not working.
Hi @Benjamin123, that’s odd because I tried the request out and new rows were returned for me when using the SeaTable timezone for the query executed by the Trigger node.
Is your workflow active and have you checked the executions list? Could you try forcing a re-creation of your SeaTable container using docker-compose up --force-recreate
?
Hello @MutedJam i have attached a screen video converted to gif for your reference
when i execute workflow manually, it append 1st row data.
but when i try out the trigger, it is not creating any new record at table2.
Many thanks @Benjamin123. Could you try force-recreating your Seatable container as described in my last message? I suspect your updated time zone environment variable might not have been taken into account by Seatable for some reason.
If this still fails, would you be able to manually run an SQL query against your Seatable database and check whether you can fetch the newly created row using a query like SELECT * FROM Table1 WHERE _ctime BETWEEN BETWEEN "YYYY-MM-D HH:mm:ss" AND "YYYY-MM-D HH:mm:ss"
?
This is the exact query used by the Seatable Trigger node when your workflow is active (where the first timestamp is the last polling time and the second one is now). Please replace Table1 with your actual table name and the timestamps with a second before and and after your row was created using UTC time.
Edit: On the first run, n8n would use also use “now” as the start time (the first timestamp in the aforementioned query). So you might want to wait a minute after activating your workflow before adding a new row to your Seatable table and then another minute for the next polling interval to occur.
@MutedJam i did force recreate seatable before i took the screen video. and waited for 1 minute plus.
anyway i try to manually query using SQL query to see if i am able to do so.
I guess I’ll either have to self-host Seatable or wait for the timezone setting in the trigger node then!
Woah, that’s weird indeed but could be the reason for the behaviour you were seeing (and would explain why the query was working fine for me). Thanks so much for giving this a go @Benjamin123!
So far I’ve used the cloud version of SeaTable to play around with this (where the column could be queried), but I’ll try to set up SeaTable next week on my laptop (I tried this on my Raspi today, but it seems their docker image doesn’t like ARM CPUs). Can you confirm which version of SeaTable you are hosting?
@leprodude sorry for this As a fellow SeaTable cloud user, are you by any chance based in a time zone other than Europe/Berlin? This seems to be the time zone for my cloud instance, but I’d be curious to know whether that’s always the case or whether other instances might get created with a different time zone depending on the user time zone.
@MutedJam it is strange though, if i use n8n seatable node to get all information , it return _ctime though.
anyway i am using selfhosted seatable 2.6
Hmm, I should definitely be based in that timezone. I get this from a record I’ve added at 7:35pm Berlin time back in _ctime: 2022-01-21T18:35:45.320+00:00
Any place I can / should check the timezone setting explicitly?