@bitavu/n8n-nodes-bitavu 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +110 -107
- package/dist/credentials/BitavuApi.credentials.js +28 -0
- package/dist/nodes/Bitavu/Bitavu.node.js +2 -41
- package/dist/nodes/Bitavu/bitavu.svg +1 -1
- package/examples/bitavu-generate-pdf.json +130 -130
- package/package.json +77 -69
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Bitavu
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bitavu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,107 +1,110 @@
|
|
|
1
|
-
# @bitavu/n8n-nodes-bitavu
|
|
2
|
-
|
|
3
|
-
Generate PDFs from [Bitavu](https://bitavu.com)'s visual templates and data in
|
|
4
|
-
your n8n workflow. Design and test the layout in Studio, save a version, then
|
|
5
|
-
use **Bitavu → Generate PDF**.
|
|
6
|
-
|
|
7
|
-
The [HTTP Request guide](https://bitavu.com/support/n8n) remains available for
|
|
8
|
-
n8n Cloud and self-hosted instances. n8n verification of this node is pending.
|
|
9
|
-
|
|
10
|
-
## Installation
|
|
11
|
-
|
|
12
|
-
Self-hosted n8n owners can install `@bitavu/n8n-nodes-bitavu`
|
|
13
|
-
through **Settings → Community nodes → Install**. Follow
|
|
14
|
-
[n8n's installation instructions](https://docs.n8n.io/integrations/community-nodes/installation/).
|
|
15
|
-
n8n Cloud requires a verified community node; this package is not yet verified.
|
|
16
|
-
|
|
17
|
-
## Credentials
|
|
18
|
-
|
|
19
|
-
Create a **Bitavu API** credential and paste your API key. In Studio's
|
|
20
|
-
**Integrations → API keys**, reuse a suitable active key or create one with
|
|
21
|
-
**Generate PDFs** permission for the report. **Read templates** is not needed.
|
|
22
|
-
Keep the secret in Credentials, never in exported workflow JSON.
|
|
23
|
-
|
|
24
|
-
Credential testing
|
|
25
|
-
|
|
26
|
-
A successful check confirms the key is recognized; report access, subscription
|
|
27
|
-
and remaining allowance are checked when rendering.
|
|
28
|
-
|
|
29
|
-
## Generate a PDF
|
|
30
|
-
|
|
31
|
-
1. Design a report in [Studio](https://studio.bitavu.com), bind the changing
|
|
32
|
-
content to fields, save a version and test it.
|
|
33
|
-
2. Copy **templateId**, numeric **revision** and **data** from **Integrations →
|
|
34
|
-
Prepare a template request → Use in your app**.
|
|
35
|
-
3. Add **Bitavu → Generate PDF** and select your credential.
|
|
36
|
-
4. Set **Template ID**, **Saved Version** and **Document Data**. Map the JSON
|
|
37
|
-
object using an expression such as `{{ $json.data }}` or `{{ $json }}`.
|
|
38
|
-
5. Execute. Each input item produces a PDF in the **pdf** binary field, ready
|
|
39
|
-
for an email, file-storage or other node accepting binary data.
|
|
40
|
-
|
|
41
|
-
The node calls `POST https://api.bitavu.com/v1/render`, handles Bearer
|
|
42
|
-
authentication and binary PDF output, and keeps TLS verification enabled.
|
|
43
|
-
It preserves input JSON, existing binary fields and item pairing, and adds
|
|
44
|
-
`bitavu` metadata with the template, version, operation ID and filename.
|
|
45
|
-
|
|
46
|
-
Any saved Bitavu report works when the supplied data matches that version.
|
|
47
|
-
`examples/bitavu-generate-pdf.json` uses fictional data with the starter invoice
|
|
48
|
-
(`invoice`, saved version 1) and contains no credentials.
|
|
49
|
-
|
|
50
|
-
## Options and retries
|
|
51
|
-
|
|
52
|
-
- **File Name:** defaults to `<templateId>.pdf`.
|
|
53
|
-
- **Output Binary Field:** defaults to `pdf`.
|
|
54
|
-
- **Operation ID:** optional 16–128 letters, digits, underscores or hyphens.
|
|
55
|
-
Reuse only for identical input.
|
|
56
|
-
|
|
57
|
-
Automatic IDs distinguish executions, nodes, loop iterations and items and stay
|
|
58
|
-
stable when n8n retries the node within one execution. A new execution creates
|
|
59
|
-
new IDs and can consume new credits. For retries across executions, retain a
|
|
60
|
-
unique ID upstream and map it to **Options → Operation ID**. Reusing an ID with
|
|
61
|
-
different data returns a conflict; the node does not hide it by changing the ID.
|
|
62
|
-
|
|
63
|
-
There are no internal automatic retries. Configure retries in n8n and respect
|
|
64
|
-
`Retry-After` for rate limits. After an uncertain network result, retry with the
|
|
65
|
-
same ID and input. Request timeout: 120 seconds.
|
|
66
|
-
|
|
67
|
-
## Errors and privacy
|
|
68
|
-
|
|
69
|
-
Errors explain invalid keys, missing permissions, template/version/data
|
|
70
|
-
mismatches, operation conflicts and allowance limits. Use n8n error workflows
|
|
71
|
-
or **On Error** settings to handle failures.
|
|
72
|
-
|
|
73
|
-
The node does not log keys, document data or PDFs, read files or access
|
|
74
|
-
environment variables. It calls only `api.bitavu.com` and follows no redirects.
|
|
75
|
-
n8n may store execution data and files according to your retention settings.
|
|
76
|
-
Bitavu does not retain render payloads or generated PDFs; explicitly saved
|
|
77
|
-
templates and account records remain stored.
|
|
78
|
-
|
|
79
|
-
## Development and release
|
|
80
|
-
|
|
81
|
-
Scaffolded with n8n's official node CLI. No runtime dependencies. Development
|
|
82
|
-
uses `n8n-workflow` 2.46.5, matching the tested n8n 2.46.7 instance.
|
|
83
|
-
|
|
84
|
-
```sh
|
|
85
|
-
npm ci --ignore-scripts
|
|
86
|
-
npm
|
|
87
|
-
npm run
|
|
88
|
-
npm
|
|
89
|
-
npm run
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
for
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
1
|
+
# @bitavu/n8n-nodes-bitavu
|
|
2
|
+
|
|
3
|
+
Generate PDFs from [Bitavu](https://bitavu.com)'s visual templates and data in
|
|
4
|
+
your n8n workflow. Design and test the layout in Studio, save a version, then
|
|
5
|
+
use **Bitavu → Generate PDF**.
|
|
6
|
+
|
|
7
|
+
The [HTTP Request guide](https://bitavu.com/support/n8n) remains available for
|
|
8
|
+
n8n Cloud and self-hosted instances. n8n verification of this node is pending.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
Self-hosted n8n owners can install `@bitavu/n8n-nodes-bitavu`
|
|
13
|
+
through **Settings → Community nodes → Install**. Follow
|
|
14
|
+
[n8n's installation instructions](https://docs.n8n.io/integrations/community-nodes/installation/).
|
|
15
|
+
n8n Cloud requires a verified community node; this package is not yet verified.
|
|
16
|
+
|
|
17
|
+
## Credentials
|
|
18
|
+
|
|
19
|
+
Create a **Bitavu API** credential and paste your API key. In Studio's
|
|
20
|
+
**Integrations → API keys**, reuse a suitable active key or create one with
|
|
21
|
+
**Generate PDFs** permission for the report. **Read templates** is not needed.
|
|
22
|
+
Keep the secret in Credentials, never in exported workflow JSON.
|
|
23
|
+
|
|
24
|
+
Credential testing sends an authenticated, read-only `GET /v1/credentials/check`
|
|
25
|
+
request. It does not read reports, generate a PDF or consume render credits.
|
|
26
|
+
A successful check confirms the key is recognized; report access, subscription
|
|
27
|
+
and remaining allowance are checked when rendering.
|
|
28
|
+
|
|
29
|
+
## Generate a PDF
|
|
30
|
+
|
|
31
|
+
1. Design a report in [Studio](https://studio.bitavu.com), bind the changing
|
|
32
|
+
content to fields, save a version and test it.
|
|
33
|
+
2. Copy **templateId**, numeric **revision** and **data** from **Integrations →
|
|
34
|
+
Prepare a template request → Use in your app**.
|
|
35
|
+
3. Add **Bitavu → Generate PDF** and select your credential.
|
|
36
|
+
4. Set **Template ID**, **Saved Version** and **Document Data**. Map the JSON
|
|
37
|
+
object using an expression such as `{{ $json.data }}` or `{{ $json }}`.
|
|
38
|
+
5. Execute. Each input item produces a PDF in the **pdf** binary field, ready
|
|
39
|
+
for an email, file-storage or other node accepting binary data.
|
|
40
|
+
|
|
41
|
+
The node calls `POST https://api.bitavu.com/v1/render`, handles Bearer
|
|
42
|
+
authentication and binary PDF output, and keeps TLS verification enabled.
|
|
43
|
+
It preserves input JSON, existing binary fields and item pairing, and adds
|
|
44
|
+
`bitavu` metadata with the template, version, operation ID and filename.
|
|
45
|
+
|
|
46
|
+
Any saved Bitavu report works when the supplied data matches that version.
|
|
47
|
+
`examples/bitavu-generate-pdf.json` uses fictional data with the starter invoice
|
|
48
|
+
(`invoice`, saved version 1) and contains no credentials.
|
|
49
|
+
|
|
50
|
+
## Options and retries
|
|
51
|
+
|
|
52
|
+
- **File Name:** defaults to `<templateId>.pdf`.
|
|
53
|
+
- **Output Binary Field:** defaults to `pdf`.
|
|
54
|
+
- **Operation ID:** optional 16–128 letters, digits, underscores or hyphens.
|
|
55
|
+
Reuse only for identical input.
|
|
56
|
+
|
|
57
|
+
Automatic IDs distinguish executions, nodes, loop iterations and items and stay
|
|
58
|
+
stable when n8n retries the node within one execution. A new execution creates
|
|
59
|
+
new IDs and can consume new credits. For retries across executions, retain a
|
|
60
|
+
unique ID upstream and map it to **Options → Operation ID**. Reusing an ID with
|
|
61
|
+
different data returns a conflict; the node does not hide it by changing the ID.
|
|
62
|
+
|
|
63
|
+
There are no internal automatic retries. Configure retries in n8n and respect
|
|
64
|
+
`Retry-After` for rate limits. After an uncertain network result, retry with the
|
|
65
|
+
same ID and input. Request timeout: 120 seconds.
|
|
66
|
+
|
|
67
|
+
## Errors and privacy
|
|
68
|
+
|
|
69
|
+
Errors explain invalid keys, missing permissions, template/version/data
|
|
70
|
+
mismatches, operation conflicts and allowance limits. Use n8n error workflows
|
|
71
|
+
or **On Error** settings to handle failures.
|
|
72
|
+
|
|
73
|
+
The node does not log keys, document data or PDFs, read files or access
|
|
74
|
+
environment variables. It calls only `api.bitavu.com` and follows no redirects.
|
|
75
|
+
n8n may store execution data and files according to your retention settings.
|
|
76
|
+
Bitavu does not retain render payloads or generated PDFs; explicitly saved
|
|
77
|
+
templates and account records remain stored.
|
|
78
|
+
|
|
79
|
+
## Development and release
|
|
80
|
+
|
|
81
|
+
Scaffolded with n8n's official node CLI. No runtime dependencies. Development
|
|
82
|
+
uses `n8n-workflow` 2.46.5, matching the tested n8n 2.46.7 instance.
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
npm ci --ignore-scripts
|
|
86
|
+
npm test
|
|
87
|
+
npm run lint
|
|
88
|
+
npm run typecheck
|
|
89
|
+
npm run vetting:check
|
|
90
|
+
npm run dev
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Vetting checks both source and the packed package with n8n's scanner, with inline
|
|
94
|
+
lint suppressions disabled. The build restores the pinned TypeScript compiler's
|
|
95
|
+
command shim because the scanner brings a separate TypeScript compiler for its
|
|
96
|
+
own development tooling.
|
|
97
|
+
|
|
98
|
+
Programmatic execution keeps PDF validation, binary output, item pairing and
|
|
99
|
+
execution/node/run/item idempotency together. PDF binary output remains a
|
|
100
|
+
regular workflow result, with AI tool generation disabled. Credentials use
|
|
101
|
+
n8n's standard declarative credential test.
|
|
102
|
+
|
|
103
|
+
Run the Publish workflow manually on the tag for the package version. Supply
|
|
104
|
+
the SHA-256 of the reviewed tarball. The workflow builds and audits the package,
|
|
105
|
+
then publishes with npm provenance if the tarball matches. Configure npm trusted
|
|
106
|
+
publishing for `bitavu/n8n-nodes-bitavu`, workflow `publish.yml`, environment `npm`.
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
[MIT](LICENSE)
|
|
@@ -42,6 +42,34 @@ class BitavuApi {
|
|
|
42
42
|
type: 'generic',
|
|
43
43
|
properties: { headers: { Authorization: '=Bearer {{$credentials.apiKey}}' } },
|
|
44
44
|
};
|
|
45
|
+
this.test = {
|
|
46
|
+
request: {
|
|
47
|
+
baseURL: 'https://api.bitavu.com',
|
|
48
|
+
url: '/v1/credentials/check',
|
|
49
|
+
method: 'GET',
|
|
50
|
+
json: true,
|
|
51
|
+
disableFollowRedirect: true,
|
|
52
|
+
timeout: 15000,
|
|
53
|
+
},
|
|
54
|
+
rules: [
|
|
55
|
+
{
|
|
56
|
+
type: 'responseSuccessBody',
|
|
57
|
+
properties: {
|
|
58
|
+
key: 'authenticated',
|
|
59
|
+
value: false,
|
|
60
|
+
message: 'Bitavu did not accept this API key.',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'responseSuccessBody',
|
|
65
|
+
properties: {
|
|
66
|
+
key: 'authenticated',
|
|
67
|
+
value: undefined,
|
|
68
|
+
message: 'Bitavu returned an unexpected credential-check response.',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
};
|
|
45
73
|
}
|
|
46
74
|
}
|
|
47
75
|
exports.BitavuApi = BitavuApi;
|
|
@@ -19,12 +19,13 @@ class Bitavu {
|
|
|
19
19
|
icon: { light: 'file:bitavu.svg', dark: 'file:bitavu.svg' },
|
|
20
20
|
group: ['transform'],
|
|
21
21
|
version: 1,
|
|
22
|
+
usableAsTool: undefined,
|
|
22
23
|
subtitle: '={{$parameter["operation"] === "generate" ? "Generate PDF" : ""}}',
|
|
23
24
|
description: 'Generate PDFs from visual templates and JSON data',
|
|
24
25
|
defaults: { name: 'Bitavu' },
|
|
25
26
|
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
26
27
|
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
27
|
-
credentials: [{ name: 'bitavuApi', required: true
|
|
28
|
+
credentials: [{ name: 'bitavuApi', required: true }],
|
|
28
29
|
properties: [
|
|
29
30
|
{ displayName: 'Resource', name: 'resource', type: 'hidden', default: 'document' },
|
|
30
31
|
{
|
|
@@ -101,46 +102,6 @@ class Bitavu {
|
|
|
101
102
|
},
|
|
102
103
|
],
|
|
103
104
|
};
|
|
104
|
-
this.methods = {
|
|
105
|
-
credentialTest: {
|
|
106
|
-
async bitavuApiTest(credential) {
|
|
107
|
-
var _a, _b;
|
|
108
|
-
try {
|
|
109
|
-
const response = await this.helpers.request({
|
|
110
|
-
method: 'GET',
|
|
111
|
-
uri: 'https://api.bitavu.com/v1/templates/n8n-credential-check?revision=1',
|
|
112
|
-
headers: { Authorization: `Bearer ${(_a = credential.data) === null || _a === void 0 ? void 0 : _a.apiKey}` },
|
|
113
|
-
json: true,
|
|
114
|
-
resolveWithFullResponse: true,
|
|
115
|
-
simple: false,
|
|
116
|
-
followRedirect: false,
|
|
117
|
-
followAllRedirects: false,
|
|
118
|
-
timeout: 15000,
|
|
119
|
-
});
|
|
120
|
-
if (response.statusCode === 200 ||
|
|
121
|
-
(response.statusCode === 403 &&
|
|
122
|
-
['KEY_SCOPE', 'KEY_REPORT'].includes((_b = response.body) === null || _b === void 0 ? void 0 : _b.code))) {
|
|
123
|
-
return {
|
|
124
|
-
status: 'OK',
|
|
125
|
-
message: 'Bitavu recognized your API key. Report access and render allowance are checked when generating a PDF.',
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
return {
|
|
129
|
-
status: 'Error',
|
|
130
|
-
message: response.statusCode === 401
|
|
131
|
-
? 'The API key is invalid, expired or revoked.'
|
|
132
|
-
: 'Could not verify this key. Check the key and try again.',
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
return {
|
|
137
|
-
status: 'Error',
|
|
138
|
-
message: 'Could not connect to Bitavu. Check your network connection and try again.',
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
105
|
}
|
|
145
106
|
async execute() {
|
|
146
107
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-label="Bitavu icon"><rect width="512" height="512" rx="112" fill="#ecd06f"/><path d="M160 92H294L384 182V380C384 404 364 424 340 424H160C136 424 116 404 116 380V136C116 112 136 92 160 92ZM182 222V272H280C295 272 306 261 306 247C306 233 295 222 280 222H182ZM182 306V362H286C302 362 314 350 314 334C314 318 302 306 286 306H182Z" fill="#2779a7" fill-rule="evenodd"/><path d="M294 92V144C294 168 308 182 332 182H384L294 92Z" fill="#49c5b6"/></svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-label="Bitavu icon"><rect width="512" height="512" rx="112" fill="#ecd06f"/><path d="M160 92H294L384 182V380C384 404 364 424 340 424H160C136 424 116 404 116 380V136C116 112 136 92 160 92ZM182 222V272H280C295 272 306 261 306 247C306 233 295 222 280 222H182ZM182 306V362H286C302 362 314 350 314 334C314 318 302 306 286 306H182Z" fill="#2779a7" fill-rule="evenodd"/><path d="M294 92V144C294 168 308 182 332 182H384L294 92Z" fill="#49c5b6"/></svg>
|
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Bitavu - Generate a PDF with the Bitavu node",
|
|
3
|
-
"nodes": [
|
|
4
|
-
{
|
|
5
|
-
"parameters": {},
|
|
6
|
-
"id": "manual-trigger",
|
|
7
|
-
"name": "Run example",
|
|
8
|
-
"type": "n8n-nodes-base.manualTrigger",
|
|
9
|
-
"typeVersion": 1,
|
|
10
|
-
"position": [
|
|
11
|
-
0,
|
|
12
|
-
0
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"parameters": {
|
|
17
|
-
"assignments": {
|
|
18
|
-
"assignments": [
|
|
19
|
-
{
|
|
20
|
-
"id": "template",
|
|
21
|
-
"name": "templateId",
|
|
22
|
-
"value": "invoice",
|
|
23
|
-
"type": "string"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"id": "revision",
|
|
27
|
-
"name": "revision",
|
|
28
|
-
"value": 1,
|
|
29
|
-
"type": "number"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"id": "input",
|
|
33
|
-
"name": "data",
|
|
34
|
-
"value": {
|
|
35
|
-
"invoice": {
|
|
36
|
-
"number": "N8N-2087",
|
|
37
|
-
"date": "2026-11-10",
|
|
38
|
-
"due": "2026-11-24"
|
|
39
|
-
},
|
|
40
|
-
"client": {
|
|
41
|
-
"name": "Workflow demo customer",
|
|
42
|
-
"address": "Fictional workflow address"
|
|
43
|
-
},
|
|
44
|
-
"items": [
|
|
45
|
-
{
|
|
46
|
-
"description": "Workflow setup",
|
|
47
|
-
"quantity": 1,
|
|
48
|
-
"unitPrice": 240
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"description": "Monthly automation",
|
|
52
|
-
"quantity": 2,
|
|
53
|
-
"unitPrice": 90
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"notes": "Generated with data supplied by n8n. Fictional sample data."
|
|
57
|
-
},
|
|
58
|
-
"type": "object"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"id": "operation",
|
|
62
|
-
"name": "operationId",
|
|
63
|
-
"value": "={{ 'bitavu-n8n-operation-' + $execution.id + '-' + $itemIndex }}",
|
|
64
|
-
"type": "string"
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
"options": {}
|
|
69
|
-
},
|
|
70
|
-
"id": "sample-data",
|
|
71
|
-
"name": "Invoice data",
|
|
72
|
-
"type": "n8n-nodes-base.set",
|
|
73
|
-
"typeVersion": 3.4,
|
|
74
|
-
"position": [
|
|
75
|
-
280,
|
|
76
|
-
0
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"id": "generate-pdf",
|
|
81
|
-
"name": "Generate PDF with Bitavu",
|
|
82
|
-
"type": "@bitavu/n8n-nodes-bitavu.bitavu",
|
|
83
|
-
"typeVersion": 1,
|
|
84
|
-
"position": [
|
|
85
|
-
560,
|
|
86
|
-
0
|
|
87
|
-
],
|
|
88
|
-
"parameters": {
|
|
89
|
-
"resource": "document",
|
|
90
|
-
"operation": "generate",
|
|
91
|
-
"templateId": "={{ $json.templateId }}",
|
|
92
|
-
"revision": "={{ $json.revision }}",
|
|
93
|
-
"data": "={{ $json.data }}",
|
|
94
|
-
"options": {
|
|
95
|
-
"operationId": "={{ $json.operationId }}"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
],
|
|
100
|
-
"connections": {
|
|
101
|
-
"Run example": {
|
|
102
|
-
"main": [
|
|
103
|
-
[
|
|
104
|
-
{
|
|
105
|
-
"node": "Invoice data",
|
|
106
|
-
"type": "main",
|
|
107
|
-
"index": 0
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
"Invoice data": {
|
|
113
|
-
"main": [
|
|
114
|
-
[
|
|
115
|
-
{
|
|
116
|
-
"node": "Generate PDF with Bitavu",
|
|
117
|
-
"type": "main",
|
|
118
|
-
"index": 0
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"settings": {
|
|
125
|
-
"executionOrder": "v1"
|
|
126
|
-
},
|
|
127
|
-
"active": false,
|
|
128
|
-
"pinData": {},
|
|
129
|
-
"tags": []
|
|
130
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "Bitavu - Generate a PDF with the Bitavu node",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"parameters": {},
|
|
6
|
+
"id": "manual-trigger",
|
|
7
|
+
"name": "Run example",
|
|
8
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
9
|
+
"typeVersion": 1,
|
|
10
|
+
"position": [
|
|
11
|
+
0,
|
|
12
|
+
0
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"parameters": {
|
|
17
|
+
"assignments": {
|
|
18
|
+
"assignments": [
|
|
19
|
+
{
|
|
20
|
+
"id": "template",
|
|
21
|
+
"name": "templateId",
|
|
22
|
+
"value": "invoice",
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "revision",
|
|
27
|
+
"name": "revision",
|
|
28
|
+
"value": 1,
|
|
29
|
+
"type": "number"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "input",
|
|
33
|
+
"name": "data",
|
|
34
|
+
"value": {
|
|
35
|
+
"invoice": {
|
|
36
|
+
"number": "N8N-2087",
|
|
37
|
+
"date": "2026-11-10",
|
|
38
|
+
"due": "2026-11-24"
|
|
39
|
+
},
|
|
40
|
+
"client": {
|
|
41
|
+
"name": "Workflow demo customer",
|
|
42
|
+
"address": "Fictional workflow address"
|
|
43
|
+
},
|
|
44
|
+
"items": [
|
|
45
|
+
{
|
|
46
|
+
"description": "Workflow setup",
|
|
47
|
+
"quantity": 1,
|
|
48
|
+
"unitPrice": 240
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"description": "Monthly automation",
|
|
52
|
+
"quantity": 2,
|
|
53
|
+
"unitPrice": 90
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"notes": "Generated with data supplied by n8n. Fictional sample data."
|
|
57
|
+
},
|
|
58
|
+
"type": "object"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "operation",
|
|
62
|
+
"name": "operationId",
|
|
63
|
+
"value": "={{ 'bitavu-n8n-operation-' + $execution.id + '-' + $itemIndex }}",
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"options": {}
|
|
69
|
+
},
|
|
70
|
+
"id": "sample-data",
|
|
71
|
+
"name": "Invoice data",
|
|
72
|
+
"type": "n8n-nodes-base.set",
|
|
73
|
+
"typeVersion": 3.4,
|
|
74
|
+
"position": [
|
|
75
|
+
280,
|
|
76
|
+
0
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "generate-pdf",
|
|
81
|
+
"name": "Generate PDF with Bitavu",
|
|
82
|
+
"type": "@bitavu/n8n-nodes-bitavu.bitavu",
|
|
83
|
+
"typeVersion": 1,
|
|
84
|
+
"position": [
|
|
85
|
+
560,
|
|
86
|
+
0
|
|
87
|
+
],
|
|
88
|
+
"parameters": {
|
|
89
|
+
"resource": "document",
|
|
90
|
+
"operation": "generate",
|
|
91
|
+
"templateId": "={{ $json.templateId }}",
|
|
92
|
+
"revision": "={{ $json.revision }}",
|
|
93
|
+
"data": "={{ $json.data }}",
|
|
94
|
+
"options": {
|
|
95
|
+
"operationId": "={{ $json.operationId }}"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"connections": {
|
|
101
|
+
"Run example": {
|
|
102
|
+
"main": [
|
|
103
|
+
[
|
|
104
|
+
{
|
|
105
|
+
"node": "Invoice data",
|
|
106
|
+
"type": "main",
|
|
107
|
+
"index": 0
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"Invoice data": {
|
|
113
|
+
"main": [
|
|
114
|
+
[
|
|
115
|
+
{
|
|
116
|
+
"node": "Generate PDF with Bitavu",
|
|
117
|
+
"type": "main",
|
|
118
|
+
"index": 0
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"settings": {
|
|
125
|
+
"executionOrder": "v1"
|
|
126
|
+
},
|
|
127
|
+
"active": false,
|
|
128
|
+
"pinData": {},
|
|
129
|
+
"tags": []
|
|
130
|
+
}
|
package/package.json
CHANGED
|
@@ -1,69 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bitavu/n8n-nodes-bitavu",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Generate PDFs from saved Bitavu visual templates and workflow data",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"homepage": "https://bitavu.com/support/n8n",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"n8n-community-node-package"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"n8n-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@bitavu/n8n-nodes-bitavu",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Generate PDFs from saved Bitavu visual templates and workflow data",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://bitavu.com/support/n8n",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"n8n-community-node-package",
|
|
9
|
+
"bitavu",
|
|
10
|
+
"pdf",
|
|
11
|
+
"pdf-generation",
|
|
12
|
+
"invoice",
|
|
13
|
+
"templates"
|
|
14
|
+
],
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "bitavu.com",
|
|
17
|
+
"email": "integration+n8n@bitavu.com",
|
|
18
|
+
"url": "https://bitavu.com"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/bitavu/n8n-nodes-bitavu.git"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"prebuild": "npm rebuild typescript --ignore-scripts --offline --no-audit --no-fund",
|
|
26
|
+
"build": "n8n-node build",
|
|
27
|
+
"build:watch": "tsc --watch",
|
|
28
|
+
"dev": "n8n-node dev",
|
|
29
|
+
"lint": "n8n-node lint",
|
|
30
|
+
"lint:fix": "n8n-node lint --fix",
|
|
31
|
+
"test": "npm run build && node --test tests/*.test.cjs",
|
|
32
|
+
"typecheck": "node node_modules/typescript/bin/tsc --noEmit --incremental false",
|
|
33
|
+
"pack:check": "node scripts/check-package.mjs",
|
|
34
|
+
"vetting:check": "npm run pack:check && node scripts/check-vetting.mjs",
|
|
35
|
+
"privacy:check": "node scripts/check-privacy.mjs",
|
|
36
|
+
"publish:artifact": "node scripts/publish-package.mjs",
|
|
37
|
+
"prepublishOnly": "npm run lint && npm test"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist/credentials/*.js",
|
|
41
|
+
"dist/nodes/Bitavu/*.js",
|
|
42
|
+
"dist/nodes/Bitavu/*.json",
|
|
43
|
+
"dist/nodes/Bitavu/*.svg",
|
|
44
|
+
"examples/*.json"
|
|
45
|
+
],
|
|
46
|
+
"n8n": {
|
|
47
|
+
"n8nNodesApiVersion": 1,
|
|
48
|
+
"strict": true,
|
|
49
|
+
"credentials": [
|
|
50
|
+
"dist/credentials/BitavuApi.credentials.js"
|
|
51
|
+
],
|
|
52
|
+
"nodes": [
|
|
53
|
+
"dist/nodes/Bitavu/Bitavu.node.js"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@n8n/node-cli": "0.57.0",
|
|
58
|
+
"@n8n/scan-community-package": "0.43.0",
|
|
59
|
+
"@types/node": "22.19.19",
|
|
60
|
+
"eslint": "9.32.0",
|
|
61
|
+
"n8n-workflow": "2.46.5",
|
|
62
|
+
"prettier": "3.6.2",
|
|
63
|
+
"typescript": "5.9.2"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"n8n-workflow": "*"
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": ">=22.16"
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public"
|
|
73
|
+
},
|
|
74
|
+
"bugs": {
|
|
75
|
+
"url": "https://github.com/bitavu/n8n-nodes-bitavu/issues"
|
|
76
|
+
}
|
|
77
|
+
}
|