Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Email Automation

Email Automation

Sync warehouse stock from SFTP to GoHighLevel and iPaper with alerts

On a schedule, it handles email using SMTP Email, FTP.

What it does

## 🏭 Warehouse Automation Hub – FTP Stock Sync to GHL & iPaper ### How it works Three times a day, the workflow connects to the warehouse SFTP server, lists the /outbound/stock/ directory, and downloads the latest CSV file. The CSV is parsed and each row is validated and transformed — checking required fields, normalising numeric types, and flagging any item with stock ≤ 10 as a low-stock alert. Valid products are split into batches of 50 and synced in parallel to two systems: GoHighLevel (product + stock update) and iPaper (catalogue sync). After all batches are processed, an acknowledgement CSV is written back to the SFTP server at /inbound/acknowledgements/. If low-stock items were found, an alert email goes out. If any rows failed validation, an error report email is sent. The run is logged to execution custom data throughout. ### Setup steps 1. Add your SFTP credential to all three FTP nodes. 2. Set the following environment variables in your n8n instance: IPAPER_API_URL, GHL_BASE_URL, and NOTIFY_FROM_EMAIL. 3. Update the recipient email addresses in Email - Low Stock Alert and Email - Error Notification. 4. Add authentication headers to the GHL - Update Product and Stock and iPaper - Sync Catalogue HTTP nodes (GHL Bearer token, iPaper API key). 5. Confirm the SFTP paths /outbound/stock/ and /inbound/acknowledgements/ match your warehouse server layout. 6. Activate the schedule trigger.

The steps

  1. Email - Error Notification
  2. Has Errors?
  3. Build Error Report
  4. Email - Low Stock Alert
  5. Low Stock Alert Check
  6. Log Completion
  7. FTP - Write Acknowledgement
  8. Build Acknowledgement File
  9. iPaper - Sync Catalogue
  10. GHL - Update Product and Stock
  11. Split Into Batches (50)
  12. Validate and Transform Data
  13. Parse CSV Data
  14. FTP - Download Stock File

17 steps in total.

Similar automations