{
 "name": "RecipeAgents: Invoice PDFs from email into a sheet",
 "nodes": [
  {
   "parameters": {
    "pollTimes": {
     "item": [
      {
       "mode": "everyMinute"
      }
     ]
    },
    "simple": false,
    "filters": {
     "q": "in:inbox -category:promotions"
    },
    "options": {}
   },
   "id": "a6627e33-6154-4803-8599-ff66095da1ba",
   "name": "Gmail Trigger",
   "type": "n8n-nodes-base.gmailTrigger",
   "typeVersion": 1.2,
   "position": [
    240,
    300
   ]
  },
  {
   "parameters": {
    "modelId": {
     "__rl": true,
     "value": "gpt-4o-mini",
     "mode": "list",
     "cachedResultName": "GPT-4O-MINI"
    },
    "messages": {
     "values": [
      {
       "content": "=Extract from this invoice text: vendor, invoice_number, date (YYYY-MM-DD), currency, net, vat, total. Return JSON; use null for missing fields; never compute values that aren't printed. Text: {{ JSON.stringify($json) }}"
      }
     ]
    },
    "jsonOutput": true,
    "options": {}
   },
   "id": "bcba8698-ccd2-4d5c-ac90-d4cb9991ef34",
   "name": "AI step",
   "type": "@n8n/n8n-nodes-langchain.openAi",
   "typeVersion": 1.8,
   "position": [
    500,
    300
   ]
  },
  {
   "parameters": {
    "operation": "append",
    "documentId": {
     "__rl": true,
     "value": "",
     "mode": "list"
    },
    "sheetName": {
     "__rl": true,
     "value": "",
     "mode": "list"
    },
    "columns": {
     "mappingMode": "autoMapInputData",
     "value": {}
    },
    "options": {}
   },
   "id": "1b73722e-532f-4854-aaa3-c2b770004aa5",
   "name": "Append to Sheet",
   "type": "n8n-nodes-base.googleSheets",
   "typeVersion": 4.5,
   "position": [
    760,
    300
   ]
  },
  {
   "parameters": {
    "content": "## Invoice PDFs from email into a sheet\nFrom recipeagents.usestarbase.com/recipes/invoice-pdf-to-sheet\n\n1. Connect credentials on each node (Google, OpenAI, Slack).\n2. Pick your sheet/folder/channel and model.\n3. Run once with test data and check the output before activating.\nKeep a human check on anything customer-facing.",
    "height": 260,
    "width": 420
   },
   "id": "5a6f098a-c86f-41d6-a28c-e71bd8206383",
   "name": "Read me",
   "type": "n8n-nodes-base.stickyNote",
   "typeVersion": 1,
   "position": [
    200,
    20
   ]
  }
 ],
 "connections": {
  "Gmail Trigger": {
   "main": [
    [
     {
      "node": "AI step",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "AI step": {
   "main": [
    [
     {
      "node": "Append to Sheet",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "pinData": {},
 "active": false,
 "settings": {
  "executionOrder": "v1"
 },
 "meta": {
  "templateCredsSetupCompleted": false
 },
 "tags": []
}