n8n in Russia: AI Workflows, Errors, and Costs
Connect BetterToken to n8n, run one AI workflow, limit retries, and reconcile each execution with Token usage and charges in the Dashboard.
Want to test an n8n AI workflow with one controlled request? Create a BetterToken account and API Key, then open the n8n instructions and add an OpenAI credential. Connect Manual Trigger, AI Agent, and OpenAI Chat Model; limit Max Retries; then match the manual execution to its model, status, Token usage, and charge in the BetterToken Dashboard.
What does n8n do in this AI process
n8n manages the node sequence and stores execution data. OpenAI Chat Model sends a request to the selected model, and BetterToken receives an OpenAI-compatible API call. For the first test, three components are enough:
Manual Trigger prevents an accidental run from a schedule or webhook. The AI Agent receives a fixed prompt, and the Chat Model sends one model request. Do not add Telegram, email, database, publishing, or any other node with external side effects.
BetterToken in this scheme is responsible for the API Key, Base URL, available Model ID and usage record in the Dashboard. It does not guarantee compatibility of all community nodes or OpenAI-hosted tools. Access to BetterToken API Endpoint from Russia does not require a VPN; the availability of n8n Cloud, its own server and third-party integrations is checked separately.
How to create a credential without leaking the API Key
- Add the AI Agent node to the workflow.
- In the Chat Model connector, add the OpenAI Chat Model subnode.
- In the Credential to connect with field, select Create new credential → OpenAI.
- If the interface offers OpenAI Account (ChatGPT) and API Key, select API Key.
Fill in the credential:
- API Key: your API Key BetterToken.
- Organization ID: leave blank.
- Base URL:
https://www.bettertoken.ai/v1. - Add Custom Header: turn off.
Save the credential in the n8n secure storage. Do not insert the key into a prompt, workflow JSON, Code node, screenshot, execution data, or repository.
Please check the official OpenAI credential documentation in n8n for current fields and authorization modes.
Base URL must end with /v1. Do not append /models, /chat/completions, or /responses: n8n itself completes the address. When saving a credential, n8n checks models via /models against the specified Base URL.
If the model list does not appear, reopen the credential and OpenAI Chat Model. Take the exact Model ID from the current BetterToken documentation for n8n or model catalog; this article does not hard-code a dynamic ID.
How to assemble a minimal AI workflow
1. Add Manual Trigger
Create a new workflow and add Manual Trigger. While testing is underway, do not publish workflow: n8n recommends using manual executions when building and testing.
2. Set up AI Agent
Connect Manual Trigger to AI Agent. In the prompt options, select an input that allows you to specify fixed text and use:
Do not connect Tool nodes. This test requires a response from the model, not agent automation.
3. Connect OpenAI Chat Model
In the OpenAI Chat Model subnode:
- select the created BetterToken credential;
- select the exact Model ID;
- for the first request, turn off Use Responses API and use Chat Completions;
- set the final Timeout;
- set Max Retries to the minimum value that the current version of n8n allows.
The Model, Use Responses API, Timeout and Max Retries parameters are described on OpenAI Chat Model official page.
Responses API and built-in Web Search, File Search or Code Interpreter are not included in this test. Their presence in the n8n interface does not confirm support for the selected model or endpoint.
4. Execute exactly one manual run
Click Execute Workflow. A successful result should contain JSON with workflow: "n8n" and sum: 4. Don't restart immediately if node returns an error: first define its class.
Where to look at the execution log
Open Executions for the current workflow and select manual execution. Check:
- general status execution;
- start time and duration;
- AI Agent input and output;
- node where the process stopped;
- error text without copying credential or sensitive prompt.
n8n distinguishes between manual and production executions. Manual run is launched from editor and is suitable for testing; production execution starts automatically after publishing a workflow or from a trigger. Until the provider is verified, leave the workflow unpublished.
The differences between execution types and execution lists are documented in n8n executions documentation.
Execution data can contain the input and output of a node. For sensitive workflows, n8n supports redaction, which hides data while preserving metadata like status, timing and node names. In this instruction, the prompt does not contain personal data or secret.
How to limit retries and troubleshoot the error
Automatic retry is only useful for temporary errors. It also creates additional API requests, so it affects the cost and complicates the mapping to a single execution.
401/ Unauthorized: do not repeat automatically; check the API Key and extra spaces first.403: do not repeat automatically; check Key access to the selected model.404/ model not found: do not repeat automatically; check Base URL and exact Model ID.429: allow only limited repetition after a pause; check the rate limit and the number of parallel runs.5xx/ timeout: do not exceed the specified limit; check the provider status, Timeout and prompt size.- Workflow error: do not repeat before diagnostics; check node, expression and input data.
For the first test, keep Max Retries to a minimum and do not add a loop, Wait + retry, or error workflow with the new API call. If you need retry in production, set the final number of retries and delay, and then check how many requests appeared in the Dashboard.
n8n error workflow is useful for failure notifications, but the notification itself is an external side effect. Add it only after a separate check and with your own limits.
The Error Trigger mechanism and the composition of the failed execution data are described in the official error handling manual.
How to check Token and value in Dashboard
Open BetterToken Dashboard immediately after one manual run. Match:
- narrow startup time in n8n and query time in Dashboard;
- Model ID in OpenAI Chat Model and model in the usage record;
- successful or error status;
- input, output and applicable cache Token;
- the corresponding expense for this entry.
Do not calculate the value based on the old article or a fixed number per million Token. Model and price vary; take the actual charge for one call from the Dashboard, and the current rate from BetterToken pricing page.
If one manual execution matches multiple lines in the Dashboard, check Max Retries and Agent behavior. One visible workflow run can cause several model requests, especially with agent loop or Responses tools. Therefore, the first check uses a fixed prompt, without tools and with minimal repetition.
Frequent errors
Credential test returns 401
Recreate the OpenAI type credential, remove the spaces around the API Key and make sure the API Key mode is selected and not OpenAI Account. Do not display the key in the execution log.
Credential test or node returns 404
Base URL should be https://www.bettertoken.ai/v1. Don't add /models or endpoint. Then reload the Model and select the current ID.
Regular Chat works, but Agent tools doesn't
Return to the minimal workflow: turn off Use Responses API, remove Tool nodes and repeat one fixed prompt. This will separate the provider connection from the specific tool or workflow restriction.
Execution successful, but Dashboard shows multiple requests
Check Max Retries and agent loop. Compare timestamps and statuses. Don't manually sum the lines as one call if n8n actually sent multiple requests.
FAQ
Do I need to publish a workflow for review?
No. Manual execution from editor is enough. The publication includes production triggers and can trigger external actions without additional confirmation.
Can I use the Responses API?
This is possible only after a separate check of the selected model and endpoint. For the first connection, use regular Chat Completions without built-in OpenAI tools.
Where is the BetterToken API Key stored?
In credential n8n type OpenAI. Don't duplicate it in node parameters, workflow JSON, prompt or repository.
How to understand the real cost of one workflow?
Execute one manual run with minimal retries and match the execution time, Model ID and status with the BetterToken Dashboard entry. Take Token and consumption from this post, and not from the estimated example.