If test with data table

Question

How to run a test (IF node) using content of a data table?
I’m storing data to my data table “chunk_data” with some columns (file_id and chunk_id).

I’d like to run a if test that does:

if current item file_id and chunk_id exist in **chunk_data** table then true, else false

I’d like suggestion on how to access my data table using n8n structure.
Thanks for your assistance all!

Information on your n8n setup

  • n8n version: 2.0.3
  • Database (default: SQLite): talking about data table in n8n.
  • Running n8n: docker self-hosted

If node directly cannot read or execute sql queries.Try to use Read from the chunk-datadata using data table node and then configure if node using length of item data table retrives.

hope this helps.

I ended up using 2 nodes to test if the row exist/do not exist:

Worth an enhancement request to the team to build the if node compatible with the data tables from n8n natively.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.