Use map in Make to extract matching email addresses
Extract work email addresses from fictional contacts in Make Free. Use the exact field keys and check the resulting array before using it.

A contact record can contain many fields. For this task, you only need email addresses from contacts labelled work. Make's map function can extract that field and select records by their label. The example below uses fictional contacts.
Before you start
Create a Make Free (opens in a new tab) account or log in to your existing account. You do not need to connect another app. Leave the scenario Inactive and use Run once for this exercise.
1. Create the practice contact list
- Open the Scenarios tab.
- Click Create scenario.
- Name the scenario Contact fields practice in the top left corner.
- Add JSON > Parse JSON.
- Leave Data structure empty and paste the data below into JSON string.
- Save the module and scenario. Choose Save anyway only if Make warns about unused output.
- Click Run once. If the warning appears, choose Run anyway. Inspect the JSON output before adding another module. This run lets Make identify the data structure.
{"contacts":[{"email":"maya@example.com","label":"work"},{"email":"leo@example.com","label":"home"},{"email":"nora@example.com","label":"work"}]}
2. Extract the matching field
- Close the JSON result panel.
- Click the plus next to JSON. Add Tools > Set variable.
- Name the variable work_emails.
- Copy the expression below into Variable value. Make sure contacts is a coloured mapping token from JSON module 1. If your JSON module has a different number, use the mapping panel to choose its contacts array.
- Save the module and scenario.
{{map(1.contacts; "email"; "label"; "work")}}
Read the expression from left to right:
- 1.contacts supplies the complete contact array from JSON module 1.
- email is the raw key whose values you want back.
- label is the raw key to check in each record.
- work is the accepted label value.
For your own records, use their actual field keys. The result contains the email values from matching records, rather than copies of the complete contacts.
Quick takeaway
The result is one array of matching email values. It does not send messages or create a separate bundle for each address. Check whether the next module expects an array or a single value before connecting it.
3. Check the two matching addresses
- Click Run once.
- Open the Tools result bubble.
- Under Output, expand work_emails.
- Check for
maya@example.comandnora@example.com. - The home-labelled address,
leo@example.com, should be absent.
If an expected value is missing
If an expected address is missing, compare the raw field keys and label values with the expression, including spelling and case. The first argument must be the complete contacts array. The shorter map(array; key) form extracts the field without filtering.
For this sample, changing the fourth argument to "work,home" includes all three addresses. The comma separates accepted values for the same filter key. Using "other" returns an empty array because no contact has that label.
The resulting email array no longer contains the other contact fields. For conditions involving several fields, start with the original records. Use an Iterator to produce one bundle per contact, then add a filter that meets both conditions before the next action.
A spreadsheet may be simpler for a one-off contact list. Check the Free plan limits before scheduling the scenario.
Sources: Make array functions (opens in a new tab); Make JSON documentation (opens in a new tab). Screenshots show fictional practice data.
Share this post
From holdmytwist.com/blog/make-map-matching-email-addresses/


