Question #1: How do I use the IF node to count the number of items from the Extract from CSV node before it?
Question #2: How do I extract the first 9 items if total number of items is less than or equal to 10.
Here’s the output of Extract from CSV Node:
Note: There are 11 items
[
{
"Brand": "Pet Brand Name",
"Product": "Calming Soft Chews for Dogs"
},
{
"Brand": "Pet Brand Name",
"Product": "Cranberry Urinary & Kidney Chews for Cats"
},
{
"Brand": "Pet Brand Name",
"Product": "Salmon Oil Soft Chews for Dogs"
},
{
"Brand": "Pet Brand Name",
"Product": "Cat Hairball Control Chews for Cats"
},
{
"Brand": "Pet Brand Name",
"Product": "Calming Soft Chews for Cats"
},
{
"Brand": "Pet Brand Name",
"Product": "Cranberry Urinary & Kidney Chews for Dogs"
},
{
"Brand": "Pet Brand Name",
"Product": "Allergy Aid and Antioxidant Chews for Dogs & Cats"
},
{
"Brand": "Pet Brand Name",
"Product": "No Stool Eating Chews for Dogs"
},
{
"Brand": "Pet Brand Name",
"Product": "All-In-One Vitamin Chews for Dogs"
},
{
"Brand": "Pet Brand Name",
"Product": "Joint Health Chews for Dogs"
},
{
"Brand": "Pet Brand Name",
"Product": "Probiotic Chews for Dogs"
}
]
n8n setup
- Running n8n via cloud: