Workflow execution finished with an error propertyValues[itemName] is not iterable

Describe the problem/error/question -

I have a large workflow that errors out sometimes. The error the executions history gives me is Workflow execution finished with an error - propertyValues[itemName] is not iterable. The history of the nodes is not there though so I can’t track down where the problem is., it just looks like the screenshot below:

Information on your n8n setup

  • n8n version: - 1.21
  • Database (default: SQLite): postgresql
  • n8n EXECUTIONS_PROCESS setting (default: own, main): queue
  • Running n8n via (Docker, npm, n8n cloud, desktop app): EKS
  • Operating system: Alpine linux

@Hidden_Squid , just a screenshot is not sufficient to give you a definite solution. However, the error message indicate that the data you try to iterate over is not iterable. Simply put, the value is probably empty (null) or non-existent.

You really need to trace down the actual value of propertyValues[itemName] and figure out if that is legitimate and expected value under certain circumstances. If it is, then you might want to take such outcome into account. That is, check if the value iterable first before trying to iterate over it.

Here’s a quick example for better clarity. An array is iterable.

const arr = [1,2,3];
if (arr != null) {  // check if iterable
  for (i of arr) {
    // iterate here
else {
  return [];  // stop workflow

return something_else;

If it turns out the variable arr has no value then the iteration (here for (i of arr)) will not execute and the workflow will stop (return []) without triggering the error.

This check could be different depending on what you are iterating over in your workflow - is it an array, an object, a string? Read more about Iterables.


Thanks so much for the info here! It’s very helpful. I guess where I’m stuck is since there’s no data on what executed in the workflow - I’m not sure where to even start. The failures occur within .002 second of the flow starting so I’m guessing it’s earlier on. The funny thing is - the workflow still functions correctly even when it’s erroring. really appreciate the info though

Okay - I think I’ve tracked down the problematic node - I essentially removed portions of the workflow until the error stopped and it’s the code node in the snippet below. What’s weird is I’ve never had an issue here until recently. Not sure if it’s related to a new version of n8n or not:

and somehow upgrading from 1.21 to 1.24 fixed everything lol - I’m not sure what the issue was but now it’s back to working as expected with no failures. Guess I needed to go back to basics with making sure everything is up to day (face palm) - appreciate the time you took here, thanks


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