Skip to content
Finance

Supplier invoices from email

Extracts the PDF data with AI and books it in your ERP.

Request sign-upDownload JSON10 min to set up≈ 3 credits per run

How the flow works

  1. Gmail

    Trigger

    Email with a PDF invoice

    Gmail·new_attachment

  2. OpenAI

    Step 1

    Extract supplier, number, date, net and VAT

    OpenAI·extract-structured-data

  3. Odoo

    Step 2

    Record the invoice in Odoo

    Odoo·create_record

Set it up in 4 steps

  1. 1

    Import the template

    In the platform, go to Flows → Import and upload the JSON.

  2. 2

    Connect your accounts

    Each component asks for its connection (Gmail, OpenAI, Odoo). Credentials are stored encrypted.

  3. 3

    Review the highlighted fields

    Pick the channel, sheet, calendar or pipeline. Missing fields are shown in red.

  4. 4

    Test and turn it on

    Run a test with real data, check each step’s output and publish the flow.

View the template JSON
{
  "name": "Supplier invoices from email",
  "description": "Extracts the PDF data with AI and books it in your ERP.",
  "tags": [
    "Finance"
  ],
  "pieces": [
    "@flooows/component-gmail",
    "@flooows/component-openai",
    "@flooows/component-odoo"
  ],
  "template": {
    "displayName": "Supplier invoices from email",
    "trigger": {
      "name": "trigger",
      "type": "PIECE_TRIGGER",
      "valid": false,
      "displayName": "Email with a PDF invoice",
      "settings": {
        "pieceName": "@flooows/component-gmail",
        "pieceVersion": "~0.18.6",
        "pieceType": "OFFICIAL",
        "packageType": "REGISTRY",
        "triggerName": "new_attachment",
        "input": {
          "filenameExtension": "pdf",
          "subject": "factura"
        },
        "inputUiInfo": {},
        "propertySettings": {}
      },
      "nextAction": {
        "name": "step_1",
        "type": "PIECE",
        "valid": false,
        "skip": false,
        "displayName": "Extract supplier, number, date, net and VAT",
        "settings": {
          "pieceName": "@flooows/component-openai",
          "pieceVersion": "~0.13.2",
          "pieceType": "OFFICIAL",
          "packageType": "REGISTRY",
          "actionName": "extract-structured-data",
          "input": {
            "model": "gpt-4o-mini",
            "text": "{{trigger.attachments[0]}}",
            "params": [
              {
                "propName": "proveedor"
              },
              {
                "propName": "cif"
              },
              {
                "propName": "numero"
              },
              {
                "propName": "fecha"
              },
              {
                "propName": "base"
              },
              {
                "propName": "iva"
              },
              {
                "propName": "total"
              }
            ]
          },
          "inputUiInfo": {},
          "propertySettings": {},
          "errorHandlingOptions": {
            "retryOnFailure": {
              "value": true
            },
            "continueOnFailure": {
              "value": false
            }
          }
        },
        "nextAction": {
          "name": "step_2",
          "type": "PIECE",
          "valid": false,
          "skip": false,
          "displayName": "Record the invoice in Odoo",
          "settings": {
            "pieceName": "@flooows/component-odoo",
            "pieceVersion": "~0.3.4",
            "pieceType": "OFFICIAL",
            "packageType": "REGISTRY",
            "actionName": "create_record",
            "input": {
              "model": "account.move",
              "fields": {
                "move_type": "in_invoice",
                "ref": "{{step_1.numero}}",
                "invoice_date": "{{step_1.fecha}}"
              }
            },
            "inputUiInfo": {},
            "propertySettings": {},
            "errorHandlingOptions": {
              "retryOnFailure": {
                "value": true
              },
              "continueOnFailure": {
                "value": false
              }
            }
          }
        }
      }
    },
    "valid": false,
    "schemaVersion": "1"
  },
  "blogUrl": "https://flooows.com/en/templates/supplier-invoices-from-email",
  "metadata": {
    "publisher": "flooows",
    "lang": "en",
    "setupMinutes": 10,
    "creditsPerRun": 3
  }
}

More templates

Your first floow, running today.

Work out the price of your plan in a minute and request your sign-up, or book a demo and we will help your team design its first flows.

✓ No credit card✓ Human support✓ Data hosted in Spain