IF node not working: find string in array

Describe the problem/error/question

Hi, I want to have an IF node that checks whether a filename from the node “Search PDFs” does already exist in the array of filenames based on the column “Dateiname” of the node “Write Google Sheets”.

I cannot get the IF node to work properly.

What is the error message (if any)?

No data found for item-index: “1” [item 1]

Try changing the type of comparison. Alternatively you can enable ‘Less Strict Type Validation’ in the options.

Please share your workflow

Share the output returned by the last node

No data found for item-index: “1” [item 1]

Try changing the type of comparison. Alternatively you can enable ‘Less Strict Type Validation’ in the options.

Information on your n8n setup

  • n8n version: 1.52.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: DietPi v9.5.1

hello @carlo

Why are you not using the filter in the Sheet node to filter out the matching names?

According to your question, you’ll need a different workflow:
a gDrive node with a list of PDF files
a gSheet node with a list of filenames
a Merge node linking both with outer-join matching style

1 Like

Thanks alot @barn4k, that works fine! :slight_smile:

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