How to add Slack to ERPNext
Short answer
ERPNext can post to Slack natively through the Slack Webhook URL DocType and a Notification set to the Slack channel. For slash commands and interactive approvals, add a Slack app that calls ERPNext's REST API with a scoped token and applies Workflow transitions through a whitelisted method.
Slack is a common choice for smaller manufacturers, distributors and software-adjacent hardware companies running ERPNext. The pain is rarely the lack of alerts; it is the gap between a channel message and the action. Someone sees 'Work Order WO-0042 is late' and then has to open the Desk, find it and do something.
ERPNext is friendlier to Slack than to most chat tools, because the Frappe framework ships a way to send to an Incoming Webhook without code. That covers the first 80 percent. The rest, slash commands and buttons that act, needs a real Slack app and a careful look at who is allowed to do what.
What teams use it for
Order desk channel for new Sales Orders
Every submitted Sales Order posts customer, delivery date and value to an order desk channel, with a link back to the form.
Stock-out and reorder warnings
Items hitting reorder level or negative projected quantity are posted to a planning channel, grouped by warehouse, instead of waiting for someone to run Stock Projected Qty.
Approve or reject from the message
Buttons on a Slack message apply the Workflow transition for Purchase Orders or Expense Claims, restricted to named approvers.
Slash command for quick lookups
A command like /erp stock ITEM-001 returns bin quantities per warehouse from the Bin DocType; /erp po 0123 returns status and next delivery date.
Production exceptions
Work Orders past planned end date, or Job Cards with a stopped timer, raise a thread in the shop-floor channel so the supervisor can reply in context.
ERPNext integration surface
- Slack Webhook URL DocType: stores incoming webhook URLs for channels, used by Notification when its channel is set to Slack (available in current Frappe versions, verify on yours).
- Notification DocType: choose the document event, a condition, and a Jinja message body; recipients can be dynamic from fields on the document.
- REST API /api/resource and /api/method with token auth, which is what a Slack app uses for lookups and for applying actions.
- Workflow DocType and the apply_workflow method used by the Desk, for transitions that should respect allowed roles.
- Bin, Stock Ledger Entry and Purchase Order Item tables, reached through the API rather than directly, for stock and delivery lookups.
How it works
- 1
Start with the native channel
Create an Incoming Webhook in Slack for the target channel, add it as a Slack Webhook URL in ERPNext, then create a Notification on the event you care about with a short Jinja message and a link to the document.
- 2
Decide what needs interaction
If a message only informs, stop there. Add a Slack app only for slash commands, buttons or dialogs, because every interactive feature is an authenticated write path.
- 3
Create the Slack app
Enable slash commands and interactivity with a request URL on a small service you host, verify Slack's signing secret on each call, and request only the scopes you need.
- 4
Map Slack users to ERPNext users
Use the Slack profile email to find the ERPNext User. Reject actions when no match exists or the user lacks the role the transition requires.
- 5
Call ERPNext as a scoped identity
Reads go through a service account with read-only roles. Writes go through a whitelisted method that checks permissions for the mapped user, so Slack cannot become a back door.
- 6
Reply in thread and log
Respond ephemerally to lookups, update the original message after an action, and add a Comment on the ERPNext document noting the Slack user and time.
Example flows
Late Work Order thread
Trigger: A scheduled job finds Work Orders past planned_end_date still In Process.
- The job posts one message per work order via the Slack Webhook URL, with item, qty and workstation.
- Supervisors reply in the thread with a new estimate.
- A planner clicks a 'Log note' button that adds the text as a Comment on the Work Order.
Result: Delay reasons are captured on the record instead of lost in chat history.
Slash command stock check
Trigger: A salesperson types /erp stock FG-100 in any channel.
- Slack sends the signed command to the service.
- The service queries the Bin list for that item through the API.
- It replies ephemerally with quantity by warehouse and reserved quantity.
Result: Quick answers without exposing stock levels to the whole channel or opening the Desk.
Keeping data on-prem
Slack is a hosted service, so the data in each message sits with Slack. ERPNext can remain fully on-prem; the Notification sends outbound HTTPS, and any interactive Slack app needs an inbound endpoint reachable by Slack, typically a reverse proxy in front of one small service. For regulated or defense work, keep messages to identifiers and status, and do not post drawings, specs or customer pricing. If you want an AI assistant answering in Slack, run the model locally and let the service retrieve ERPNext data under the asking user's permissions. Fully air-gapped sites should use a self-hosted chat alternative with the same webhook shape.
Security checklist
- Verify Slack's signing secret and timestamp on every request to stop forged commands and replays.
- Treat the webhook URL as a secret; anyone with it can post into your channel.
- Check ERPNext permissions for the mapped user server side; never rely on channel membership as authorization.
- Limit Slack scopes and restrict the app to specific channels where possible.
- Keep commercially sensitive fields out of messages, and store the audit trail inside ERPNext.
Ways to get it done
Native Notification with Slack Webhook URL
Effort: An hour per alert, no code.
Alerts and digests where nobody needs to act from inside Slack.
Custom Slack app and small service
Effort: One to three weeks including review and testing.
Slash commands and approvals with exact permission control.
Partner build with Netray
Effort: Pilot on a few read-only questions, then widen.
Teams who want a Slack assistant that answers natural-language questions over ERPNext on private models.
Pitfalls
- !Notifications on every on_update create noise people mute; trigger on state or threshold changes.
- !Incoming webhooks post as the app, not a person, so approvals need the interactive path to carry identity.
- !Slack expects a response within about three seconds to a slash command; acknowledge first and process in the background.
- !Posting full document contents leaks data into a system with different retention rules than ERPNext.
- !Using the Administrator API key for the bot is a common shortcut that undoes your role model.
Frequently asked questions
Does ERPNext support Slack out of the box?
Current Frappe versions include a Slack Webhook URL DocType and a Slack channel option in Notification, which covers one-way alerts. Exact availability depends on your version, so look for it under the Notification form before building anything custom.
Can I approve documents from Slack?
Yes, with a Slack app that handles button clicks and calls a whitelisted ERPNext method. Map the Slack user to an ERPNext user and enforce the Workflow role check on the server so a button press carries real authority only for real approvers.
Is it safe to post customer data to Slack?
It depends on your obligations. Treat Slack as a different data store with its own retention. Post identifiers, status and links, and keep prices, specs and personal data inside ERPNext behind login.
Can I use this with self-hosted ERPNext?
Yes. Outbound webhooks need only internet egress. Interactive features need a public HTTPS endpoint for Slack to call, ideally one small service behind a reverse proxy rather than exposing ERPNext directly.
What about Slack message limits and rate limits?
Incoming webhooks and the Web API are rate limited per workspace and channel. Batch noisy events into a digest, use threads for follow-ups, and queue sends through the Frappe background workers so bursts do not drop messages.
Want Slack working on your ERPNext?
A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.
Get a free assessment