Zum Inhalt springen
NEUMarktplatz und dein Team: Verkaufe, was du baust, und bekomm Pläne und Änderungen, die getestet sind, bevor du sie siehst. Neuigkeiten ansehen

Bibliothek / KI-Agenten & Assistenten

KI-Agenten & Assistenten

Lagernachbestellungen aus Excel-Berichten mit Google Drive und OpenAI berechnen

Überwacht einen Google-Drive-Ordner auf neue XLSX-Inventarberichte, berechnet mit GPT-4.1 mini pro Charge die Nachbestellmengen und Begründungen und schreibt die Ergebnisse zurück in die Datei.

Was sie bewirkt

## Calculate stock replenishment from an Excel report with AI ### How it works 1. A Google Drive trigger watches a folder for new XLSX inventory reports. 2. The file is downloaded, parsed and split into batches of 15 rows. 3. For each batch, a Code node builds a compact product list (sales, purchases, warehouse and store stock) and GPT-4.1 mini returns how many units to reorder plus a one-sentence reason. 4. The answers are written back to each row as columns AB (need) and AC (reason). 5. All rows are reassembled in order, converted back to XLSX, the original file is updated and moved to an output folder. ### Setup - [ ] Google Drive: in Google Cloud Console (cloud.google.com) create an OAuth Client ID and Client Secret and add them as a Google Drive credential - [ ] Pick the folder to watch in Trigger_XLSX_Uploaded_to_Drive - [ ] Once Drive is connected, open Download XLSX, Update Sheet and Move To New Folder so they use the credential, and choose your output folder - [ ] OpenAI: add your API key credential to Message a model - [ ] Replace MARKA ADI in the system prompt with your brand name ### Customization The Code nodes and AI prompt are built around one specific spreadsheet's column names, so other files will need changes: - Paste the Code node scripts and the AI prompt into ChatGPT, share your column names or upload your Excel file, and ask it to adapt them - Change batchSize in Code: ChunkToBatches to balance speed and token usage

Die Schritte

  1. Loop Over Items
  2. Code: ChunkToBatches
  3. Code: BuildPrompt
  4. Code: MapBack
  5. Code: Reassemble
  6. Extract from XLSX
  7. Convert to XLSX
  8. Download XLSX
  9. Trigger_XLSX_Uploaded_to_Drive
  10. Move To New Folder
  11. Update Sheet
  12. Message a model

Ähnliche Automatisierungen