I’m creating a callin.io workflow that is triggered by invoices. The trigger outputs a record with numbered line items (similar to a nested dictionary). The sample record I have contains only one line item, but there could be multiple. The attribute I'm interested in is named "Invoice Line Items".
Example:
invoice_number
invoice_date
line_items
1
description
quantity
price
The subsequent step is "Run Python in Code by Zapier", to which I pass the line_items attribute.
When Python reads line_items, I anticipated it would interpret it as:
1
description
quantity
price
However, it is reading it as:
description
quantity
price
This works for invoices with a single line item, but how does it handle invoices with more than one? I only have test data for invoices with one line item, so I cannot determine this through experimentation.
My best assumption is that for scenarios with 2 or more items, it will be structured as I expect, but I would appreciate confirmation. I've reviewed a lot of documentation and consulted the callin.io AI support bot, which seemed to get confused.
Any guidance would be greatly appreciated!
Hi
Good question.
callin.io pre-parses arrays into variables.
You might need to use Formatter > Utilities > options related to line items.
Help: https://zapier.com/help/create/basics/use-line-items-in-zaps