Xero Phone numbers not being pulled

I need new contacts that have had an invoice sent to them be added to a Google sheet.

Currently it works by doing watch invoices, it then grabs the name, but it does not get the phone number, every time it says the phone field is empty.
image

Something to keep in mind is when the data comes in, it is in an array format.
“Phones”: [
{
“PhoneType”: “DEFAULT”,
“PhoneNumber”: “027…”,
“PhoneAreaCode”: “”,
“PhoneCountryCode”: “”
},
{
“PhoneType”: “DDI”,
“PhoneNumber”: “”,
“PhoneAreaCode”: “”,
“PhoneCountryCode”: “”

For some reason, Make.com just shows this as all empty.

Hello,

When you just map and don’t define any index (between the square brackets), it automatically picks the first item. From the example JSON you give, it should not be empty.
But if ever the order is different (default phone is in the second item), you won’t get the relevant data.

When you ran, for a contact where the phone number doesn’t appear, can you check logs and see what was the Phones data that you got?

If the order is random, you should use the map function.
If should be similar to that

Benjamin

2 Likes