n8n
Trigger an n8n workflow from Budibase
Setup
Within n8n create a Webhook trigger node. Optionally configure the Authentication, and select the desired HTTP Method.

Click on the webhook URL to copy it to clipboard. You can start with the Test URL to make sure things are working as expected before using the Production URL.

Click listen for test event just before you run the automation in Budibase.
Connect additional nodes to your n8n webhook trigger as desired.
Budibase DB node
It is also possible to connect to the Budibase DB within your n8n workflow using the budibase-db-n8n-node.
Read more on installation: Install community nodes in the n8n app.

Install the Budibase DB node

Budibase DB node will then be available
Triggering an n8n workflow from Budibase
First, we will create our automation in Budibase. For this example, we will use app action automation.
With the webhook setup in n8n, and the URL copied, you can now add the n8n
automation action step in your automation.

Adding the n8n action step
Next enter the Webhook URL that you copied, and make sure the Method matches correctly.

Triggering an n8n workflow from a Budibase automation
After running a test of the automation in Budibase. You should see the output on N8N.

Authorization
The authorization field is optional, and represents the Authorization HTTP header.
Consider an n8n webhook with Basic authentication set as user: 'test', password: 'admin'.

The automation action step will return with a 401
error if the Authorization field is not set:

Authorization needs to be set
In the case of Basic auth you need to provide the header in the following format:Basic BASE64_ENCODED(username:password)
, which would look result in something like this:

Keep credentials safe
Ideally you should not save credentials as plain text in your Budibase apps. Use Environment variables 🔒 to keep these credentials safe!
Passing Budibase array to n8n
n8n doesn't accept query step bindings
- Currently n8n payload won't accept Budibase's query step bindings. Instead you have to first return it via a JavaScript step and then use that output in the n8n step.
This is going to be a very simple example.
-
Add a query step before you n8n automation step.
-
For this example, we are going to limit the objects queried to 2
-
Add a JavaScript step and return the query rows. This will format the array in a way that will be accepted by n8n.
-
Pass the query step output inside the n8n payload
-
Test and send
-
Output in n8n
Updated 8 days ago