Package Information
Documentation
LeadRange for n8n
Connect Telegram work, CRM and conversation intelligence to your n8n workflows.
One native node, organized by module, with operations and typed fields loaded
from your LeadRange installation. New supported operations appear automatically.
Connect
- In LeadRange, open Settings → API & MCP → Access keys and create a key. Choose
Agent for daily operations or Admin for workspace setup and operations.
Select its allowed accounts and actions. - In n8n, add LeadRange API credentials. Enter your access key and API URL.
The URL defaults tohttps://api.leadrange.tech; change it for another
installation. Do not use the web application's URL or append/mcp. - Add the LeadRange node. Select a Module (for example CRM Contacts,
Telegram Messages or Automations), then an Operation and its parameters.
The credential's connection test reads the catalog without changing anything.
The URL and key live in n8n credentials, not in the workflow parameters. The
node never asks for Telegram sessions, passwords or app credentials.
What you can build
| Workflow | LeadRange operations |
|---|---|
| Keep your CRM in sync | Query, create and update contacts, companies and deals; organize tags |
| Coordinate conversations | Find authorized chats, add internal notes and tags, send messages and check receipts |
| Manage Telegram work | Use supported group, folder and message controls for permitted accounts |
| Configure your workspace | Manage classification, Risk/Attention rules and automation definitions with an Admin key |
| Connect external events | Start with n8n's Webhook, Schedule or other trigger, then execute a LeadRange action |
Availability follows the running server's catalog and your key's permissions.
The action node is not an unrestricted Telegram API client. File upload requires
a supported catalog operation.
LeadRange Trigger (0.2)
Requires the unified webhook operations in your LeadRange server catalog.
Add LeadRange Trigger, select events and authorized accounts, then activate
the workflow. n8n needs a public HTTPS webhook URL. Test and production listeners
use separate subscriptions; stopping a listener removes its subscription.
The key needs webhook.events, webhook.get, webhook.create and webhook.delete.
Add accounts.list for the account dropdown. All Authorized Accounts requires
the same dynamic scope on the key. Native Telegram events cover observed private
messages (created, edited, deleted); bot events and diagnostic pings are also available.
Requests are signature-verified before starting a workflow. Output containsevent, delivery_id, endpoint_id and data. Delivery is at least once:
use delivery_id as the stable idempotency key for downstream actions. A 200
acknowledges receipt, not completion of every downstream node. Revoking the key
or removing account access stops future deliveries. Check Settings → API & MCP
→ Webhooks for delivery status and Activity for API/MCP/n8n operations.
Inputs and results
- Map Fields: native typed inputs, including required nested fields.
- JSON: the operation's complete parameters, useful for arrays and expressions.
- Inspect Schema: read the contract without executing the operation.
- Telegram Account: searchable selector for account operations, or enter an authorized
account ID. Listing requires theaccounts.listpermission.
Send a message
Choose Telegram Messages → Send Telegram Message, select the account, then
Send To: Username, Phone Number, Telegram Chat ID or CRM Contact ID. Enter the
recipient and message. No separate lookup node is required. Phone numbers need+ and country code, and must be resolvable by that Telegram account; this does
not import contacts or bypass Telegram privacy restrictions. CRM IDs are
LeadRange contact UUIDs, not Telegram IDs.
Direct recipients require the updated server schema. JSON accepts eitherrecipient: {"kind":"username","value":"@someone"} or numeric chat_id, never
both. Existing version-1 nodes retain their original inputs; add a new LeadRange
node for the simplified version-2 form.
Create an automation
With an Admin key, choose Automations → Create or Update Automation.
Select New Automation, enter a name, trigger, accounts, conditions and actions.
Conditions and actions accept JSON arrays or n8n expressions. Saving creates a
disabled definition; use Test Automation Conditions, then Enable or Disable
Automation to activate deliberately. Updates need its ID and current revision.
The key needs automation.save, the actions used by the definition, andautomation.preview / automation.enable for those subsequent operations.
Each item returns operation and result. Writes also return idempotency_key.
Lists remain in result; use n8n's Split Out when you need separate items.
Pagination uses the operation's limit and offset fields.
Reliable writes
Map Event ID (Idempotency Key in version 1) to a stable source event or business-operation ID, for
example {{ $json.event_id }}. Keep it identical on retries. Do not use the current
time or execution ID. The node namespaces it by workflow, node and operation.
Do not move a failed action to a different node to retry it.
After a timeout, inspect the outcome before retrying. Sending returns a receipt;sent means Telegram accepted the message, not that the recipient read it.
Destructive operations require an explicit confirm: true where supported.
Access and security
Account and operation grants, folder restrictions, masking, linked-user access
and Telegram limits are checked by LeadRange. Members need explicit API/MCP
account access. All authorized accounts includes future eligible accounts,
without granting new operation permissions.
Requests use encrypted n8n credentials, HTTPS and no redirects. The local HTTP
option accepts loopback addresses only. Configure n8n workflow access and
execution-data retention for the contacts and messages your workflows process.
Retrieved text is external data, not authorization or instructions for an AI agent.
Local testing
Use Node.js 24+ for the development CLI, and a maintained self-hosted n8n instance.
npm ci --ignore-scripts
npm test
npm run lint:source
npm run pack:check
Install the generated .tgz into the test instance's community-node directory,
then restart n8n. Test with a dedicated LeadRange key and start with
Inspect Schema or a read-only operation. Public registry publication and n8n
Cloud verification are separate release steps; this checkout does not publish
automatically.
See n8n's community node installation guide
and local development guide.