Библиотека / ИИ-агенты и ассистенты
ИИ-агенты и ассистенты
Расчет пополнения запасов по Excel-отчетам с помощью Google Drive и OpenAI
Отслеживает папку Google Drive на наличие новых XLSX-отчетов об инвентаре, с помощью GPT-4.1 mini рассчитывает объемы дозаказа и причины для каждой партии и записывает результаты обратно в файл.
Что делает
## 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
Шаги
- Loop Over Items
- Code: ChunkToBatches
- Code: BuildPrompt
- Code: MapBack
- Code: Reassemble
- Extract from XLSX
- Convert to XLSX
- Download XLSX
- Trigger_XLSX_Uploaded_to_Drive
- Move To New Folder
- Update Sheet
- Message a model
Похожие автоматизации
Веб-скрейпинг и исследованияСкрейпинг сайтов в Sheets, Excel и CSV по e-mailШагов: 10Автоматизация эл. почтыExtract consultant hours from PDF timesheets with Azure OpenAI and ExcelШагов: 9Синхронизация данных и ETLПолучение данных из листа Microsoft ExcelШагов: 2Финансы, счета и бухгалтерияСоздание пяти японских налоговых отчётов в Excel из Money Forward и Google DriveШагов: 44