Integrations
Common issues with Code in Duaer
Common Code node issues in Duaer: return format, import, modules, network access, credentials, and Python.
Code does not return items properly
Duaer passes an array of objects between nodes, and each object’s json key points to another object. The Code node must return that shape:
return [
{ json: { name: 'Ada', score: 92 } },
{ json: { name: 'Lin', score: 88 } },
];A json key that holds an array, no return value, or undefined all fail. For undefined, check that the fields you reference exist on every run.
'import' and 'export' may only appear at the top level
The Code node’s JavaScript sandbox does not support import or export. Use require instead: const lodash = require('lodash');
Cannot find module '<module>'
Only a self-hosted Duaer can load extra modules in the Code node:
- Install the module where Duaer runs. With Docker, build a custom image from your Duaer image with the module installed.
- Set NODE_FUNCTION_ALLOW_BUILTIN (built-in modules) and NODE_FUNCTION_ALLOW_EXTERNAL (external modules) to the allowed names, then restart.
fetch or axios fails in the Code node
The Duaer Code node runs in a sandbox with no network access, so fetch, axios, and http modules fail. Make the request with the HTTP Request node, then process its output in the Code node.
The Code node cannot read credentials
By design, the Code node cannot read Duaer credentials, so secrets cannot leak. Send authenticated requests with HTTP Request. To pick credentials by condition:
- Route with a Switch node to nodes that use different credentials.
- Use Custom Auth in HTTP Request and set headers, query parameters, or body with expressions.
Keep data between runs
Store a little data with $getWorkflowStaticData('global') or $getWorkflowStaticData('node'), such as the date of the last report. To avoid processing the same items twice, the Remove Duplicates node is simpler.
Python errors
- The Python option cannot import anything unless the instance admin allows it.
- Python does not support the _ helpers, except _items in all-items mode and _item in per-item mode.
- When the instance disables Python, the node fails at once. A self-hosted admin sets DUAER_PYTHON_ENABLED to true, or removes it, and restarts.
Refer to Python.
Questions
Can the Duaer Code node make HTTP requests?
No. The Duaer Code node sandbox has no network access. Use the HTTP Request node, then process the result in Code.
Can the Duaer Code node use credentials?
No. Duaer does not let the Code node read credentials. Send authenticated calls with HTTP Request.
In this section
Built-in integrations in Duaer
Built-in triggers, actions, and credentials in Duaer. Triggers start a digital organization. Actions run a step after it has started.
IntegrationsRisks of community nodes in Duaer
Before you install a community node in Duaer, know the code comes from a source the instance admin trusts, and know what permissions it gets.
IntegrationsTroubleshoot community nodes in Duaer
When a Duaer community node will not install or run, check the version, permissions, and node docs, then the instance logs.
IntegrationsMake custom API calls for an app in Duaer
When a Duaer app node does not expose the API you need, use HTTP Request and reuse that app’s saved authentication.
IntegrationsIntegrations in Duaer
Built-in triggers, actions, and credentials in Duaer. Community nodes are extra packages. Custom operations reuse saved authentication with HTTP Request.
CredentialsBuilt-in credentials in Duaer
Per-service credential notes for Duaer built-ins. The create flow is in the credentials overview; node docs link to the matching service page.
Create nodesCreate a custom node for Duaer
Write a node package for Duaer when built-in nodes and custom operations are not enough and you will reuse the step.