Iterator receives "Array: empty" although the source module outputs a valid array of 4 items

:bullseye: What is your goal?

split the items array returned by a Pennylane V2 → List all Customer Invoice module so that each invoice is processed as its own bundle.

:thinking: What is the problem & what have you tried?

the Iterator’s input is always Array: empty at runtime, and it outputs Total number of bundles: 1, even though the source module returns 4 items.

:clipboard: Error messages or input/output bundles

Source module output (module 5):

Bundle 1:
items: (Array)
1: (Collection)
2: (Collection)
3: (Collection)
4: (Collection)
has_more: false
next_cursor: empty
Total number of bundles: 1
What I have already tried:

Mapping items from the mapping panel — the field displays the pill 5. items, but resolves to empty at runtime
Deleting the Iterator and adding a brand new one — same result
Typing {{5.items}} manually — Make treats it as the literal text items
Running module 5 alone first so it learns its output structure, then running the whole scenario — same result
Confirmed the two modules are connected in the chain (no broken link)

Context: four write modules were deleted from this scenario earlier today, which renumbered the remaining ones. The source module now shows as module 5, the Iterator as module 14.

Free plan. Has anyone seen a mapped array pill that displays correctly but resolves to empty at execution?

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

Hey Veronique,

can you show a screenshot of what you have mapped in the iterator and what is showing as output?

hi,

yes I

try

That’s the same screenshot as before.

oooops I m sorry, i’m not an expert

Can you open the module and show a screenshot of how it’s configured?

iterator:

penylane V2

Hm Ok, I tried replicating this but no luck. Can you copy the output of the Pennylane V2 module and paste it here?

And when you paste it here, make sure you use the code formatting option so it doesn’t brake.

image

[
  {
    "limit": 10,
    "filter": "[{\"field\": \"date\", \"operator\": \"gteq\", \"value\": \"2026-09-01\"}]"
  }
]
[
  {
    "items": [
      {
        "id": 11111111111111,
        "label": "Facture CLIENT A - F-2026-09-001 (generated label)",
        "invoice_number": "F-2026-09-001",
        "currency": "EUR",
        "amount": "1200.0",
        "currency_amount": "1200.0",
        "currency_amount_before_tax": "1000.0",
        "tax": "200.0",
        "currency_tax": "200.0",
        "remaining_amount_with_tax": "1200.0",
        "remaining_amount_without_tax": "1000.0",
        "draft": false,
        "language": "fr_FR",
        "paid": false,
        "status": "upcoming",
        "filename": "Facture-CLIENT A-COMPANY-F-2026-09-001.pdf",
        "date": "2026-09-08",
        "deadline": "2026-09-08",
        "special_mention": "REDACTED",
        "created_at": "2026-09-08T09:06:01.156Z",
        "updated_at": "2026-09-08T09:06:05.566Z",
        "archived_at": null,
        "schematron_validation_status": "valid",
        "pdf_invoice_free_text": "",
        "pdf_description": "REDACTED",
        "pdf_invoice_subject": "REDACTED",
        "public_file_url": "REDACTED",
        "exchange_rate": "1.0",
        "discount": {
          "type": "relative",
          "value": "0.0"
        },
        "ledger_entry": {
          "id": 11111111111111
        },
        "customer_invoice_template": {
          "id": 5000000000
        },
        "transaction_reference": null,
        "customer": {
          "id": 2222222222222,
          "url": "https://app.pennylane.com/api/external/v2/customers/2222222222222"
        },
        "billing_subscription": null,
        "credited_invoice": null,
        "quote": {
          "id": 3333333333333
        },
        "invoice_line_sections": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/11111111111111/invoice_line_sections"
        },
        "invoice_lines": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/11111111111111/invoice_lines"
        },
        "custom_header_fields": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/11111111111111/custom_header_fields"
        },
        "categories": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/11111111111111/categories"
        },
        "payments": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/11111111111111/payments"
        },
        "matched_transactions": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/11111111111111/matched_transactions"
        },
        "appendices": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/11111111111111/appendices"
        },
        "installments": null,
        "external_reference": "AAAAAAAAAA",
        "e_invoicing": null,
        "factur_x": true
      },
      {
        "id": 44444444444444,
        "label": "Facture CLIENT B - F-2026-09-002 (generated label)",
        "invoice_number": "F-2026-09-002",
        "currency": "EUR",
        "amount": "600.0",
        "currency_amount": "600.0",
        "currency_amount_before_tax": "500.0",
        "tax": "100.0",
        "currency_tax": "100.0",
        "remaining_amount_with_tax": "600.0",
        "remaining_amount_without_tax": "500.0",
        "draft": false,
        "language": "fr_FR",
        "paid": false,
        "status": "upcoming",
        "filename": "Facture-CLIENT B-COMPANY-F-2026-09-002.pdf",
        "date": "2026-09-08",
        "deadline": "2026-09-23",
        "special_mention": "REDACTED",
        "created_at": "2026-09-08T07:35:05.008Z",
        "updated_at": "2026-09-08T07:35:07.992Z",
        "archived_at": null,
        "schematron_validation_status": null,
        "pdf_invoice_free_text": "",
        "pdf_description": "REDACTED",
        "pdf_invoice_subject": "REDACTED",
        "public_file_url": "REDACTED",
        "exchange_rate": "1.0",
        "discount": {
          "type": "relative",
          "value": "0.0"
        },
        "ledger_entry": {
          "id": 44444444444444
        },
        "customer_invoice_template": {
          "id": 5000000000
        },
        "transaction_reference": null,
        "customer": {
          "id": 5555555555555,
          "url": "https://app.pennylane.com/api/external/v2/customers/5555555555555"
        },
        "billing_subscription": null,
        "credited_invoice": null,
        "quote": {
          "id": 6666666666666
        },
        "invoice_line_sections": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/44444444444444/invoice_line_sections"
        },
        "invoice_lines": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/44444444444444/invoice_lines"
        },
        "custom_header_fields": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/44444444444444/custom_header_fields"
        },
        "categories": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/44444444444444/categories"
        },
        "payments": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/44444444444444/payments"
        },
        "matched_transactions": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/44444444444444/matched_transactions"
        },
        "appendices": {
          "url": "https://app.pennylane.com/api/external/v2/customer_invoices/44444444444444/appendices"
        },
        "installments": null,
        "external_reference": "BBBBBBBBBB",
        "e_invoicing": null,
        "factur_x": false
      }
    ],
    "has_more": false,
    "next_cursor": null,
    "__IMTLENGTH__": 1,
    "__IMTINDEX__": 1
  }
]

I’m getting no issues iterating this array:

Did you get this result with Run once on the whole scenario, or with Run this module only on the Iterator? I get the same Array: empty in isolated runs, and I suspect the “Add item” prompt in the isolated-run dialog passes an empty array.

many thanks for your precious help

Veronique

Yeah when you run a module on its own, you need to manually provide the input. Most likely this is why you are getting an empty array.

ah that makes sense, the manual input thing on isolated runs caught me out with this exact same error before

I’d suspect the problem is with how Make is resolving the mapped array at runtime rather than with the Iterator itself. If module 5 is definitely returning items as an array of four collections, the Iterator should normally turn those into four bundles. Since the mapping pill appears correctly but evaluates to an empty array, I’d try putting a Set Variable module between 5 and 14 and map 5.items into the variable, then use that variable as the Iterator input. That can sometimes expose whether the issue is with the output structure or the Iterator mapping. I’ve run into similar odd mapping behaviour in workflow tools like Phonexa when the data structure changes after modules are moved or rebuilt.