⌘K
  1. Home
  2. /
  3. Docs
  4. /
  5. Dokan Multi Vendor Docume…
  6. /
  7. Dokan n8n Integration

Dokan n8n Integration

Set up an automated workflow with Dokan and n8n integration that posts every new vendor to Slack and lets you approve or reject them with a single tap, without ever logging into WordPress.

Workflow file: Dokan — Vendor Approval (Slack) - PUBLISH.json

Who it’s forMarketplace owners and admins. No coding required.
Time to set upAbout 15 minutes
You’ll connectDokan (WordPress), n8n, and Slack

Overview

Every 15 minutes, n8n checks your Dokan store for vendors waiting to be approved. When it finds one, it posts a card to your Slack channel with the vendor’s name, store, email, phone, and address, along with three buttons:

  • Approve sets the vendor live on your store.
  • Reject sets the vendor aside. They are kept and can be recovered later.
  • View profile opens the vendor’s store page.

You tap a button in Slack, and Dokan handles the rest, including sending the welcome or rejection email automatically.

Every 15 min  →  n8n asks Dokan "any vendors waiting?"
              →  posts each new vendor to Slack

[ Approve ] tap  →  vendor set ACTIVE    →  Slack confirms
[ Reject  ] tap  →  vendor set INACTIVE  →  Slack confirms

Good to know: Dokan needs no special setup, and n8n does all the checking on a timer. The buttons are simple links, so you do not need any custom Slack app configuration either.

Before You Begin

Gather these five values first. You will paste them into the workflow during setup, so keep them somewhere safe as you go.

What you needWhere to find it
Dokan site addressYour store URL, for example https://yourstore.com
n8n public addressYour n8n URL, for example https://yourname.app.n8n.cloud. On n8n Cloud, this is the address in your browser when logged in.
Slack channel IDSee “Find your Slack channel ID” below.
WordPress Application PasswordSee “Create a WordPress Application Password” below.
A secret tokenA long random string you make up, 30 or more mixed letters and numbers. This stops strangers from approving vendors. Example: kf83Jd0aPqR7tZ2xLm9Wn4Vb6Yc1Hs5Eg

Find your Slack channel ID

  1. In Slack, click the channel name at the top, for example #vendor-approvals.
  2. In the popup that opens, scroll to the bottom.
  3. Copy the Channel ID. It looks like C0XXXXXXX.

Create a WordPress Application Password

This lets n8n read your vendors and change their status. It is separate from your normal login password.

  1. Log in to WordPress and go to Users → Profile on your admin account.
  2. Scroll to Application Passwords.
  3. Type a name such as n8n, then click Add New Application Password.
  4. Copy the password that appears. It looks like abcd EFGH ijkl MNOP.

Important: WordPress shows this password only once. Save it now, because you cannot view it again later.

Step 1: Import the Workflow

n8n integration with Dokan_slack vendor approval
  • Log in to n8n.
  • In the top-right corner, click Add workflow or the + button.
Create Workflow button
  • On the blank workflow, click the three dots (⋯) in the top-right corner, then choose Import from File.
  • Select the file Dokan — Vendor Approval (Slack) - PUBLISH.json.

You will find the workflow here.

copy the n8n workflow with Dokan

The workflow loads as a set of connected boxes with yellow sticky notes that explain each part. You only need to edit a few fields. The rest already works.

Step 2: Replace the Placeholders

n8n Workflow for Dokan

The imported workflow contains sample values. Find each one and type your real value over it.

PlaceholderReplace withWhere it appears
your-marketplace.comYour Dokan site address“Fetch pending vendors”, “Activate vendor”, “Mark inactive”, and the View profile button
your-n8n-instance.comYour n8n addressThe Approve and Reject buttons inside the Slack message
YOUR_APPROVAL_TOKENYour secret tokenThe Approve and Reject buttons, and both “Verify token” boxes
YOUR_SLACK_CHANNEL_IDYour Slack channel ID (C0XXXXXXX)The three Slack boxes

To edit a value: double-click a box to open it, find the placeholder text, type your value over it, then close the box. Repeat for each placeholder.

Here is the “Fetch pending vendors” workflow-

Fetching vendors workflow in dokan

Important: The secret token must be exactly the same in every location. If it does not match, clicking Approve will fail with a “bad token” error.

Step 3: Connect Your Accounts

n8n needs permission to talk to your store and to Slack.

Connect your Dokan store

  1. Double-click the Fetch pending vendors box.
  2. Next to Credential, click Create New, then choose Basic Auth.
  3. Set User to your WordPress admin username.
  4. Set Password to the Application Password you created earlier.
  5. Save.
  6. Open the Activate vendor box and the Mark inactive box. For each, select the same credential from the dropdown. You do not need to type it again.

Connect Slack

  1. Double-click the Post to Slack channel box.
  2. Next to Credential, click Create New, sign in to Slack, then click Allow.
  3. Open the Confirm approval box and the Confirm rejection box. For each, select the same Slack credential.
  4. Make sure your Slack bot is in the channel. In Slack, type /invite in your channel and add the bot if needed.

Step 4: Turn On the Workflow

In the top-right corner of the workflow, switch the Active toggle to ON.

The 15-minute checker starts, and the Approve and Reject buttons go live. Setup is complete.

Step 5: Test the Workflow

Run one full test before relying on it.

  1. Open a private or incognito browser window and register a test vendor on your store. Leave them pending.
  2. Wait up to 15 minutes, or click Execute Workflow in n8n to check right away.
  3. Confirm a vendor card appears in your Slack channel with Approve, Reject, and View profile.
  4. Click Approve. A small success page opens in your browser.
  5. In WordPress, go to Dokan → Vendors and confirm the test vendor is now active.
  6. Confirm Slack shows a confirmation message.
Slack confirmation message

If all six happened, your setup is working correctly.

Troubleshooting

ProblemLikely causeFix
No card ever appears in SlackThe workflow is not active, or the vendor was already postedConfirm Step 4 is ON. For testing, use a brand-new vendor, since the workflow skips vendors it has already posted.
A button click shows an errorThe secret token does not matchRecheck Step 2. The token must be identical in the buttons and in both “Verify token” boxes.
Button error, vendor not changedWrong WordPress loginRecheck the Basic Auth username and Application Password in Step 3. Create a new Application Password if unsure.
Slack error “not_in_channel”The bot is not in the channelIn Slack, run /invite to add the bot to the channel.
Posts go to the wrong placeChannel ID typoConfirm you used the C0XXXXXXX ID, not the channel name.

To see what happened: in n8n, open the workflow and click Executions on the left. Green means it worked, red means it failed. Click a red entry to see which box failed and why.

Reference: What Each Box Does

BoxJob
Every 15 minutesTimer that starts each check.
Fetch pending vendorsGET {site}/wp-json/dokan/v1/stores retrieves vendors awaiting approval.
Skip already-announcedDrops vendors that were already posted.
Post to Slack channelPosts the vendor card and buttons.
Approve clickedWebhook dokan-vendor-approve-slack.
Verify token (approve)Checks the secret token.
Activate vendorPOST .../stores/{id}/status with {"status":"active"}.
Confirm approval (Slack) / Respond: approvedConfirms in Slack and shows the success page.
Reject clickedWebhook dokan-vendor-reject-slack.
Verify token (reject)Checks the secret token.
Mark inactivePOST .../stores/{id}/status with {"status":"inactive"}.
Confirm rejection (Slack) / Respond: rejectedConfirms in Slack and shows the page.