
Screenshot: every node completing successfully in a live n8n test run.
This n8n workflow automates the process of triggering an action related to Invoice Ninja when the ‘execute’ button is clicked. It consists of two nodes that work together to facilitate this automation.
Node Breakdown
-
On clicking ‘execute’
This is a manual trigger node that starts the workflow when the user clicks the ‘execute’ button. -
Invoice Ninja
This node interacts with the Invoice Ninja API to perform actions related to invoices, such as creating or updating invoices based on the workflow’s configuration.
Integrations Required
- Invoice Ninja API (mocked for this test)
This integration is necessary for the workflow to interact with the Invoice Ninja service. During testing, API calls were stubbed with mock data to verify the workflow’s logic and data flow without using live credentials.
Real Bug Found
The template’s JavaScript Code node contained HTML-encoded syntax (=> instead of =>) left over from how the template was exported. This caused the arrow function to crash, breaking the workflow until it was fixed.
Troubleshooting
If you encounter an error related to the JavaScript Code node, check for HTML-encoded syntax in your code. The symptom will be a crash in the arrow function, which can be resolved by replacing any instances of => with =>.
To adapt this workflow for your needs, you can modify the parameters in the Invoice Ninja node to suit your specific invoicing requirements or expand the workflow by adding additional nodes for further processing.
View the tested workflow JSON (import directly into n8n)
{
"name": "Untitled Workflow 534",
"nodes": [
{
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
220,
310
],
"parameters": {
"path": "test-534",
"options": {}
},
"typeVersion": 1
},
{
"name": "Invoice Ninja",
"type": "n8n-nodes-base.set",
"position": [
410,
310
],
"parameters": {
"assignments": {
"assignments": [
{
"id": "mock1a",
"name": "success",
"type": "boolean",
"value": true
},
{
"id": "mock1b",
"name": "ok",
"type": "boolean",
"value": true
},
{
"id": "mock1c",
"name": "row",
"type": "number",
"value": 1
},
{
"id": "mock1d",
"name": "output.string",
"type": "string",
"value": "[]"
},
{
"id": "mock1e",
"name": "channel",
"type": "string",
"value": "mock-channel"
}
]
},
"options": {}
},
"typeVersion": 3.4
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Invoice Ninja",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {}
}