---
title: "ERPNext Integration"
description: "Run generic CRUD, querying, and remote-method calls across every ERPNext (Frappe) DocType, including Customer, Sales Order, Item, Sales Invoice, and any custom DocType."
url: https://flowrunner.ai/integrations/erpnext
date_modified: 2026-08-01T02:40:32-07:00
---

# ERPNext

[ERP](https://flowrunner.ai/integrations/category/finance-accounting)

Run generic CRUD, querying, and remote-method calls across every ERPNext (Frappe) DocType, including Customer, Sales Order, Item, Sales Invoice, and any custom DocType.

[Verified](https://flowrunner.ai/integrations/verified "What does verified mean?") · 10 actions · API key · available

[ERPNext website](https://erpnext.com/) · [Platform Documentation](https://frappeframework.com/docs/user/en/api/rest) · Capability data verified 2026-08-12

1.  A new order arrives from a store or CRM
2.  Agent reads the order and maps it to the Sales Order DocType
3.  Agent runs Count Documents to confirm the order is not already recorded
4.  Agent runs Create Document to record the Sales Order
5.  Agent reads back key fields with Get Value to confirm the write
6.  The sales team is alerted with the document name
7.  Submitting the resulting Sales Invoice is paused for approval above a threshold

## What This Integration Enables

Agents work across every DocType with one generic operation set. On documents they list, read, and write (List Documents, Get Document, Create Document, Update Document, Delete Document) and drive the submittable lifecycle (Submit Document, Cancel Document) for Sales Orders, Sales Invoices, Purchase Orders, and other submittable types. On queries they count and read single values (Count Documents, Get Value) using Frappe's filter format to drive branching and reporting without pulling whole records. Run Method invokes whitelisted server-side ERPNext methods, so an agent can trigger real business logic a custom instance defines. Because the DocType parameter is free text, the same connector reaches built-in and custom DocTypes alike, which makes it the bridge between ERPNext and every system it needs to stay aligned with.

### Without FlowRunner

**Orders re-keyed by hand**: Someone enters store and CRM orders into ERPNext document by document

**Invoices submitted unchecked**: Sales Invoices are finalized without a review step on larger amounts

**Cancellations lag**: Upstream cancellations are reflected in ERPNext late, if at all

### With FlowRunner

**Orders created in-flow**: Create Document records each Sales Order the moment the upstream event fires

**Invoices reviewed on value**: Submit Document pauses for a human on invoices over a set amount

**Cancellations reflected fast**: Cancel Document reverses a submitted document when the source order is cancelled

## Use Case Scenarios

### Order-to-Cash Intake

New orders flow in from a store. For each one the agent runs Count Documents against the Sales Order DocType to confirm it is not a duplicate, then Create Document to record it. When the order is ready to bill, it creates the Sales Invoice and, after review, calls Submit Document to finalize it. The order and its invoice land in ERPNext without a person entering documents by hand, and each finalization is a deliberate step rather than a default.

### Invoice Mirror to Accounting

After Submit Document finalizes a Sales Invoice in ERPNext, the agent reads the invoice with Get Document and mirrors it into [QuickBooks Online](https://flowrunner.ai/integrations/quickbooks-online) with a Create Invoice call. The two systems stay aligned because the mirror happens on the submit event, not during a month-end reconciliation scramble.

### Lead Alerting

The agent runs List Documents against the Lead DocType with a filter for new, unassigned leads. For each match it posts the lead detail to the sales channel in [Slack](https://flowrunner.ai/integrations/slack) so a rep can pick it up. Leads that used to sit in ERPNext until someone checked now surface the moment they exist.

## Human-in-Loop Highlight

Creating and updating documents is safe to run unattended. Submitting a document is the point where ERPNext commits it, and a submitted Sales Invoice is money on the books, so that is where the agent should stop and ask. Human-in-the-loop is the pattern where the agent pauses on the irreversible step, assembles the context, and resumes on a decision. When a workflow is about to call Submit Document on a Sales Invoice above a configurable amount, the agent presents the customer, the total, and the line items, then routes to finance in [Slack](https://flowrunner.ai/integrations/slack): "Sales Invoice SINV-2026-00214 for $61,300 is ready to submit. Submit, edit, or hold?" Finance decides. On approval, the agent submits the document and records the approver and timestamp. Small invoices post automatically; the large ones get a human before they are final.

Agent processes routinely

Detects exception requiring judgment

Clear match Continues automatically

Ambiguous Routes to human via Slack

Human decides

Agent resumes with decision

## Agent Capabilities

10 actions

### Documents

7

-   **List Documents** Lists documents of a given DocType using Frappe filters.
-   **Get Document** Retrieves a single document by DocType and name.
-   **Create Document** Creates a document of any DocType, built-in or custom.
-   **Update Document** Updates fields on an existing document.
-   **Delete Document** Deletes a document by DocType and name.
-   **Submit Document** Submits a submittable document such as a Sales Order or Sales Invoice.
-   **Cancel Document** Cancels a previously submitted document to reverse it.

### Query

2

-   **Count Documents** Counts documents of a DocType matching Frappe filters. Used for duplicate checks and branching.
-   **Get Value** Reads a single field value from a document without fetching the whole record.

### Advanced

1

-   **Run Method** Invokes a whitelisted server-side ERPNext method. Used to trigger custom business logic; can change server state, so it is used with care.

## Frequently Asked Questions

### What can FlowRunner do with ERPNext?

FlowRunner agents can run List Documents, Get Document, and Create Document in ERPNext, plus 7 more actions.

### Does connecting ERPNext to FlowRunner require OAuth?

No. ERPNext connects to FlowRunner with an API key, no OAuth flow required.

### Can ERPNext trigger a FlowRunner workflow automatically?

ERPNext doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.

**Work at ERPNext?** This integration exposes ERPNext to AI agents on every FlowRunner plan, including through MCP, at no cost to you. [See what FlowRunner offers integration partners](https://flowrunner.ai/integrations/partners), including how to keep this page current.

---
Markdown version of https://flowrunner.ai/integrations/erpnext. Site index: https://flowrunner.ai/llms.txt
