Explanation :
- Emails are received in Gmail, they can stay in the inbox or be in a specific label.
- Apps script will check if there is new emails, when there is a new emails it extracts the data and send the invoices attached to Document AI.
- Document AI perform analysis of the file and return a json structured file with all items identified.
- Apps Script will then store the data extracted in a Google Sheets and archive the file in a dedicated Google Drive folder.