Written by
Joshua ThompsonArticle details
» 4 min read
Quick answer: Make.com’s map() function extracts values for a specified key from a complex array and returns them as a primitive array, according to Make’s array-functions reference.
map(complex array; key; [key for filtering]; [possible values for filtering separated by a comma])The optional arguments let you filter the collections by another key and one or more accepted values. Unlike JavaScript’s general-purpose Array.map(), Make’s documented function is specifically for extracting values by key from a complex array.
What does the map() function do in Make.com?
Make distinguishes between a simple array and a complex array. A simple array contains values such as names, numbers or email addresses. A complex array contains collections, with each collection holding several named fields.
For example, an array could contain:
[
{
"name": "John Smith",
"email": "[email protected]",
"destination": "Tenerife"
},
{
"name": "Sarah Johnson",
"email": "[email protected]",
"destination": "Crete"
}
]Using map() with the email key converts that complex array into a primitive array containing only the email values.
What is the correct Make.com map() syntax?
map(complex array; key; [key for filtering]; [possible values for filtering separated by a comma])- Complex array: the complete array of collections produced by a module or aggregator.
- Key: the raw field name whose values you want returned.
- Key for filtering: an optional field against which Make should test each collection.
- Possible values for filtering: one or more optional accepted values, separated by commas.
The key must be its raw variable name, not necessarily the friendly label shown in the mapping panel. Raw names and other parameters are case-sensitive, as explained in Make’s guide to mapping arrays.
Make allows functions to be used inside mapping fields to build formulas and transform mapped data, as shown in its guide to using functions.
How do you extract email addresses with map()?
If your complex array is named emails[] and each collection contains a raw field named email, use:
map(emails[]; email)The result is a primitive array of email values. Select the array token from Make’s mapping panel, then enter the raw key name rather than a friendly display label.
If you only need the first mapped email rather than the complete array, wrap the result in first():
first(map(emails[]; email))Make’s mapping-arrays guide says map() still returns an array when filtering could logically match one item, so it recommends combining the result with first() when you need a single value.
How do you combine map() and join()?
join() concatenates the items in an array into a string and places the specified separator between them.
join(map(emails[]; email); ", ")The order matters: first use map() to extract the email values, then use join() to turn the resulting array into text. This is useful when the destination expects one text value rather than an array.
How do you filter values with map()?
The third and fourth arguments let you filter collections while extracting a field. Make provides this example for returning email values whose label is work or home:
map(emails[]; email; label; work,home)Here, email is the field being returned, label is the field being checked, and work,home supplies the accepted values.
This built-in filter is useful for a straightforward equality check. For more complicated scenario logic, routing or several conditions, use a scenario filter or conditional expression instead. My Make.com if-function guide covers those broader conditional patterns.
Can you use max() with map()?
Start by using map() to extract the field you want to inspect, then check that the resulting array contains the intended values before selecting a Math function in Make.
The approved array-functions reference used for this guide does not disclose the exact max() signature, so check the function entry in your Make editor rather than relying on an unverified formula. This is particularly important if the mapped field contains blanks, text or formatted currency rather than clean numeric values.
Why is map() returning empty values?
- Check the source type. The first argument must be the complete complex array, not one collection or one bundle.
- Check the raw key. Use the raw variable name with the correct capitalisation.
- Check the output type.
map()returns an array. Usejoin()for text orfirst()when you need one value. - Check the filter. Confirm that the filter key and accepted values match the source data, including capitalisation.
- Check the final field. Make sure the destination accepts an array, or convert the result into the required type.
What should you remember about map()?
Start with the complete complex array, identify the raw name of the field you need, and let map() return a primitive array. Add the optional filter arguments only when you need a field-value match. Then apply a second function such as join() or first() according to the final output type.
If your array originates in an incoming API request, first confirm that Make has received and recognised the payload structure. The practical setup in my beginner’s guide to Make.com webhooks explains how to capture sample data before mapping it into the rest of a scenario.
Tagged
Last updated
Category
AutomationLikes
More posts
You might also enjoy
Automation
Free Make.com Reddit Scraper Blueprint
Download a free Make.com Reddit scraper blueprint that uses public RSS, cleans post data, filters ideas with AI and sends results to your content workflow.
JoshuaSeptember 17, 2025
Automation
Tracking Clicks Made Simple for your Business (and other ideas)!
Tracking Clicks for Business is the first step to smarter marketing. Grab free downloads and build your own easy metrics dashboard today!
JoshuaAugust 24, 2025
Automation
Make.com if Function - Complete Guide
Master the make.com if function with examples, tips, and pitfalls. Learn conditional logic to save time and build smarter automations.
JoshuaAugust 10, 2025
Star Rating
No ratings yet
Comments
No comments yet - start the conversation.