Continuous Item Monitoring
The workflow continuously monitors Dynamics 365 Business Central for newly created items every 3 minutes, ensuring the system always has the latest product data available.
About this template
AI-Powered Email Purchase Order to Sales Order Automation in Dynamics 365 Business Central
Keep exploring
Every repetitive process between your ERP, CRM, and business apps has a template. Find yours, customize it, and go live today.
No matching templates. Try a different keyword, or browse the full library.
Customize the flow
Every module in this template is fully customisable. Add triggers, swap actions, or extend the logic using appse ai's no-code visual builder.
No triggers for Gmail.
Inside the flow
appse ai runs this workflow end to end for Gmail — automatically, every single day. Here is exactly what happens when this template runs.
The workflow continuously monitors Dynamics 365 Business Central for newly created items every 3 minutes, ensuring the system always has the latest product data available.
Whenever a new product is detected, the system generates a semantic AI embedding of the product details such as name, code, and price. This converts the product into a searchable AI-friendly format.
The generated embeddings are stored in a vector database. This builds an intelligent product repository that can later match incoming product descriptions with the correct ERP items.
The system scans Gmail for unread emails. This allows incoming purchase orders sent by customers via email to be automatically captured without manual intervention.
When a new email is detected, the workflow retrieves the full message content along with any attached files.
The workflow automatically downloads the PDF attachment associated with the email, which typically contains the purchase order.
The attached PDF is decoded and prepared for analysis so the system can read and interpret the contents of the purchase order.
Using OpenAI, the system analyzes the purchase order document and extracts structured order information such as customer details, order number, shipping address, line items, pricing, and totals.
The extracted information is converted into structured JSON format so it can be used reliably by downstream systems and workflows.
Each product listed in the purchase order is processed individually to ensure accurate product matching and order line creation.
For every item in the order, the system generates an embedding of the product description and searches the vector database to find the closest matching item stored from Business Central.
The workflow pairs each order item with the corresponding product ID retrieved from the AI search results, ensuring the correct ERP product is used when creating the order.
All processed items are aggregated back together, preparing the final structured order with properly mapped product references.
The system checks Dynamics 365 Business Central to determine whether the customer from the order email already exists in the ERP.
The workflow evaluates whether a valid customer record was found. If the customer exists: The process continues with order creation. If the customer does not exist: The workflow triggers an exception handling process.
When a valid customer is found, the workflow automatically creates a Sales Order in Dynamics 365 Business Central, including all product lines, quantities, pricing, and shipping information extracted from the purchase order.
If no matching customer exists in the ERP, the system sends an email back to the sender explaining that the order could not be created due to a missing customer record.
At the same time, a notification is posted to Microsoft Teams, informing the internal team that the order requires manual intervention to register the customer before processing.
Discover how appse ai has helped businesses automate processes and achieve growth through our users' success stories.