Emailed load paperwork filed in a Google Drive folder per load
Rate cons, BOLs, PODs and carrier invoices arrive by email. This flow reads each one, finds the load in McLeod and files it in the load's Drive folder.
The prompt
When load paperwork arrives in our Gmail inbox, go through each PDF or image attached. Read it, tell me whether it's a rate con, BOL, POD, carrier invoice, lumper receipt or other paperwork, and pull out the load number. Skip logos and signature images. Find the load in McLeod by that number. If there's no load number on it, or McLeod has no such load, send it to ops in Slack instead of guessing. Otherwise find the folder named after the load number inside our Loads folder in Google Drive, create it if it isn't there, and upload the file named with the load number and the document type, like 0451873 POD.pdf.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Inside the loop: For each attachment
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 paperwork email Checks the inbox in Gmail every 5 minutes for an email with a PDF or image attached. Each attachment is handled on its own.
- Read the document Once the file is saved, an AI agent says whether it's a rate con, BOL, POD, carrier invoice, lumper receipt or other load paperwork, and reads the load number. Logos and signature images are skipped.
- Find the load in McLeod Looks the load up in McLeod by the load number on the document.
- Send it to ops A document with no load number, or a number McLeod doesn't know, goes to ops in Slack with a link to the file. Nothing is filed by guesswork.
- Find the load folder Looks inside your Loads folder in Google Drive for the folder named exactly after the McLeod load number.
- Create the load folder When the load has no folder yet, it's created inside the Loads folder.
- File it in the load folder Uploads the document named with the load number and its type, such as 0451873 POD.pdf, so every rate con, BOL and POD for a load sits in one folder.
Before you turn it on
- Connect your Gmail, Google Drive and Slack accounts, and enter your McLeod server address with an API token or a user name and password.
- Add your Anthropic key in the flow setting Anthropic key.
- Set the flow setting Loads folder to the ID of the Google Drive folder that holds your load folders (the part of the folder's link after /folders/).
- Pick your ops channel in Send it to ops, and narrow the Gmail search to your paperwork inbox if it shares a mailbox.