Need help debugging

Hey, I am building this workflow, and so far there’s no error as such but the way I’ve constructed this, it got me thinking if this is actually a solid, error-free way.

So there are 100 items in the “Mock data from Apify” node, each of them an object with information about businesspeople. Out of these 100, 77 gets past the filter node, and further 3 go down the error path. So 74 items gets to the “Edit Fields” node

In the Edit Fields node (above screenshot), I have some fields for which I am selecting values from the “Filter” node except for the links field, which gets its values from the previous “HTML” node.My question is whether this will cause inconsistency in the final output as the 3 items got lost to error, I am guessing that it will mess up the order and indexes of the items?

Any help appreciated!

Thanks

PS: unable to paste the workflow as it’s showing error : Token type html_raw not supported by Markdown parser
So I have attached the screenshots

Hey!

I tested a flow designed to behave like yours and it works as expected. I also merge data from the past node with data hasn’t yet been filtered by the HTTP request and I don’t see any issues:

2 Likes

Hey @krisn0x thanks for the reply.
My question is a general one. I have got 3 error items, you probably have none. I am thinking what if say I have 1000 items and 200 in the error. Does this mess up the order or index of items in the following nodes? I am thinking it would, then how would the links be mapped to correct items

Yes, I think I got your idea there, I included non-existing domains that return an error when fetching them via GET request. Those never reach the merging of data towards the end, so no issues happen. If you launch my flow, you will see some go to the error path and only the OK ones reach the end.

EDIT: for some clarity on my flow:

  • Includes domains that will return ERROR in the HTTP node
  • Last node merges data from Node 2 (pre-HTTPrequest) and Node 5 (html) (post HTTP request, a.k.a filtered) similar to yours
  • Result: last node never works with data from the failed domains, even though it reaches all the way back to Node 2, where they are not excluded yet, which I define as “no issues”.
    *Not 100% sure why that happens, but clearly it avoids using data from 2 nodes, if it’s not defined in both places.

Also, at the last node output, you will notice the links match up, meaning there was no shifting or offsetting of the indexing because of the errored out domains. For example, if we saw …

data: yahoo.com
links: wikipedia.org

… it would mean that the indexing was messed up due to us fetching pre-filtered data and mixing it with post-filtered data. But thankfully that works out OK.

Yeah my concern is that I am selecting values from pre-http request (77 items), but the links is generated from 74 items, as 3 go to error. Lets say in the Edit field, as it processes each link items one by one, it fills the other fields with values from one of those error items. Is it possible or n8n takes care of that, is my question

Yes, I aimed at testing the exact same thing, according to my test it handles everything very well. Btw, I updated my previous response, hit a quick refresh if it hasn’t updated for you and mark it as solved if it answers your worries.

Also of course, let me know if you have follow up questions!

1 Like

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