When a node receives multiple items but only needs to run once (e.g., fetching a configuration, getting an auth token, or looking up a shared resource), enab...
When a node receives multiple items but only needs to run once (e.g., fetching a configuration, getting an auth token, or looking up a shared resource), enable Execute Once in the node settings. This runs the node for only the first item and applies the result to all items, saving N-1 redundant API calls.
Real-world example: A workflow processes 100 orders. Each order needs the current exchange rate. Without Execute Once, the exchange rate API is called 100 times with identical results.
# Node settings panel (gear icon) on the HTTP Request node
Settings:
Execute Once: true # <-- This is the key setting
Retry On Fail: true
Max Retries: 3
# The node receives 100 items but only executes the HTTP request once.
# All 100 items receive the same exchange rate result.
```text
Identify candidates for Execute Once in your workflows:
```yaml
Good candidates for Execute Once:
- Fetching configuration or settings
- Getting authentication tokens
- Looking up exchange rates or reference data
- Checking feature flags
- Fetching shared resources (templates, schemas)
Bad candidates (must run per item):
- Processing individual records
- Making API calls with per-item parameters
- Writing individual records to a database
- Sending personalized emails
```text
```javascript
// Alternative: Manual deduplication in a Code node
// Use this when you need Execute Once behavior but also need to
// merge the result back into each item
const items = $input.all();
// Get the shared data from the first item only
const sharedConfig = items[0].json.configData;
// Merge it into all items
return items.map(item => ({
json: {
...item.json,
exchangeRate: sharedConfig.rate,
configVersion: sharedConfig.version
}
}));
```text
For 100 items with a $0.001 API call, Execute Once saves $0.099 per execution. At 50 executions per day, that is $4.95/day or $148.50/month from a single checkbox.
**Related:** [Use Structured Output (JSON Mode) for Parseable Responses](../ai-and-llm-integration/01-use-structured-output-json-mode-for-parseable-responses.md) | [Configure Payload Size and Binary Data Mode for Large Files](../performance-and-large-files/01-configure-payload-size-and-binary-data-mode-for-large-files.md)
I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.