FlowRunner
Features Pricing
Theme
Start Free

Carrier COIs in Google Drive checked for expiry every day

Each carrier has a Drive folder with its certificate of insurance. This flow reads the newest one and flags any that's missing, expired or about to expire.

The prompt

Every morning, go through the carrier folders in our Carriers folder in Google Drive and read the newest certificate of insurance in each one. Find the earliest policy expiration date on it. If a carrier has no COI, or its COI has expired or expires within 30 days, email the carrier asking for a current certificate that names us as certificate holder, and tell our carrier setup person in Slack. If no expiration date can be read, tell carrier setup only. Take the carrier emails from our carrier contacts sheet, and keep a log in a Google Sheet so the same COI isn't flagged twice and a COI that hasn't changed isn't read again.

FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.

The flow

Repeats for each item For each carrier Action Read the COI log Action List the carrierfolders Action List the carrierCOIs Code Pick each carrier'slatest COI Action Read the carriercontacts

Inside the loop: For each carrier

Yes No Yes Yes Yes No Code Check the expiry date Condition COI needs attention? Action Email the carrier Action Log the COI AI agent Read the COI Condition New or changedCOI? Condition New COI or newstatus? Action Download theCOI Action Tell carrier setup Condition Carrier email on file?

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

  1. List the carrier folders Lists the carrier folders in your Carriers folder in Google Drive, then every PDF in them with COI in its name.
  2. Read the COI log Reads the Google Sheet that logs each certificate already checked, then the contacts sheet with each carrier's email.
  3. Pick each carrier's latest COI Keeps the newest COI in each carrier folder. A COI the log already has, unchanged, isn't read again.
  4. Read the COI An AI agent reads each new or changed certificate and returns every policy's expiration date and the earliest one.
  5. Check the expiry date Counts the days left against the Days before expiry setting: current, expiring, expired, missing or unreadable.
  6. Log the COI A new certificate or a change of status is added to the log, so a COI is flagged once when it starts to expire and once more if it lapses.
  7. Email the carrier A missing, expiring or expired COI gets an email to the carrier asking for a current certificate that names you as certificate holder. A carrier with no email in the contacts sheet isn't emailed.
  8. Tell carrier setup Carrier setup gets the same news in Slack with a link to the file. A COI with no readable expiration date comes only here.

Before you turn it on

  • Connect your Google Drive, Google Sheets, Gmail and Slack accounts.
  • Add your Anthropic key in the flow setting Anthropic key.
  • Set Carriers folder to the ID of the Drive folder that holds one folder per carrier, and Company name to the name carriers should show as certificate holder. COI file name (COI) and Days before expiry (30) can stay as they are.
  • Create a log sheet with the headers File ID, Modified, Carrier, File, Coverage, Expires, Status and Checked on in its first tab, and a contacts sheet with the headers Carrier and Email, where Carrier matches the carrier folder's name. Put their links in COI log sheet and Carrier contacts sheet.
  • Pick your carrier setup channel in Tell carrier setup, and schedule the flow to run once a day.