👥 Approve or reject Dokan marketplace vendors from Slack
⚡ 26 views · 👥 HR & Recruitment
Description
Quick overview
This workflow polls Dokan for newly registered vendors awaiting approval, posts each pending vendor to a Slack channel with Approve/Reject buttons, and updates the vendor’s status in Dokan when an admin clicks a button.
How it works
- Runs every 15 minutes on a schedule.
- Requests the list of Dokan stores with
status=inactivefrom the Dokan REST API. - Deduplicates vendors already announced in previous runs and formats vendor details (profile link, contact info, address, and social links) for Slack.
- Posts a Slack message for each new pending vendor with Approve, Reject, and View profile buttons.
- When an admin clicks Approve or Reject in Slack, a token-protected webhook receives the request and verifies the shared token.
- Updates the vendor status in Dokan to
active(approve) orinactive(reject), posts a confirmation message to Slack, and returns an HTML response page to the button click.
Setup
- Create a Dokan/WooCommerce Application Password (or equivalent Basic Auth) in your site for an admin-capable user and add it as HTTP Basic Auth credentials in the Dokan API request nodes.
- Add Slack credentials for a bot token with
chat:writeand setYOUR_SLACK_CHANNEL_IDin the Slack message and confirmation steps. - Replace
your-marketplace.comwith your Dokan site URL in the Dokan API URLs and the Slack “View profile” button. - Replace
your-n8n-instance.comin the Slack Approve/Reject button URLs and set a long randomYOUR_APPROVAL_TOKENto secure the approve/reject webhooks.
🔗 Nodes Used
HTTP Request, Slack, Webhook, Schedule Trigger
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File