n8n-nodes-enerflo-v2
v0.2.0
Published
n8n community node for the Enerflo GraphQL API v2
Maintainers
Readme
n8n-nodes-enerflo-v2
An n8n community node for the Enerflo GraphQL API v2. Exposes every query and mutation in the schema, either through a searchable dropdown or as free-form GraphQL.
Installation
Settings → Community Nodes → Install → n8n-nodes-enerflo-v2
Credentials
| Field | Notes |
| --- | --- |
| GraphQL Endpoint | https://api.enerflo.io/graphql — shared across tenants |
| API Key | Sent as Authorization: Bearer … |
| Org Subdomain | Required. Sent as x-org; this is what routes to your tenant. |
The endpoint is shared — your org is selected by the x-org header, not by the
hostname. Use the subdomain from your Enerflo URL: xyzsolarcompany from
https://xyzsolarcompany.enerflo.io.
Use Test in the credential modal to verify. It issues query { me { id } },
which exercises endpoint, token, and org routing in one call.
Usage
Query / Mutation mode
Pick an operation from the dropdown, supply its arguments in Variables (JSON) keyed by the schema's argument names, and give the selection set in Return Fields.
Return Fields holds only what goes inside the operation — the node builds the wrapper, interpolates arguments, and declares variables from the schema.
Selecting fetchDeal with:
{ "id": "<deal-uuid>" }finalizedProposal {
selectedFinanceQuote {
plugin
activeFinanceApplication {
externalFinanceApplicationId
}
}
}sends:
query FetchDeal($id: String!) {
fetchDeal(id: $id) {
finalizedProposal {
selectedFinanceQuote {
plugin
activeFinanceApplication {
externalFinanceApplicationId
}
}
}
}
}Outer braces on Return Fields are optional. Optional arguments you omit from Variables are left off the query entirely. Missing required arguments fail the node with a message naming them, rather than producing a malformed request. Operations that return a scalar take no selection set — leave Return Fields empty for those.
Custom GraphQL mode
Write the whole operation yourself, including variable declarations. Variables (JSON) is passed through untouched. Use this for multi-root operations, fragments, or aliases.
Options
| Option | Effect |
| --- | --- |
| Return All | Pages through a *List operation until currentPage >= totalPageCount, merging items. Requires items in the selection set. |
| Max Pages | Safety limit for Return All (default 50) |
| Split Items | Emits each list element as its own n8n item |
| Ignore GraphQL Errors | Passes responses containing errors downstream instead of failing |
99 of the 329 queries are paginated and work with Return All.
Error handling
The Enerflo API returns HTTP 200 with a populated errors array on failure.
The node treats that as a node failure by default, so bad requests surface in
n8n rather than flowing downstream as empty successes. Set Ignore GraphQL
Errors if you'd rather handle them yourself.
Regenerating the schema
The Enerflo schema changes without notice. operations.json is generated from a
live introspection:
ENERFLO_TOKEN=your_token ENERFLO_ORG=yourcompany npm run introspect
npm run generateintrospect writes introspection.json; generate reads it if present, so
rebuilds need no network access. Delete it to force a fresh pull.
The generator uses getIntrospectionQuery() and buildClientSchema(), so
argument types are rendered from the schema object and cannot be truncated by
nesting depth.
A weekly GitHub Action (.github/workflows/schema-drift.yml) re-introspects and
opens a PR when the manifest changes. It needs ENERFLO_ENDPOINT,
ENERFLO_TOKEN, and ENERFLO_ORG as repository secrets.
Development
npm install
npm test
npm run buildThe test suite parses every generated operation and asserts each produces exactly one root field.
Changes in 0.2.0
Fixed: Query and Mutation modes sent malformed operations. The operation
name and selection set were concatenated with nothing between them, so arguments
were never interpolated and variables never declared. fetchDeal with a nested
selection produced query { fetchDeal finalizedProposal { … } } — the operation
requested with no arguments and no selection set, and the selection set promoted
to a sibling root field. This parsed as valid GraphQL, so it failed at execution
with a server error rather than a validation message. Custom GraphQL mode was
unaffected.
Schema refreshed. The manifest had drifted: 329 queries and 342 mutations
now, up from 307 and 328. Newly available are the Aurora design integration
(createAuroraDesign, importAuroraProject, syncAuroraDesign,
requestAuroraDesignChanges, approveAuroraRequest, and others), raw finance
passthrough (fetchRawFinanceProductsList, sendRawFinanceApplication,
fetchRawFinanceStipulations, and others), battery recommendations, and
proposal selection (selectProposal, unselectProposal,
restartProposalSelection).
Breaking: assembleDocfloPacketComposite no longer exists in the schema —
it appears to have been replaced by captureDocfloPacketCompositePdf. Any
workflow referencing the old name needs updating.
Also in this release:
- Credential authentication now actually applies. The
authenticateblock was previously dead code, becauseexecute()usedhelpers.httpRequest(which does not apply credentials) and rebuilt the headers by hand. - Org Subdomain is now marked required — it is what routes to your tenant.
- Added a credential test.
- GraphQL errors returned with HTTP 200 now fail the node.
- Malformed Variables JSON raises an error instead of silently becoming
{}. - Missing required arguments are caught before the request is sent.
- Errors use
NodeOperationError/NodeApiErrorso they carry node context. - Operations returning a scalar (25 of them) no longer get an invalid selection set.
- Added
Return Allpagination,Split Items, andIgnore GraphQL Errors. - Node is usable as an AI Agent tool.
n8n-workflowmoved fromdependenciestopeerDependencies.- Fixed the build copying icons to the wrong directory, which left the node without its icon.
- Added repository metadata, a codex file, and a test suite.
- Schema generator rewritten on
buildClientSchema, fixing truncated argument type-refs and recording return types and pagination shape.
License
MIT
