Intelligent sales automation for SAP Business One that connects ERP data with AI models to generate actionable insights with n8n, automated reports in Google Sheets, and real-time notifications via Telegram.
This n8n workflow connects SAP Business One with Google Sheets, Telegram, and Google's Gemma AI to automate sales reporting. The workflow extracts sales orders from SAP Service Layer, syncs them to Google Sheets for tracking, and uses AI to analyze daily performance trends. Sales summaries with key metrics and insights are automatically sent via Telegram each day. This setup eliminates manual data entry and report generation, helping small to midsize businesses reduce errors and make faster decisions based on real-time sales data.
Key capabilities:
- Real-time sales order extraction via Service Layer API
- AI-powered trend detection and recommendations
- Automated Google Sheets synchronization
- Daily Telegram summaries with key metrics
- n8n - Workflow orchestration (Docker deployment)
- SAP Business One 10+ - ERP system with Service Layer
- Google Gemma AI - Open source Natural language analysis
- Google Sheets API - Data storage and reporting
- Telegram Bot API - Notification delivery
To implement this automation, you need:
- SAP Business One Access: Valid database (e.g., SBODemoUS) with authorized username, password, and active Service Layer
- Docker Experience: Familiarity with installing and running Docker Desktop to deploy n8n
- Google Account: Access to Google Sheets and Google Cloud Platform for API setup (OAuth2 authentication)
- Telegram Account: To create a bot and obtain user ID for notifications
- n8n Account: Free or trial account at n8n.io, or self-hosted instance via Docker
- Basic JavaScript Knowledge: Understanding of JavaScript syntax to customize code snippets in workflow nodes
- Create a new workflow in n8n
- Configure SAP Service Layer credentials
- Set up Google Sheets and Gemma AI credentials
- Create Telegram bot and add token
- Add Code nodes and paste JavaScript codes
- Connect nodes and activate workflow
For detailed setup instructions including Docker deployment, API configuration, and troubleshooting, see the complete documentation.
The workflow uses JavaScript Code nodes for data processing and AI prompt generation:
- Sales Data Processor - Filters sales by date, calculates metrics, generates structured AI prompts
- Additional Processing - Supporting workflow operations
This workflow can save hours of manual work and bring real-time visibility into sales performance. Once running, it delivers daily reports to Telegram without manual input, while the AI analysis identifies patterns that manual reviews might miss.
The initial setup takes a few hours, but the time investment pays off quickly. If you have Docker running and basic JavaScript knowledge, implementation is straightforward. Beyond sales reporting, this same approach extends to other SAP B1 modules like purchasing or inventory management, making it a cost-effective alternative to enterprise automation platforms with more control over what gets reported.
- Full Tutorial (PDF) - Complete implementation guide with screenshots
- LinkedIn Post - Project overview and business impact
- Code Gists - JavaScript snippets for Code nodes
Additional SAP Business One Developed Solutions:
- Advanced ATP and Delivery Schedule Management
- Hidden Sales Insights
- Business Partner Management Enhancement
- Sales Restriction
View all projects: GitHub Repository
