---
title: "A shared inbox sorted by Extracta.ai before anyone opens it | FlowRunner flow"
description: "Extracta.ai classifies each document emailed to a shared inbox. Invoices go to AP, contracts to legal in Slack and bank statements to Google Drive. Unsure ones go to a person."
url: https://flowrunner.ai/flows/extracta-ai-shared-inbox-sorted-by-type
date_published: 2026-12-01
date_modified: 2026-12-01T10:15:06-08:00
---

# A shared inbox sorted by Extracta.ai before anyone opens it

Extracta.ai classifies each document emailed to a shared inbox. Invoices go to AP, contracts to legal in Slack and bank statements to Google Drive. Unsure ones go to a person.

## The prompt

When a document is emailed to our shared inbox in Gmail, send it to our classification in Extracta.ai to find out whether it's an invoice, a contract or a bank statement. If Extracta.ai is less than 80% sure, ask the office manager in Slack with a button for each type and wait for the answer. Forward invoices to our AP inbox, post contracts to the legal channel in Slack with a link to the file, and save bank statements to our month-end folder in Google Drive. Anything else stays in the inbox and the office gets a note in Slack. If Extracta.ai can't classify a document, send it to the office in Slack.

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

## The flow

[Import this flow](https://flowrunner.ai/downloads/prompt-to-flow/extracta-ai-shared-inbox-sorted-by-type.json)

-   [Extracta.ai](https://flowrunner.ai/integrations/extracta-ai)
-   [Gmail](https://flowrunner.ai/integrations/gmail-service)
-   [Slack](https://flowrunner.ai/integrations/slack)
-   [Google Drive](https://flowrunner.ai/integrations/google-drive-api)

Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. [How importing works](https://docs.flowrunner.ai/manage/flows#importing-a-flow)

## What each step does

1.  New document email Checks the shared inbox in Gmail every 5 minutes for an email with an attachment and saves the file. Emails the mailbox sent itself are skipped.
2.  Classify it in Extracta.ai Sends the file to your classification in Extracta.ai, which returns its document type and a confidence. If it can't be classified, the office gets the file in Slack.
3.  Sure of the type? A type Extracta.ai returns with at least your minimum confidence, 80% to start with, is used as it is.
4.  Ask the office manager Anything less sure goes to the office manager in Slack with Extracta.ai's best guess, a link to the file and four buttons: Invoice, Contract, Bank statement and Something else.
5.  Wait for the office manager's answer The run waits for the click and routes the document the way the office manager said.
6.  Which document? Invoices are forwarded to your AP inbox, contracts are posted to legal in Slack with a link, and bank statements are saved to your month-end folder in Google Drive. Anything else stays in the inbox, with a note to the office in Slack.

## Need it built for you? Our team does custom work.

Tell us the process. Our implementation team at Midnight Flow builds it around how you work, tests it on your real data, and keeps it running, in your own FlowRunner workspace.

[Have us build it](https://midnightflow.ai/packages/custom?utm_source=flowrunner.ai&utm_medium=referral&utm_campaign=general&utm_content=flows.aside&utm_term=extracta-ai-shared-inbox-sorted-by-type)

## Before you turn it on

-   Connect your Gmail, Google Drive and Slack accounts, and enter your Extracta.ai API key from the API page of the Extracta.ai dashboard.
-   In Extracta.ai, set up a classification with the document types Invoice, Contract and Bank statement, and put its ID in the flow setting Classification ID.
-   Set AP inbox to the address invoices are forwarded to, and Month-end folder ID to the Google Drive folder for bank statements. Change Minimum confidence if 0.8 is too strict or too loose for your documents.
-   Copy the URL of the block Wait for the office manager's answer into the flow setting Answer link. The Slack buttons open it.
-   Narrow the Gmail search to your shared inbox address, and pick your channels in the four Slack steps, legal for Post the contract to legal.
-   Forwarded invoices have Invoice in the subject, so the Extracta.ai invoice flow picks them up if it reads the AP inbox.

[Everything FlowRunner does with Extracta.ai](https://flowrunner.ai/integrations/extracta-ai)

---
Markdown version of https://flowrunner.ai/flows/extracta-ai-shared-inbox-sorted-by-type. Site index: https://flowrunner.ai/llms.txt
