Integrations
n8n
The Lineman community node brings your AI-coding spend, savings, allowance and cost alerts into any n8n workflow, and lets you change budgets, cost centres and alerts from an automation.
Install the node
- 1In n8n, open Settings → Community nodes. If you do not see it, ask whoever administers your n8n instance to enable community nodes.
- 2Choose Install and enter
@lineman-io/n8n-nodes-lineman. - 3The Lineman and Lineman Trigger nodes then appear in the node picker.
Create the credential
- 1In Lineman, go to Dashboard → Keys and create a key. Copy it.
- 2In n8n, add a Lineman API credential and paste the key. Leave the base URL as it is unless you were told otherwise.
Use a durable key, not the one your CLI uses. The token the Lineman CLI and editor plug-in use starts with lmcv1_ and is replaced every few minutes. It will pass the credential test and then fail part-way through a run. Keys created at Dashboard → Keys start with fa_live_ and do not expire.
What your credential can see
The credential can do only what its owner can do in Lineman. An administrator or auditor sees company-wide figures; anyone else sees only their own spend, with scope set to self rather than company. Company-wide steps do not fail for an ordinary member - they narrow quietly, so check that field before treating a number as a company total. Admin operations require an administrator.
The two nodes
- Lineman Trigger starts a workflow when a new company cost alert fires. For faster delivery, point Lineman's alert webhook at an n8n
Webhooknode instead. - Lineman is the action node: pick a resource (Spend, Savings, Company, Members, Repos, Cost Centres, Alerts, Subscription) and an operation.
Reading the numbers
- Money appears twice. Every amount has a
_usdfield (a number, easy to display) and a_microfield (an exact whole number). Use_usdto show,_microwhen you are summing and care about rounding. Never cents. - An empty budget is not zero. A budget that is
nullmeans the member inherits the company default - it does not mean they may spend nothing. - Times are ISO-8601 UTC, so n8n's date nodes work on them directly.
- Windows cap at 92 days. A longer range is rejected - split a bigger export into chunks.