Carrier setup packet checked against FMCSA before a BILL vendor
A new carrier emails its W-9, COI and authority. This flow checks the legal name, MC and USDOT at FMCSA, flags a mismatch as possible fraud, and adds a match to BILL after AP approves.
The prompt
When a new carrier's setup packet comes into our carrier setup inbox in Outlook, read every attachment: the W-9, the certificate of insurance and the MC authority. Look up the MC number and the USDOT number at FMCSA. The MC number has to belong to that USDOT number, the W-9 legal name has to match FMCSA's legal or DBA name, and the carrier has to be allowed to operate. If BILL already has the carrier, tell AP in Slack. If it all matches, send AP the packet next to FMCSA's record, with anything else worth checking, and Approve and Don't set it up buttons, and wait. On approval, add the carrier to BILL with the W-9 name, address, TIN and 1099 setting. If anything doesn't match, flag it to AP in Slack as possible fraud and create nothing. If the packet has no MC or USDOT number, tell AP.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Inside the loop: Read each document
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 setup packet email Checks the carrier setup inbox in Outlook every 5 minutes for an email with attachments and setup in the subject, and saves the attachments.
- Read the document An AI agent reads each attachment and pulls out the legal name, DBA, MC and USDOT numbers, the TIN and tax classification, whether the W-9 is signed, the address and the insurance expiry. A packet with no MC or USDOT number goes to AP in Slack.
- Look up the MC number at FMCSA Looks up the MC number, then the USDOT number, at FMCSA.
- Compare the packet with FMCSA The MC number must be registered to the packet's USDOT number, the W-9 legal name must be FMCSA's legal or DBA name, and the carrier must be allowed to operate. It also searches BILL by name, and a carrier already there goes to AP with nothing created.
- Flag the mismatch to AP A mismatch goes to AP in Slack as possible fraud, with what FMCSA has next to what the packet says. No vendor is created.
- Ask AP to approve the carrier A match goes to AP with FMCSA's record beside the packet, anything else to check (authority, insurance on file, an unsigned W-9, a certificate close to expiry, similar vendor names in BILL), a link to the email, and two buttons, Approve and add to BILL and Don't set it up.
- Wait for AP's answer The run waits for the click. Don't set it up leaves BILL alone and says so in Slack.
- Add the carrier to BILL Creates the vendor in BILL with the W-9 legal name, address, TIN and 1099 setting, and confirms in Slack.
Before you turn it on
- Connect your Outlook and Slack accounts. Enter your FMCSA web key in the FMCSA service settings (it is free: sign in at mobile.fmcsa.dot.gov/QCDevsite with Login.gov and open My WebKeys), and your BILL developer key, user name, password and organization ID in the BILL settings.
- Add your Anthropic key in the flow setting Anthropic key.
- Copy the URL of the block Wait for AP's answer into the flow setting Answer link. The Slack buttons open it.
- In the block New setup packet email, pick the folder your setup packets arrive in, and change the subject filter (setup) if your packets are titled differently.
- Pick your AP channel in the six Slack steps.