Send an execution request to a separate gateway
n8n's HTTP Request node can call an API with a chosen method, body and authentication. Use it to call a gateway you control, which authenticates the workspace and dispatches the task to an isolated runtime. Keep the endpoint and credentials in workflow configuration; do not let model output select them.
The JSON below illustrates a gateway request shape. It is not a public cpuOS endpoint or a ready-to-import n8n workflow. The gateway must implement provisioning, ownership checks, input limits and result collection against a connected execution backend.
{ "profile": "python", "source": "print(6 * 7)", "timeout_seconds": 30, "output_limit_bytes": 6000}cpuOS is in early access. @cpuos/sdk and cpuos snippets illustrate a proposed API contract, not publicly released packages. Confirm access and SDK versions with the team before using them; names may change.
Make success and failure explicit workflow branches
- Trigger the workflow with an authenticated task and approved input files.
- Ask the model for an action, then validate the action type and source size.
- Send the bounded request with HTTP Request credentials stored outside the generated payload.
- For an asynchronous gateway, poll its task result with a deadline and bounded retries.
- Branch on the actual execution result: success, process error, timeout or provisioning failure.
- Return approved artifacts and bounded stdout to the model, then end or pause the task through the runtime's documented lifecycle.
Use a request identifier to prevent workflow retries from creating duplicate execution jobs. A successful HTTP status can mean the job was accepted; it does not prove the generated script completed. Preserve the process exit code and the backend's final state before deciding which branch to run.
Keep generated code away from the workflow host
Use the workflow's code steps for trusted validation and data shaping. Generated programs belong in the isolated runtime, with its own resource limits and network policy. The workflow host may hold access to email, databases and other business systems; those credentials should not enter the guest or the model's context.
Choose a template profile for the action and estimate its task volume with the cost calculator. For model calls, the gpuOS n8n integration explains the inference side. Begin with a controlled fixture and verify cleanup, error handling and retry behavior before enabling scheduled production workloads.
Official documentation: docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest