top of page

How to Connect Your Wix Site to n8n: A Step-by-Step Guide 2025

Connect your WIX site to external systems like n8n using a simple self-hosted app. It will allow you to orchestrate powerful automations, improve efficiency, and go beyond WIX's native limitations.

How to Connect Your Wix Site to n8n: A Step-by-Step Guide 2025

The video below shows you the best way to connect an external application to your WIX website by creating a self-hosted app that acts as a bridge. The method is highly flexible, and while it can seem daunting, it is relatively simple and can be used to connect WIX to virtually any external system, not just n8n. This guide supports the original walkthrough we posted on YouTube.


YouTube walkthrough of how to connect n8n to Wix

One benefit you can realise is a simplified Wix site, as it removes the need for extensive front-end or back-end coding that could slow down your site. The self-hosted app manages the connection and interaction with the external system as illustrated in the image below, including permissions and security authentication, all in the background, not to mention more sophisticated workflows and automations than are available to you within Wix.


Flowchart with Wix Studio site, self-hosted app, and platforms like Make.com. Arrows indicate data exchange via REST API. Text lists features.
Your self-hosted app acts as a bridge to your Wix site

While this may sound complex, it's surprisingly straightforward. The first part of this guide will walk you through connecting n8n to your Wix site using this approach, which you can adapt to connect any other system to your Wix site. If you're using other automation systems like make.com that have native Wix connectors, this method still offers a viable alternative for establishing the connection.


Step 1: Setting Up the Self-Hosted App

Note that these screenshots and our demo were recorded on Wix Studio; the user interface looks slightly different on non-Wix Studio sites. You can follow these steps on our YouTube tutorial.



To begin, log into your Wix Studio dashboard. Here’s how you can set up your self-hosted app:


Click on Custom Apps in your dashboard.



Sidebar menu with items like Sites, Mobile Apps, and Custom Apps is highlighted by a blue arrow. The Media CTO role is visible at the top.

Select Create New App and choose to build from scratch.


Dashboard interface with a table listing app drafts and update dates. A purple arrow points to a blue "Create New App" button, highlighting action.

Select Build From Scratch

UI screen with a dropdown menu, "Create New App." An arrow points to "Build from scratch." Blue, minimal design with list details.

Select the Self-Hosted option


Interface showing Wix CLI and Self-Hosted options, each with descriptions. A purple arrow points to the Self-Hosted option. Background is blue.

And click get started


Blue arrow pointing to a "Get Started" button on a webpage for a self-hosted tech stack. Text: "Self-Hosted" with a deployment note.

Optionally, You Can Rename your App:


Highlighted "Rename app" dropdown menu option with blue outline and arrow on a white digital interface background.

For example myn8nConnection


Icon of a mountain and sun beside "myn8nConnection," with an App ID code below, on a light gray interface.

Now you need to set the permissions for your app. This is an important step as these permissions determine what you can do with your app and the information it can access from your website. In this example, to create the connection, we only set Wix-Data permissions, but you can set more or fewer permissions as you require.


Menu interface with highlighted "Permissions" option, blue arrow pointing to it. Black sidebar with options; header shows version details.

Select Add Permissions


Blue arrow points to a "Add Permissions" button on a screen with "Test App" dropdown. Interface has a clean, minimal design.

Filter by category and select Wix Data or whichever permissions you need (Wix Data is used in this demo)

Dropdown menu with categories for granting permissions, highlighting "Wix Data" in blue. Arrow points to selection.

Select all Wix Data permissions and hit Save


Permissions screen with "Filter by category" set to Wix Data. Several permission scopes are listed with checkboxes. "Save" button highlighted.

This is the next important step, in order to create a connection with your App, you will need the App Instance ID (this is unique to each site the app is installed on_ To get this, we create an extension and paste in some code to give us this ID.


So, click on extensions.


Menu screen featuring dark sidebar with highlighted "Extensions" option under "Develop." A blue arrow points to "Extensions."


Now, Click on Create Extension


Create a new extension screen with a blue arrow pointing to a highlighted "Create Extension" button. Simple, modern design.

Choose Dashboard and Choose Dashboard Page Create on Blocs


Wix dashboard interface with options for creating extensions. A blue arrow points to "Create on Blocks" for a dashboard page.

Now, Create a Dashboard Extension


Dashboard interface with text "Create a dashboard for your app". Blue button labeled "Create Extension" with a blue arrow pointing to it.

And select Dashboard Page


Interface with a menu for creating app extensions, highlighting "Create a page that will be embedded in the site dashboard" option.


You will now see a blank dashboard page a bit like this:


Image showing default blank dashboard screen

Now we are going to add a text element, the sole purpose of this text element will be to serve as a container to show the App Instance ID


So add a text element as you would on your Wix Studio site:


WIXBlocks text editor showing font options for Heading 1-6. Blue arrow highlights paragraph customization instructions. Draft status active.


Position and change the default text as you like:


UI design screen with editable text box labeled "Instance ID For this App." Blue buttons at top for secondary and main actions.

Now open the code panel for this page as shown below:


Dashboard interface in Wix IDE, showing code snippet and a highlighted box with "Instance ID For this App" text. Blue accents, neutral mood.

Remove all the existing code and paste the code snippet below:

You can get this from our GitHub:

https://github.com/MCTO-the-dig/wix/blob/main/codeToDisplayInstanceID

Caveat: GitHub will be updated, code below may not.


// The code below is added to a dashboard page on your app
// It will write the instanceID to a text box with the ID of instanceIdText
// Referenced in two video tutorials:
// 1 - how to connect a wix site to n8n https://youtu.be/Rmy_7poY80U
// 2 - how to display the instanceID of your self-hosted app on your wix site https://youtu.be/0hFOV3rkASg

import wixApplication from 'wix-application';

// More documentation on the getDecodedAppInstance function is here:
// https://dev.wix.com/docs/velo/apis/wix-application/get-decoded-app-instance

$w.onReady(function () {

  wixApplication.getDecodedAppInstance()

    .then((instance) => {

      const instanceId = instance.instanceId;

      const appDefId = instance.appDefId;  // Here for completeness your usecase may need it.

      const vendorProductId = instance.vendorProductId; // Here for completeness your usecase may need it.

    //  console.log("Decoded App Instance:", instance);

      $w('#instanceIdText').text = `Instance ID: ${instanceId}`;

	  // #instanceIdText is the ID of the text element on your dashboard page. 

    })

    .catch((error) => {

      console.error("Failed to get app instance:", error);

      $w('#instanceIdText').text = "Error retrieving instance info.";

	  // #instanceIdText is the ID of the text element on your dashboard page.

    });

});

When you have pasted the code, you will need to make sure the ID of your text element matches what is in your code:

Highlighted code snippet with blue arrow pointing at line 20 on a computer screen. Surrounding text is related to Wix app instance.


So, select the text element and change the ID from the default


Arrow points to a text box labeled "ID: #text8" in a software interface. The interface shows a code area and options for hidden or collapsed default values.

To the reference in the code

Wix IDE interface showing options for running code. Text element API reference with ID #instanceIdText. Checkboxes for Hidden and Collapsed.

In this example, ‘instanceIdText’


Now all that is left is to ‘Release’ the app.

UI screen with a dark top menu featuring "100%" and "Test." A purple arrow points to a "Release" button, highlighting "Release a version" tooltip.

Hit save and continue in the next dialogue


Popup window on a screen for naming an app with text input "mym8nConnection." A blue arrow points to "Save & Continue" button.

And Click Release

Dialog box titled "Release a version" with options to release a major version. "Release" button highlighted in blue.

Now you will need to select the site you want to connect with:


Popup displaying "Version 1.0 is ready," with a blue button labeled "Select a Site" and a purple arrow pointing at it.

Select the relevant production site


Screen showing a site selection interface with a list of options. "Digitising Events" is highlighted with a blue "Select" button. Arrow pointing to button.


And Install your APP


Arrow pointing to "Install App" button on a software interface. Dark blue and white theme. Profile icon visible in top bar.

Now it is installed, go back to your dashboard using the navigation from the editor:

Menu icon highlighted with a blue arrow on a digital interface. Text includes "Articles" and "Autosave on." Right side displays part of a website.

And you will now see your app as a menu from your dashboard:

WIX Studio dashboard with a sidebar menu. An arrow points to "mynBnConnection" in the "Manage Apps" section, highlighted in purple.

When you click on this, you will see the card with the instance ID for the app.


UI screen titled "State 01" with "Instance ID: 6a6b80ff-36c1..." highlighted by a blue arrow. Buttons labeled "Secondary" and "Main Action".

You've now created the app and have a way to get the App Instance ID. The app has all the permissions needed for your specific use case. In this demo, we're only using Wix data, but you can put in whatever data you'd like.


The Instance ID is important because it's a key component in authenticating to your app with an external system. To do this, you'll need three things: the Instance ID, the App ID (found in the App Dashboard), and the App Secret (also found in the App Dashboard). Once you have these, you can set up an OAuth connection within n8n, which is the next part of this guide.


Remember that when creating an app, it automatically generates a frontend widget, which causes the site editor to open upon installation. If you're familiar with the process and want to avoid this, simply delete the frontend widget from the app before installing. The crucial element is the dashboard page containing the code, which displays the current app install's instance ID. This additional information is just for your reference.


BONUS: The APP Instance ID defines which site you are connected with. You could have one app installed across multiple production sites, so you would not have to do this for each site. For example, one app with Wix data permissions can be used across many sites.

t can also deliver greater efficiency within your business in terms of communicating with site visitors and responding to events on your website.

Interested in going deeper? Check out our resources and courses.

Related Content

More information on integrating external systems with Wix, particularly focusing on app integration and automation, can be explored in the following content. The linked article provides a detailed guide on connecting Wix to Make.com using custom apps, permissions, and OAuth, offering an alternative approach to Wix-to-n8n integrations.

Next Up: Connecting the APP to n8n


To make the connection, we will authenticate and connect with your app using OAuth as documented on Wix. You can jump to this section on our YouTube tutorial.


Flowchart showing workflow steps: "Test workflow" triggers "HTTP Request Get Token" and "Get Some Data." Icons and arrows indicate sequence.
1: Manual Trigger 2: Authenticate and get token 3: Do something. In our case, make a Wix data call.

In this n8n example, we'll use a manual trigger instead of an active one (in production, the trigger can be whatever event you choose). The second step retrieves the token required to connect your app to n8n and then fetches data from your website. This second step is just an example; with the correct permissions, you can retrieve users, products, store items, or any other data you need.



 

A brief explanation of Bearer Tokens 


For those who may not be familiar, here's a quick explanation of what bearer tokens and app instance IDs are, and why they're necessary.


Essentially, they provide a secure method of interacting with your websites. By combining your app ID, app instance ID, and app secret, you can generate a unique authentication token. This token, which in Wix's case lasts for four hours, allows you to make calls to your website without needing to regenerate it for that duration.


Or, to put it another way, they are like a secret and unique key you are given, which only exists for a specified period of time to do a job or access a system.


This process is implemented for security reasons. It ensures that a new, unique token is generated for each call made to your website. While this does add a layer of complexity to the connection process, it significantly mitigates security risks.


Once you understand the underlying concept, it becomes easier to manage over time.

 

Creating the n8n Workflow

1.  Log in to your n8n account and create a new workflow.


2.  Set the trigger to manually start the workflow (you can use whatever trigger you like in production)


Now, add an HTTP Request node

The easiest way to set this up is by clicking on the Import cURL button on the HTTP Request node:


HTTP request interface displaying "Import cURL" button highlighted in red. Background shows options like Parameters and Settings.


And pasting in the cURL from the Wix Documentation

https://dev.wix.com/docs/rest/app-management/oauth-2/create-access-token


Copied here for convenience:

curl -X POST 'https://www.wixapis.com/oauth2/token' -H 'Content-Type: application/json' -d '{
"grant_type": "client_credentials",
"client_id": "<APP_ID>",
"client_secret": "<APP_SECRET_KEY>",
"instance_id": "<APP_INSTANCE_ID>"}'

