How should I make Object Mapping with response of a list? | Community
Skip to main content

Hi team, 

I’m trying to fetch user information with external API. The example response was like : 

{
"list": t
{
"customer": {
"id":"123",
"first_name": "Darth",
"last_name": "Vader",
"email":"darthvader@deathstar.com"
}
}
]
}

I can see the example response in Data Access but since the first layer is a list, I can’t mapping that in Object Mapping. Could you suggest how should I mapping these data? Thank you. 🙏

 

 

 

 

Hey ​@AdamChenAppier 

If your API response starts with a list, Intercom can’t map it directly it expects a flat object at the root level.

To resolve this, either adjust the API to return a single object or use a middleware to extract and flatten the data. Make sure the fields you want to map (like email or first_name) are at the top level and match Intercom’s expected data types. This ensures your custom action maps the data correctly into user or company profiles.


Reply