I'm attempting to build a scenario in callin.io that retrieves a record from Airtable and subsequently generates an invoice in Freeagent.com.
The challenge lies in the fact that the invoice requires multiple line items, which are extracted from Airtable. I'm unsure how to loop through these line items and construct the data structure that the 'invoice items' field in the Freeagent module expects.
My understanding is that I need to iterate and then assemble the JSON structure, but I lack the necessary experience for this task!
Here's my Airtable output bundle and the Freeagent input bundle:
json
[
{
"FreeAgent Ref": "3938630 copy copy",
"Ready to Invoice": true,
"<img alt=":popcorn:" class="emoji" height="20" loading="lazy" src="https://emoji.discourse-cdn.com/twitter/popcorn.png?v=12" title=":popcorn:" width="20"/> CAMPAIGN": [
"receXYbDrSEV6PnyE"
],
"<img alt=":memo:" class="emoji" height="20" loading="lazy" src="https://emoji.discourse-cdn.com/twitter/memo.png?v=12" title=":memo:" width="20"/> INVOICED ITEMS": [
"recmkh4eEjOxeYmsc",
"recDWZvqFOYeJAtiM",
"recjkEKZZf5dPy2og",
"rec1btktbM1BCi1Gz",
"recq32SMQTaLqyzaH",
"recFWM0FsBiT3rWk8"
],
"CLIENT": [
"recGywQ7orhBmGQIi"
],
"CLIENT ID": [
"12121872"
],
"PROJECT ID": [
"3938630"
],
"PO NUMBER": [
"recK5nfoIKika5OiB",
"recK5nfoIKika5OiB",
"recK5nfoIKika5OiB",
"recK5nfoIKika5OiB",
"recK5nfoIKika5OiB",
"recK5nfoIKika5OiB"
],
"Created Date": "2024-09-28T07:29:18.000Z",
"AMOUNT": [
"2926",
"3155",
"11200",
"3500",
"8887",
"13796.2"
],
"ITEM DESCRIPTION": [
"A",
"B",
"C",
"D",
"E",
"F"
],
"PO Fx": [
"POXXX "
],
"id": "recRbBeP0SO9rqb26",
"createdTime": "2024-09-28T07:29:18.000Z"
}
]
And here’s the Freeagent input bundle...
json
[
{
"contact": "12121872",
"project": "3938630",
"currency": "GBP",
"dated_on": "2024-09-28T07:32:18.000Z",
"po_reference": "XXX ",
"invoice_items": [
{
"price": 2926,
"quantity": 1,
"item_type": "Products",
"description": "A"
}
],
"show_project_name": true,
"payment_terms_in_days": 15,
"send_new_invoice_emails": false
}
]
Hi there!
This can be accomplished in about 30 minutes. Please feel free to book a time slot here.
Hey, that’s good to know, but I can’t find your pricing.
Please provide the rewritten markdown content *it should be in the markdown format.
Hey
This seems simple enough to implement during a live troubleshooting session. I offer 90-minute paid support sessions and would be happy to help with your issue.
Please find my paid booking link here - click here
Have you found a solution to this, or do you still require assistance?
It’s pay what you can
Are you finding the back-and-forth with callin.io support on chat or email to be a hassle? Is posting on the community forums leading to frustration?
We can assist you in resolving your callin.io automation challenges within just an hour! Would you like to try a callin.io Hero call?
Hello, I'm Alex Sirota, founder of NewPath Consulting. We are a Silver callin.io partner and have been actively developing automations for 5 years. We offer a one-hour video consultation where we'll guide you on fixing your scenarios or help build an automation you're struggling with. We'll collaborate on building scenarios with you, help you overcome any obstacles, and provide you with the results via a video recording with a transcript and links.
Schedule a session with us at [callin.io Hero]( https://newpathconsulting.com/make-hero/).



Explore the callin.io for callin.io Newbies Video Series
This thread was automatically closed after 30 days. New responses are no longer permitted.