What breaks when you move Pipedream code steps to n8n (tested on 92 workflows)
Описание и применение
Перенос кода из Pipedream в n8n вызывает ошибки из‑за недоступных глобальных объектов и специфических API. Решения включают замену fetch/axios на httpRequest, преобразование экспортов в элементы n8n и удаление $.flow.exit().
Задача
Migrating Pipedream workflows to n8n fails mainly due to code steps that rely on globals and patterns not supported by n8n’s Code node.
Результат
Out of 84 imported workflows, 8 ran to completion under strict test conditions; the rest required code adjustments. The migration process demonstrates that most failures stem from unsupported globals and Pipedream‑specific data handling patterns.
Рабочий процесс
- Import 84 non‑empty workflows into n8n via n8n import:workflow.
- Run each workflow once with n8n execute under no‑network, no‑credentials, no‑input to surface errors.
- Identify failures: 8 succeeded, 38 due to test setup, remaining due to code incompatibilities.
- For each failing code step:
- • Replace fetch/axios calls with this.helpers.httpRequest or HTTP Request node.
- • Shim fetch if needed by defining a function that forwards to httpRequest.
- • Convert Pipedream step exports to n8n items: return [{json:{…}}] and reference via $().first().json.
- • Replace $.flow.exit() with an empty return; remove $.respond() calls.
- • Adjust data references from steps.x.$return_value to $().first().json.x or $input.first().json.x.
- • Remove AbortController usage and use HTTP Request node timeout instead.
- • Ensure globals like crypto, process, require are not used or polyfilled.
- • Test each modified workflow to confirm success.
Доказательства
31 of the 92 workflows call fetch(, and 29 use axios. Neither works in the Code node out of the box.
One thing to know before the code: in my probe of the n8n 2.44.5 Code node with the default JavaScript task runner, these globals were not defined: fetch, URL, URLSearchParams, AbortController, structuredClone, Blob, process and the global crypto.
The n8n docs say the Code node can't make HTTP requests and point you to the HTTP Request node.
- Дата записи: 2026-10-22T12:26:08.955Z