And paste it in as below:


Popup titled "Import cURL command" showing a code snippet for an API request to Wix. Text box and yellow warning message visible, with "Import" button.

And hit Import, you will now see the HTTP Request node prefilled like this:


HTTP request form for token retrieval. POST method to URL with JSON body parameters: grant_type, client_id, client_secret, instance_id.

You will need to replace:

<APP_ID>

<APP_SECRET_KEY>

<APP_INSTANCE_ID>


With your unique information:

You Get:

<APP_ID>

<APP_SECRET_KEY>


From the app dashboard page, as below:


OAuth settings screen showing App ID and hidden Secret Key fields with red highlights. Options to Test App, Cancel, or Save.

You find this by going to 


Menu with "Develop" category open, showing options: Extensions, Webhooks, Permissions, OAuth, Automations on a dark background.

On your custom APP


And the <APP_INSTANCE_ID> is what you see on your app dashboard page by selecting the APP you created from your Wix Site Dashboard:


UI design mockup with card titled "State 01." A purple arrow points to text: "Instance ID: 6a6b80ff-36c1-4." Buttons: "Secondary Action," "Main Action."

So the values in this HTTP request node should look something like this:


n8n interface for an HTTP POST request to get a token. Fields include URL, body parameters, and authentication settings.
Add your <APP_ID> <APP_SECRET_KEY> <APP_INSTANCE_ID>

