# How to automate email in Microsoft Dynamics GP

> Source: https://netray.co/integrations/dynamics-gp-email-automation
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

Monitor shared mailboxes, classify each message, extract fields from the body and attachments, and stage the result for review. Approved items are posted into GP through eConnect, so sales orders, receipts and payables invoices carry full validation.

## System

Microsoft Dynamics GP

## Capability

email-automation

## Intro

In many GP companies the real order entry system is a shared inbox. Customers email purchase orders as PDFs, suppliers email order acknowledgements and packing lists, and AP receives invoices at an address that a clerk empties twice a day. Each one is re-keyed into Sales Order Processing, Purchase Order Entry or Payables Transaction Entry.

GP itself is good at sending email, with documents going out by Word Templates or email series, but it has little for receiving. There is no inbound parser, so automation has to sit beside GP.

The aim here is not to remove clerks but to remove typing: the clerk reviews a pre-filled transaction and approves it.

## Use Cases

### Customer PO to sales order

**Description:** Emailed purchase orders are parsed for customer, item numbers, quantities, ship-to and requested date, then staged as a draft SOP order for entry clerk review.

### Supplier order acknowledgements

**Description:** Acknowledgements are matched to open POs and compared with GP promise dates; changes are flagged for the buyer rather than silently applied.

### Vendor invoices to payables

**Description:** Invoices from a mailbox become payables transactions with vendor id, document number, amount and distributions, ready to review in a batch.

### RFQ intake for quotes

**Description:** Inbound requests for quote are identified, items matched to the item master, and a quote draft is started for the sales engineer.

### Shipping notices and tracking

**Description:** Carrier and supplier ASNs update expected receipt dates and attach tracking numbers to the PO record's notes for receiving.

## System Surface

eConnect is the supported way to insert transactions: taSopHdrIvcInsert with taSopLineIvcInsert for sales documents, taPMTransactionInsert for payables, and the POP receipt procedures for receivings. Procedure names and parameters vary by release, so check your eConnect documentation.

Reference data lives in SQL tables such as RM00101 customers, PM00200 vendors and IV00101 items, plus cross-reference tables like item vendor and customer item cross references. Matching depends on how clean these are.

Document Attachment Management lets users attach files to GP records, useful for storing the original email or PDF beside the transaction.

Integration Manager and Table Import are older, still-supported paths for loading from CSV. They suit a staged file drop if you do not want to write .NET.

Outbound email from GP uses SMTP or Outlook settings, which you can reuse for acknowledgements and exception notices.

## How It Works

### Connect the mailbox

**Detail:** Use Microsoft Graph for Exchange Online, or IMAP/EWS for on-prem Exchange. Read from dedicated shared mailboxes, not personal ones.

### Classify the message

**Detail:** Decide if it is a PO, invoice, acknowledgement, RFQ or noise. Rules and sender whitelists first; a language model can handle the ambiguous tail.

### Extract fields

**Detail:** Parse body text and attachments. For PDFs and scans combine OCR with a model that returns structured JSON against a fixed schema.

### Match against GP master data

**Detail:** Resolve customer, vendor and item using cross references and fuzzy matching with thresholds. Unmatched lines are marked, never guessed.

### Stage and review

**Detail:** Write drafts to a review table showing extracted values beside the source. The clerk edits and approves in a simple web page.

### Post with eConnect

**Detail:** On approval, a service builds the eConnect XML, posts the document to the batch, and stores the GP document number against the email.

### Reply and close the loop

**Detail:** Send an acknowledgement to the sender, with the GP order number, and archive the message with a link to the transaction.

## Example Flows

### Emailed customer PO becomes a draft order

**Trigger:** New message with a PDF in the orders mailbox

**Steps:**

- Classifier tags it as a customer PO from a known sender domain.
- Extractor returns PO number, ship-to, lines and requested date.
- Items are matched using customer item cross reference; two lines come back unmatched.
- Clerk fixes the two lines on the review page and approves.
- eConnect creates the order in the chosen SOP batch and the customer gets a confirmation.

**Result:** Entry drops from several minutes of typing to a short review, with the source PDF attached.

### Vendor invoice mismatch caught before posting

**Trigger:** Vendor invoice arrives in the AP mailbox

**Steps:**

- Extraction reads vendor, invoice number, amount and PO reference.
- The service checks the PO and receipt data for quantity and price.
- A price variance over tolerance is flagged for the buyer.
- The payable is staged on hold until the buyer responds.

**Result:** AP stops paying invoices that disagree with the PO, with an audit trail of why.

## On Prem

The mailbox can be Exchange Online or on-prem Exchange; either way the processing service can run inside your network and talk to SQL Server and eConnect locally. The sensitive step is extraction: sending vendor invoices and customer POs to a public AI API may violate customer contracts or export rules. Run OCR and a small open-weight model on a local GPU or CPU server, keep the review UI internal, and only the mailbox traffic crosses your boundary. Store original emails and parsed JSON in a location covered by your normal backups and retention, since they become audit evidence.

## Security

- Limit mailbox permissions to the specific shared mailboxes; use app-only Graph permissions with scoped access.
- Never auto-open attachments on a machine with GP access; sandbox conversion of PDFs and Office files.
- Treat sender domain and DKIM/SPF results as inputs; invoice fraud by spoofed email is common.
- Require approval for new vendor bank details and any master data change.
- Retain source email, extracted values, reviewer and GP document number together.

## Options

### AP or order-entry automation product with GP support

**Fit:** Fast for invoices if your volume and layout fit the vendor's templates. Check GP version support and per-document pricing.

**Effort:** Weeks plus subscription

### Build in-house with Graph, OCR and eConnect

**Fit:** Fits teams with .NET and data skills who want control and low run cost.

**Effort:** Two to four months for one document type

### Netray with a GP partner

**Fit:** When documents must stay on-prem and you want model-based extraction with confidence thresholds and clerk review.

**Effort:** Pilot in weeks, per document type

## Pitfalls

- Auto-posting without review; one misread quantity becomes a real shipment or payment.
- Matching items on description rather than on cross references or stable item numbers.
- Ignoring duplicates: the same invoice emailed twice must be caught by vendor plus document number.
- Forgetting GP periods and batch status. Posting into a closed period or a locked batch fails and loses the item.

## Faq

### Can GP read incoming email itself?

**Answer:** No. GP can send documents by email but does not parse inbound messages into transactions. You add a service that reads the mailbox, extracts data, and submits it to GP through eConnect or a supported import tool.

### Which GP transactions are easiest to automate from email?

**Answer:** Payables invoices and customer POs are the usual starting points. They have clear fields and high volume. Complex items such as drawings or configured products need more review and more careful item matching.

### Do we have to use eConnect?

**Answer:** It is the most robust supported path. Integration Manager or Table Import with a CSV can work for lower volumes. Avoid direct table inserts because they skip GP's business logic and can corrupt data.

### How accurate is automated extraction?

**Answer:** It depends heavily on document quality and layout variety. Expect clean digital PDFs to do well and scans to need more review. Use confidence thresholds and measure error rate on your own samples before reducing review.

### Can this keep the original email with the transaction?

**Answer:** Yes. Use Document Attachment Management or store the message in a controlled repository and write its link into a note or reference field on the GP document.

## Search terms

dynamics gp email automation, dynamics gp purchase order email, automate invoices dynamics gp email, dynamics gp inbound email, dynamics gp econnect email invoices, dynamics gp sales order from email, great plains email automation, dynamics gp ap automation, microsoft dynamics gp email parser

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
