Hello,
I’m new to n8n and I’m having hard time making a workflow for this use case.
- Http request to retrieve a list of invoices
- Split Out the list of invoices
- For each invoices, make a SQL query to retrieve if this invoice was already sent.
- Filters out invoices that are already sent
- Http request to send the list of invoices not already sent
The issue I am having is between steps 4 and 5, I need to aggregate the list of invoices. However, step 3 (SQL) has transformed the output into a simple list with only 2 columns: InvoiceNumber and Sent. In step 5, I need to send the filtered list of original json objects retreived in step 1.
So basically if I try to generalise my question, I would ask: how to filter a list based on a condition result retrieved using an external call on each items(sql, http,…), and output the original objects from the list ?