π₯ Approve or reject Dokan marketplace vendors from Telegram
β‘ 7 views Β· π₯ HR & Recruitment
Description
Quick Overview
This workflow polls your Dokan marketplace for vendors awaiting approval and posts each new pending vendor to Telegram with Approve/Reject actions, then updates the vendor status in Dokan via token-protected webhooks and confirms the result back in Telegram.
How it works
- Runs every 15 minutes on a schedule.
- Fetches up to 100 Dokan vendors with the
inactivestatus via the Dokan REST API and keeps only vendors that have not already been announced. - Posts each newly detected vendor to a Telegram chat with inline buttons to Approve, Reject, or open the vendor profile in wp-admin.
- When Approve is clicked, receives the webhook request, validates the shared token, and sets the vendor status to
activein Dokan. - When Reject is clicked, receives the webhook request, validates the shared token, and sets the vendor status to
inactivein Dokan. - After an approval or rejection, clears the saved de-duplication entry so the vendor can be re-announced if they return to pending, sends a confirmation message to Telegram, and returns an HTML response to close the browser tab.
Setup
- Create an application password (or Basic Auth user) in WordPress with
manage_woocommercepermission and add it as an n8n HTTP Basic Auth credential for the Dokan API requests. - Create a Telegram bot and provide its bot token, then set your target Telegram chat/channel ID in the Telegram sendMessage requests.
- Replace
https://your-marketplace.comwith your Dokan site URL in the Dokan API requests and the wp-admin βView profileβ button link. - Replace
https://your-n8n-instance.comin the Telegram inline button URLs with your public n8n base URL. - Set
YOUR_APPROVAL_TOKENto a long random string and ensure it matches thetokenquery parameter used in the Approve/Reject button URLs.
π Nodes Used
HTTP Request, Webhook, Schedule Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File