In Integromat, mapping is the process of assigning a module's outputs (structured into items) to the succeeding modules' input fields in the module setup panel with the help of the mapping panel.
The operation of a module produces zero, one, or more bundles as its output. A bundle consists of one or more items.
To explore the output of a module, execute it and click on the bubble above the module. A log containing all of the module's phases will pop up. The bundle(s) outputted by a module's operation phase can be found under the OUTPUT heading. Each bundle contains its items and their values.
The following example shows the module Email > Watch emails. You can see it performed one operation producing a single bundle with various items like
Email ID (UID),
Once you have created a sequence of modules by linking two or more modules, each module can process values of items outputted by the modules that precede it. The following steps describe how to assign the items to a module's input fields:
You may map multiple items into a field, combine them with literals (fixed values) and employ Operators and Functions to build complex formulas:
The functions and operators can be found in the mapping panel under one of its tabs:
Some items can contain multiple values of various types. These items are of the type called, Collection and can be distinguished by a small black rectangle displayed to the right of the item's label and its automatically expanded list of sub-items:
Some items can contain multiple elements of the same type. These items are of the type, Array and can be distinguished by square brackets at the end of the item's label. Click the small black rectangle to the right of the item's label to reveal the element's items:
If you map the array's
Recipient name item, it will appear in the field like this:
The number in the square brackets is an index that determines which element of the array will be used. It is set to one by default.
If you wish to access another element, click on the square brackets and edit the index value:
Some arrays contain several collections with key and value items. These are typically various metadata, attributes, etc.
The following example shows the output of the WooCommerce > Get a product module that contains the item
Meta data, which is an array of collections. Each collection contains the key item
Meta data ID and the value item
The typical requirement is to lookup an element by its given key value and obtain the corresponding value from the value item. This can be achieved with a formula employing a combination of the
get() functions. The following example shows how to obtain the value of the
Value item of the element with key
Meta data ID item value equal to
The result of the formula will be "no".
The detailed breakdown of the formula follows:
map()function is the whole array item.
valuein contrast to the label
map() function returns an array (as there could be more elements with the given key value), it is necessary to apply the
get() function to get its first element:
get()function is the result of the
See also our Extract an item and/or its value from an array of collections video tutorial.
Arrays can be converted to a series of bundles using the Iterator module:
For each module, the mapping panel displays all output items listed by the author of the module. In some cases, this list might be incomplete for various reasons and some items might be missing. Nevertheless, Integromat can auto-discover the missing output items. All you have to do is to execute the module in the scenario editor. The exact procedure differs slightly depending on the module's type:
You may choose to execute:
If you choose to execute just the single module then: