Dependency Mapping
Dependencies define how data flows between endpoints. When one endpoint needs values from another (like user IDs), you create a dependency mapping.
Understanding Dependencies
Example: To collect messages for each channel, you need channel IDs first.
channels endpoint → extracts channel IDs → messages endpoint
The dependency mapper lets you:
- Define which endpoint provides values
- Specify the JSON path to extract
- Choose iteration mode (each value vs. first only)
- Map to target endpoint parameters
Creating Mappings
Using the UI
Open the endpoint editor (the Test & Configure tab in a draft, or the endpoint explorer in a published connector). Then:
- Test the source endpoint to see its response data
- In the interactive JSON viewer, click the field containing the IDs you need
- Drag the value onto the target endpoint's parameter drop zone — or use the mapping dialog to enter a JSON path directly
- Choose iteration mode:
- Iterate: Run target endpoint for each value (auto-selected when the path contains an array wildcard like
[*]) - First: Use only the first value
- Iterate: Run target endpoint for each value (auto-selected when the path contains an array wildcard like
Example: Channel Messages
Step 1: Test "List Channels" endpoint
Response: { "channels": [{ "id": "C123" }, { "id": "C456" }] }
Step 2: Click "channels[*].id" in the JSON viewer
Step 3: Drag to "Get Channel Messages" endpoint
Target parameter: channel_id (in path)
Step 4: Select "Iterate" mode
Result: Will call /channels/C123/messages, /channels/C456/messages
JSON Path Syntax
Extract values using JSON paths:
| Path | Description | Result |
|---|---|---|
data[*].id | All IDs from data array | ["id1", "id2", "id3"] |
users[*].profile.email | Nested field from array | ["a@x.com", "b@x.com"] |
data[0].id | First ID only | "id1" |
meta.organization_id | Single value from object | "org123" |
Array Notation
[*]- All items in array[0]- First item[-1]- Last item
Parameter Locations
Specify where the extracted value goes:
| Location | Use For |
|---|---|
path | URL path templates like /users/{user_id} |
query | Query parameters like ?channel_id={channel_id} |
body | Request body fields (POST/PUT/PATCH endpoints) |
The body location is valid for endpoints configured with Body Parameters.
Iteration Modes
Iterate Mode (Default)
Runs target endpoint once for each extracted value:
Source returns: ["C123", "C456", "C789"]
Target runs 3 times:
- /channels/C123/messages
- /channels/C456/messages
- /channels/C789/messages
First Mode
Uses only the first extracted value:
Source returns: ["C123", "C456", "C789"]
Target runs 1 time:
- /channels/C123/messages
Use first mode when:
- Only need one example
- Source provides identical values
- Testing dependency works
Dependency Order
The system automatically determines execution order:
- Endpoints with no dependencies run first
- Dependent endpoints wait for their sources
- Use the
orderfield to prioritize within the same dependency level
Example order:
1. users.list (no dependencies)
2. channels.list (no dependencies)
3. user.profile (depends on users.list)
4. messages.history (depends on channels.list)
Alternatives to Complex Dependency Chains
Paired Variables
When you need correlated values from two sources (e.g., user IDs paired with their organization IDs), consider using Paired Variables instead of creating multiple mapping chains. Paired variables let you combine outer/inner value sources with modes like cartesian, positional, join, or nested.
Merged Variables
When you need to aggregate the same type of data from multiple endpoints (e.g., IDs from several list endpoints), use Merged Variables to combine them into a single iteration set.
Testing Dependencies
- Configure all mappings
- Test source endpoints first to populate data
- Run iterate test on dependent endpoints
- Review results to verify correct data flow
What to Verify
- Values extracted correctly
- Substitution works as expected
- All dependent endpoints receive values
- No circular dependencies
Troubleshooting
No Values Extracted
Causes:
- JSON path is incorrect
- Source endpoint returned empty data
- Wrong array notation
Solutions:
- Test source endpoint individually
- Verify JSON path matches response structure
- Check for typos in path
Wrong Values Extracted
Causes:
- Path points to wrong field
- Array index issue
- Nested object confusion
Solutions:
- Use JSON viewer to navigate response
- Click on exact field needed
- Verify path before dragging
Target Endpoint Fails
Causes:
- Parameter location wrong (path vs query vs body)
- Parameter name mismatch
- Extracted value format issue
Solutions:
- Check target endpoint's expected parameters
- Verify parameter name matches
- Check if value needs transformation (see Response Transformations)
Circular Dependencies
The system will detect and prevent circular dependencies:
- A depends on B, B depends on A
- A depends on B, B depends on C, C depends on A
Reusable Variables
For values that need to be used across multiple endpoints, consider using Reusable Variables instead of creating individual mappings.
Variables let you:
- Name a data extraction once
- Apply to multiple endpoints
- Add conditional filtering
- See all uses in one place
See Reusable Variables for details.
Conditional Filtering
When a source array contains mixed data, use Conditional Variables to filter:
Source: blocks[*] contains pages, databases, text blocks
Filter: type = 'page'
Result: Only page blocks are used
Filter conditions include:
equals/not_equalscontains/starts_with/ends_withexists
See Conditional Variables for the full guide.
Best Practices
- Minimize depth - Deep chains increase failure points
- Test the full chain - Partial tests miss integration issues
- Handle empty results - Source with no data shouldn't break dependents
- Consider parallelization - Independent endpoints can run concurrently
- Document complex mappings - Use notes for non-obvious dependencies
- Use variables for reuse - Don't duplicate the same mapping
- Filter at source - Use conditional variables to reduce iteration count
- Use paired variables for correlation - When you need values from two sources in sync
Next Steps
- Reusable Variables - Save extractions for reuse
- Paired Variables - Combine correlated value sources
- Conditional Variables - Filter array data
- Testing Connectors - Verify mappings work
- Pagination Configuration
- Versioning
Technical Reference
For algorithm details, see: