You receive several contacts and want to prepare a message for active contacts only. This walkthrough starts with a list, removes one contact, then builds one result per remaining contact. No email is sent and no external credential is needed.
Choose between IF, Filter and Loop
IF chooses an execution path. Use it for a decision such as “is this request complete?”.
Filter keeps selected items in a list. It returns a shorter list without running an action for each item itself.
Loop over items runs processing for each item or batch. Its Done output continues the workflow after iteration.
Later steps should read the items property for the filtered list. Names filter1, loop1 and set1 below are examples: use the technical names shown in your mapping.
Prepare one message per contact
Add Loop over items after Filter. Set its source to nodes.filter1.items and keep batchSize at 1.
From Loop, connect Edit fields. Enable Mapped fields only.
Create email with {{ nodes.loop1.item.email }} and message with Hello {{ nodes.loop1.item.name }}.
One message per contact, then Done
Loop over items
Is there another contact to process?
Loop
Prepares a message and repeats.
Done
Results in items.
Run the complete workflow again. Final loop output should be:
Connect another Edit fields node to the loop’s Done output. Enable Mapped fields only and create processed with {{ nodes.loop1.count }}.
This node should run after both contacts are processed and produce { "processed": 2 }. Do not connect it to Loop: it would count turns during processing instead of reading the final result.
Check cases that lose data
All contacts are inactive: Filter returns count: 0. The loop body should not run; Done should produce a total of zero.
The same contact appears twice: this chain does not deduplicate data. Add Remove duplicates before the loop if your business rule requires it.
Every message uses Ada: you probably read input.contacts[0] again. Use nodes.loop1.item for the current item.
Fields disappear after an IF: its output describes the comparison. Explicitly read the output of the node holding the list instead of relying on implicit forwarding.
To actually send these messages, replace preparation with the appropriate sending node or add it inside the body. Check its access and a test destination before using the real list.
You receive several contacts and want to prepare a message for active contacts only. This walkthrough starts with a list, removes one contact, then builds one result per remaining contact. No email is sent and no external credential is needed.
Choose between IF, Filter and Loop
Supply the starting data
Paste this into the Test payload of a Manual trigger:
{ "contacts": [ { "name": "Ada", "email": "[email protected]", "active": true }, { "name": "Lin", "email": "[email protected]", "active": false }, { "name": "Sam", "email": "[email protected]", "active": true } ] }input.contactsis the complete list;input.contacts[0]is its first contact. Keep boolean valuestrueandfalseunquoted in this JSON.Keep active contacts
Add Filter after the trigger and configure:
input.contacts.active.equals).true.The source identifies the list within the workflow. The condition field is read inside each contact: enter
active, rather thaninput.contacts.active.Run and check this output:
{ "items": [ { "name": "Ada", "email": "[email protected]", "active": true }, { "name": "Sam", "email": "[email protected]", "active": true } ], "count": 2, "removed": 1, "combinator": "and" }Later steps should read the
itemsproperty for the filtered list. Namesfilter1,loop1andset1below are examples: use the technical names shown in your mapping.Prepare one message per contact
nodes.filter1.itemsand keepbatchSizeat1.emailwith{{ nodes.loop1.item.email }}andmessagewithHello {{ nodes.loop1.item.name }}.items.Run the complete workflow again. Final loop output should be:
{ "items": [ { "email": "[email protected]", "message": "Hello Ada" }, { "email": "[email protected]", "message": "Hello Sam" } ], "count": 2 }Continue once the list is complete
Connect another Edit fields node to the loop’s Done output. Enable Mapped fields only and create
processedwith{{ nodes.loop1.count }}.This node should run after both contacts are processed and produce
{ "processed": 2 }. Do not connect it to Loop: it would count turns during processing instead of reading the final result.Check cases that lose data
count: 0. The loop body should not run; Done should produce a total of zero.input.contacts[0]again. Usenodes.loop1.itemfor the current item.To actually send these messages, replace preparation with the appropriate sending node or add it inside the body. Check its access and a test destination before using the real list.