And so on


You are now ready to test this, and if you have put in everything correctly you will get an access_token as in the screenshot below:


HTTP request configuration screen showing method POST, URL for token, JSON body parameters for grant_type, client_id, and client_secret.

Now that you have this, you can start getting information from your Wix website. To demonstrate this, we will add another HTTP Request node to do a Wix data call to get items from a collection.


Do the same thing you did the last time and copy and paste the cURL from the Wix REST API documentation here:

https://dev.wix.com/docs/rest/business-solutions/cms/data-items/query-data-items


Interface showing HTTP Request1 with "POST" method selected. A red box highlights "Import cURL" button.

Or for convenience here:


curl -X POST \
'https://www.wixapis.com/wix-data/v2/items/query' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
    "dataCollectionId": "cities",
    "query": {
        "filter": {
            "state": "California"
        },
        "paging": {
            "limit": 2
        }
    }
}'

Make sure you change the Authorisation to reference the token generated by the previous HTTP Request node, like this, and replace the dataCollectionId, etc., from the example above with a collection and fields that exist on your site.


Text box for API authorization with "Name" as Authorization and "Value" as a bearer token expression. Button labeled "Add Parameter".
Get the access token from the previous node and add 'Bearer ' in front of it.

IMPORTANT: In Wix, you must add the word "Bearer" before the token. Unlike other systems, do not add : or capitalise—it will fail.


If you have everything right, you will see a result like this, which has pulled all the data items from a collection.


HTTP request setup on left with method, URL, and headers. JSON response on right showing data items with IDs, titles, and production stages.
Example of running a Wix data query with your app and returning information.

And that is it. You can now interact with your website using any of the methods defined in the WIX REST API. Remember to set the appropriate permissions based on your goal.


Finishing off you now have a functioning connection with n8n

You now have an app to control access to what you want it to do on your website and to authenticate with an external system. As we've demonstrated here with n8n, you can access any of the methods described in the Wix REST API once this connection is established. This API is very extensive so that you can do many things.


For example, when a registration comes in at Digitising Events, we can pull all the information associated with that registration, send it to a different system, and send a personalised welcome and thank-you message. Alternatively, if someone has bought something, we can trigger an action for a different department to follow up.


The power of this approach lies in its ability to facilitate more sophisticated automations and create deeper, more personalised experiences than are possible within Wix alone. It can also deliver greater efficiency within your business by communicating with site visitors and responding to events on your website.

bottom of page