Use Map to run the same sequence of steps for each item in an array.
Overview
Type:map
Map processes items one at a time. Each iteration starts with the parent context plus item and the zero-based itemIndex. Its nested steps run in order, and its outputs are not available to other iterations.
Configuration
Source
Type: String
Required: Yes, unless using the deprecated items template
Templatable: No
Description: Path to the array in context (supports dot notation for nested access)
Code
usersapi_response.databatch_results.items
Index by
Type: String
Required: No
Description: Property name to use as key for results (returns object instead of array)
Use a property present on every item. Duplicate values overwrite earlier results, and missing values produce an undefined key.
Code
idemailuserId
Steps
Type: Array of Objects
Required: Yes
Description: Workflow steps to execute for each item
Each result is the complete context after that iteration: the parent values, item, itemIndex, and named outputs from its nested steps. Each iteration starts from the same parent context. The Map step returns different formats based on configuration:
Array results (default)
Code
[ {/* result from item 0 */}, {/* result from item 1 */}, {/* result from item 2 */},];
Object results (with indexBy)
Code
{ "key1": { /* result for item with key1 */ }, "key2": { /* result for item with key2 */ }, "key3": { /* result for item with key3 */ }}
These examples are steps to include in an execution request. Context blocks show the input for the preceding step; supply any other referenced values and credentials in the request's context.
Sequential execution: Map processes items one at a time
Batch runs an explicitly configured list of steps in parallel; it does not iterate an array automatically
Use Batch inside Map to run independent operations in parallel within each iteration.
Monitor execution time for large arrays
Consider pagination for very large datasets
Array size management
Limit each request to an array that can finish within the endpoint's response timeout, which defaults to and is capped at 30 seconds.
Consider breaking into smaller batches
Use filtering before mapping when possible
Monitor timeout settings for long-running operations
Context access
Access current item: {{ item.property }}
Access index: {{ itemIndex }}
Access original context: {{ originalContextVar }}
Previous iterations don't affect subsequent ones
indexBy usage
Use for lookups by key
Use unique property values. Duplicate keys overwrite earlier results.
Returns object instead of array
Useful for building dictionaries/maps
Supply the property on every item; a missing property produces an undefined key
Memory management
Large arrays consume more memory
Each iteration creates new context
Monitor memory usage for complex steps
Split large datasets into separate execution requests. Map does not provide a streaming result.
Common use cases
Bulk data enrichment: Enhance multiple records with external data
Multi-recipient notifications: Send personalized messages to lists
Batch API updates: Update multiple resources sequentially
Data transformation: Convert array items to desired format
Sequential processing: Process items that depend on order
Report generation: Create individual reports for each entity
User onboarding: Execute onboarding steps for multiple users
Content processing: Analyze or classify multiple text items
Inventory updates: Update stock levels for multiple products
Validation checks: Validate multiple entries against rules
Troubleshooting
Performance issues
Reduce number of items processed
Optimize steps within map
Use batch for parallelizable operations
Consider caching repeated operations
Monitor API rate limits
Timeout errors
If options.timeout is below 30000 milliseconds, raise it within that limit. The execute endpoint does not accept a longer response wait, and a timeout does not cancel operations already running.