Emailed POD to customer invoice in NetSuite
PODs land in your mailbox. This flow reads each one, finds the NetSuite sales order for the load and invoices the customer, and asks billing first when a POD has problems.
The prompt
When a POD arrives in our Outlook mailbox, read the PDF and pull out the load number, PRO and BOL, the delivery date, whether it's signed, and any shortage or damage noted. Find the NetSuite sales order whose number or PO/reference number is the load number, and make sure the load isn't invoiced yet. If there's no match, post the POD to billing in Slack. If the POD is signed and clean, create the customer invoice from the sales order's lines with the load, PRO and BOL in the memo. Otherwise ask billing in Slack, with Invoice the customer and Hold the load buttons, and wait for the answer.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works
What each step does
- New POD email Checks the mailbox in Outlook every 5 minutes for an email with an attachment and POD in the subject.
- Read the POD An AI agent reads the PDF and pulls out the load number, PRO and BOL, the delivery date, whether the consignee signed, and any shortage, damage or refusal written on it.
- Find the sales order for the load Looks up the sales order whose document number or PO/reference number is the load number, with its lines.
- Sales order found and not invoiced? Checks the order is still open and no invoice for the load is in NetSuite yet. When either check fails, the POD goes to billing in Slack with the reason and a link to the file.
- Create the invoice A signed POD with nothing noted on it goes straight to an invoice for the customer, built from the sales order's lines, with the load, PRO, BOL and delivery date in the memo.
- Ask billing Anything else goes to billing in Slack: the load, the customer, the amount, what the POD says, and two buttons, Invoice the customer and Hold the load.
- Wait for billing's answer The run waits for the click. Invoice the customer creates the invoice. Hold the load leaves it uninvoiced and says so in the Slack thread.
Before you turn it on
- Connect your Outlook, NetSuite and Slack accounts, and enter your NetSuite account ID, client ID and client secret.
- Add your Anthropic key in the flow setting Anthropic key.
- Copy the URL of the block Wait for billing's answer into the flow setting Answer link. The Slack buttons open it.
- Pick your Slack channel in the three Slack steps, and point the Outlook trigger at the folder PODs arrive in if it isn't the Inbox.