Get Invoice ID from Payment

Get Invoice ID from Payment

I have a payment that comes in for Zoho Books. In Zoho Flow, I want to find the Invoice ID and so that I can use it in the next steps. When a payment comes in, below is the format of the data. How can I get the invoice_id to use in next step of Zoho Flow?

{

"date": "2019-11-16",

"account_type": "bank",

"template_type_formatted": "Elite",

"can_send_in_mail": true,

"documents": [


],

"discount_amount": 0,

"is_client_review_settings_enabled": false,

"invoices": [


{

"discount_amount_formatted": "$0.00",

"date": "2019-11-16",

"due_date_formatted": "",

"balance_formatted": "$548.00",

"discount_amount": 0,

"due_date": "",

"apply_date_formatted": "",

"invoice_payment_id": xxxxxxxxxxxxxxxxxxxxx,

"amount_applied": 2,

"amount_applied_formatted": "$2.00",

"price_precision": 2,

"total": 552,

"apply_date": "",

"balance": 548,

"date_formatted": "Nov 16, 2019",

"tax_amount_withheld": 0,

"tax_amount_withheld_formatted": "$0.00",

"invoice_id": xxxxxxxxxxxxxx7001,

"invoice_number": "INV-xxxxxx”,

"total_formatted": "$552.00"

}


How can I just pull the invoice_id?

If it were on its own, that would be easy, but the fact that its nested under "Invoices" I am not sure how to get the invoice_id

Can someone please help me? Do I have to use Set Variable or Custom function to get it?