Automatic Email-to-Print Service for Shopify Orders
Turn your computer into a smart print server that automatically prints orders, receipts, and shipping labels from your email inbox.
- What is FlowPrint?
- How It Works
- Features
- Quick Start
- Installation
- Configuration
- Shopify Integration
- Email Server Setup
- Running FlowPrint
- Troubleshooting
- FAQ
- Security
- Contributing
- License
FlowPrint is a Python-based service that monitors your email inbox and automatically prints HTML-formatted emails using Google Chrome. It's perfect for Shopify store owners who want to automate their order printing workflow without expensive third-party services.
- 📦 Shopify store owners who need automated order printing
- 🏪 Small businesses looking to streamline fulfillment
- 📮 Shipping departments that handle high order volumes
- 🖨️ Anyone who needs to automatically print formatted emails
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Shopify │ ──────> │ Email │ ──────> │ FlowPrint │
│ Store │ Order │ Inbox │ IMAP │ Service │
└─────────────┘ Created └──────────────┘ Monitor └─────────────┘
│
│ Auto Print
▼
┌──────────┐
│ Printer │
│ 🖨️ │
└──────────┘
- Customer places order on your Shopify store
- Shopify Flow sends email with order details to your monitored inbox
- FlowPrint detects the email (by subject prefix like
[PRINT PACK]) - Chrome automatically prints the formatted HTML email
- Order is ready for picking and packing!
|
|
Get FlowPrint running in 3 minutes:
# 1. Clone the repository
git clone https://github.com/NotDonaldTrump/FlowPrint.git
cd FlowPrint
# 2. Run FlowPrint (auto-installs dependencies)
python FlowPrint.pyThat's it! FlowPrint will:
- ✅ Check for and install any missing dependencies
- ✅ Open the web dashboard in your browser
- ✅ Guide you through configuration
Note: First-time users should set up in manual mode to configure printer settings. See Installation Guide
Before installing FlowPrint, ensure you have:
| Requirement | Download Link | Notes |
|---|---|---|
| Python 3.7+ | python.org | ✅ Check "Add Python to PATH" during install |
| Google Chrome | google.com/chrome | Must be installed in default location |
| Email Account | - | Gmail, Outlook, or any IMAP-enabled email |
Option A: Git Clone (Recommended)
git clone https://github.com/NotDonaldTrump/FlowPrint.git
cd FlowPrintOption B: Download ZIP
- Go to GitHub Repository
- Click "Code" → "Download ZIP"
- Extract the ZIP file
- Open terminal/command prompt in the extracted folder
python FlowPrint.pyFlowPrint will automatically:
- ✅ Detect missing Python packages
- ✅ Install Flask, Flask-SocketIO, and dependencies
- ✅ Open web dashboard at
http://localhost:5000
Windows Users: If Python isn't recognized, use
python3orpyinstead ofpython
The web dashboard will open automatically. You'll need to configure:
Email Settings:
- IMAP Server (e.g.,
imap.gmail.com) - Email address and password/app password
- Mailbox folder (usually
Inbox)
Behavior Settings:
- Subject prefix filter (e.g.,
[PRINT PACK]) - Polling interval (how often to check for emails)
- Auto-print enabled/disabled
See Configuration Guide for detailed settings.
FlowPrint is configured through the web dashboard at http://localhost:5000
Configure your email server connection:
| Setting | Example | Description |
|---|---|---|
| IMAP Server | imap.gmail.com |
Your email provider's IMAP server |
| Port | 993 |
IMAP SSL port (usually 993) |
| Use SSL | ✅ Enabled | Always use SSL for security |
| Email Address | orders@mystore.com |
Your email account |
| Password | app-password-here |
Email password or app-specific password |
| Mailbox | Inbox |
Folder to monitor |
Configure how FlowPrint processes emails:
| Setting | Default | Description |
|---|---|---|
| Polling Interval | 30 seconds |
How often to check for new emails |
| Subject Prefix | [PRINT PACK] |
Only emails starting with this will print |
| Auto Print | ✅ Enabled | Automatically print without dialog |
| Delete After Print | ❌ Disabled | Delete email after successful print |
⚠️ Warning: Only enable "Delete After Print" after thorough testing!
Fine-tune performance and behavior:
| Setting | Default | Description |
|---|---|---|
| Chrome Path | Auto-detect | Custom Chrome installation path |
| Print Wait Time | 8 seconds |
How long to wait before closing Chrome |
| Temp Cleanup | ✅ Enabled | Automatically clean temporary files |
| Cleanup Interval | 6 hours |
How often to cleanup temp files |
FlowPrint integrates with Shopify using Shopify Flow to automatically send order notifications that get printed.
Shopify Order Created → Shopify Flow → Send Email → FlowPrint → Printer
Navigate to: Shopify Admin → Apps → Shopify Flow
Don't see Flow? You need Shopify Plus, or install the Shopify Flow app (available on Advanced plans)
- Click "Create workflow"
- Name it:
FlowPrint - Auto Print Orders - Add a description (optional)
Choose Trigger: Order created
This fires when any new order is placed in your store.
Optional Filters (click "Add condition"):
- ✅ Financial status = Paid
- ✅ Fulfillment status = Unfulfilled
- ✅ Shipping method = specific methods
- ✅ Order tags = specific tags
- Click "Then..." → "Add action"
- Search for: "Send internal email"
- Configure email:
📧 To: Your monitored email (e.g., orders@mystore.com)
📝 Subject:
[PRINT PACK] Order {{order.name}}
⚠️ CRITICAL: Subject MUST start with your configured prefix (default:[PRINT PACK])
📄 Body: Use the provided template below or create your own
FlowPrint includes a complete example template: example-shopify-flow-email-template.html
This template includes:
- 📄 Page 1: Staff summary with key order details
- 📄 Page 2: Detailed packing list with all items
- 📄 Page 3: Customer shipping address (large, easy to read)
To use the template:
- Open
example-shopify-flow-email-template.htmlin a text editor - Customize the store name and logo section
- Copy the entire HTML content
- Paste into the "Body" field in Shopify Flow
- Customize any additional fields as needed
Key Liquid Variables Available:
{{order.name}}- Order number{{order.customer.firstName}}- Customer first name{{order.email}}- Customer email{{order.currentTotalPrice}}- Order total{{order.shippingAddress.address1}}- Shipping address- And many more! See Shopify Liquid docs
- Click "Turn on workflow" in Shopify Flow
- Place a test order in your store
- Watch FlowPrint dashboard for incoming email
- Verify print output matches your expectations
Tips for great print templates:
✅ DO:
- Use clear, readable fonts (Arial, Helvetica)
- Include page breaks:
<div class="page-break"></div> - Use high contrast (black text on white background)
- Test print output before going live
- Include all information pickers need
❌ DON'T:
- Use tiny font sizes (< 10pt)
- Rely on color coding alone
- Create overly complex layouts
- Forget to test with real order data
Gmail requires an App Password for IMAP access:
- Go to Google Account Security
- Enable 2-Step Verification if not already enabled
- Scroll to "App passwords" section
- Click "Select app" → Choose "Mail"
- Click "Select device" → Choose "Other" → Enter "FlowPrint"
- Click "Generate"
- Copy the 16-character password (no spaces)
- Open Gmail Settings
- Go to "Forwarding and POP/IMAP" tab
- Enable "IMAP access"
- Click "Save Changes"
IMAP Server: imap.gmail.com
Port: 993
Use SSL: ✅ Enabled
Email: your-email@gmail.com
Password: [16-character app password]
IMAP is enabled by default for Outlook.com accounts
- Go to Microsoft Account Security
- Check for any security alerts
- Approve FlowPrint access if prompted
IMAP Server: outlook.office365.com
Port: 993
Use SSL: ✅ Enabled
Email: your-email@outlook.com
Password: [your account password]
Using a custom email server? You'll need:
| Information | Where to Find |
|---|---|
| IMAP Server Address | Contact your email provider or IT admin |
| IMAP Port | Usually 993 (SSL) or 143 (non-SSL) |
| SSL Enabled | Recommended for security |
| Username | Usually your full email address |
| Password | Your email account password |
Common Business Email Providers:
| Provider | IMAP Server | Port |
|---|---|---|
| Google Workspace | imap.gmail.com |
993 |
| Microsoft 365 | outlook.office365.com |
993 |
| Yahoo Mail | imap.mail.yahoo.com |
993 |
| iCloud Mail | imap.mail.me.com |
993 |
| Zoho Mail | imap.zoho.com |
993 |
Recommended for first-time setup:
python FlowPrint.py- Dashboard opens at
http://localhost:5000 - Configure your email settings
- Click "Save" to save configuration
- Click "Start" to begin monitoring
- Send a test email with your subject prefix
- Verify the print settings and output
- Adjust Chrome print settings if needed
First Print Setup:
- FlowPrint will open Chrome's print dialog on first run
- Set your default printer
- Configure paper size, orientation, margins
- Check "System dialog" if you need advanced options
- These settings are saved automatically
Once you've tested and configured FlowPrint, run it as a system service for automatic startup.
Option 1: Basic Startup (Current User)
- Press
Win + R, typeshell:startup, press Enter - Create a shortcut to
FlowPrint.py - Right-click shortcut → Properties
- Set "Target" to:
C:\Path\To\python.exe "C:\Path\To\FlowPrint\FlowPrint.py" - Click OK
Option 2: Task Scheduler (All Users, Best for Production)
- Open Task Scheduler (
taskschd.msc) - Click "Create Basic Task"
- Name:
FlowPrint Service - Trigger: "When the computer starts"
- Action: "Start a program"
- Program:
C:\Path\To\python.exe - Arguments:
"C:\Path\To\FlowPrint\FlowPrint.py" - Start in:
C:\Path\To\FlowPrint - Check "Run whether user is logged on or not"
- Check "Run with highest privileges"
Create service file:
sudo nano /etc/systemd/system/flowprint.serviceAdd this content:
[Unit]
Description=FlowPrint Automatic Email-to-Print Service
After=network.target
[Service]
Type=simple
User=yourusername
WorkingDirectory=/path/to/FlowPrint
ExecStart=/usr/bin/python3 /path/to/FlowPrint/FlowPrint.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.targetEnable and start:
# Reload systemd
sudo systemctl daemon-reload
# Enable service (start on boot)
sudo systemctl enable flowprint
# Start service now
sudo systemctl start flowprint
# Check status
sudo systemctl status flowprint
# View logs
sudo journalctl -u flowprint -fUseful commands:
sudo systemctl stop flowprint # Stop service
sudo systemctl restart flowprint # Restart service
sudo systemctl disable flowprint # Disable auto-startCreate plist file:
nano ~/Library/LaunchAgents/com.flowprint.plistAdd this content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.flowprint</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/python3</string>
<string>/path/to/FlowPrint/FlowPrint.py</string>
</array>
<key>WorkingDirectory</key>
<string>/path/to/FlowPrint</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/flowprint.log</string>
<key>StandardErrorPath</key>
<string>/tmp/flowprint.error.log</string>
</dict>
</plist>Load and start:
# Load the service
launchctl load ~/Library/LaunchAgents/com.flowprint.plist
# Unload (stop)
launchctl unload ~/Library/LaunchAgents/com.flowprint.plist
# View logs
tail -f /tmp/flowprint.log🔴 "Authentication Failed" Error
Problem: Can't connect to email server
Solutions:
- ✅ Gmail users: Create and use an App Password (not regular password)
- ✅ Outlook users: Ensure IMAP is enabled
- ✅ All users: Double-check username and password (no typos!)
- ✅ Verify IMAP server address is correct
- ✅ Check port is 993 with SSL enabled
- ✅ Disable 2FA temporarily to test (not recommended long-term)
🔴 Nothing Prints When Email Arrives
Problem: Emails detected but not printing
Solutions:
- ✅ Check "Auto Print Enabled" is turned ON in dashboard
- ✅ Verify default printer is set in your OS
- ✅ Ensure printer is online and has paper/ink
- ✅ Check
flowprint.logfile for error messages - ✅ Test print from another application to verify printer works
- ✅ Try increasing "Chrome Print Wait Time" to 15 seconds
🔴 Prints Are Cut Off or Incomplete
Problem: Printed output is truncated
Solutions:
- ✅ Increase "Chrome Print Wait Time" to 15+ seconds
- ✅ Check paper size matches template design (usually Letter or A4)
- ✅ Verify printer settings (margins, orientation)
- ✅ Test with simpler template to isolate issue
- ✅ Check Chrome print preview (disable auto-print temporarily)
🔴 "Chrome Not Found" Error
Problem: FlowPrint can't locate Google Chrome
Solutions:
- ✅ Install Google Chrome from google.com/chrome
- ✅ Install in default location (don't use portable version)
- ✅ Windows: Check
C:\Program Files\Google\Chrome\Application\chrome.exeexists - ✅ Mac: Check
/Applications/Google Chrome.appexists - ✅ Linux: Install via
sudo apt install google-chrome-stable - ✅ Or set custom path in "Advanced Settings" → "Chrome Path"
🔴 Dashboard Won't Open
Problem: Browser doesn't open or shows error
Solutions:
- ✅ Manually open browser and go to
http://localhost:5000 - ✅ Check port 5000 isn't already in use by another app
- ✅ Try different port (edit
FlowPrint.pyif needed) - ✅ Check firewall isn't blocking Python
- ✅ Verify Flask installed correctly:
pip list | grep Flask
🔴 High CPU Usage
Problem: FlowPrint uses too much CPU
Solutions:
- ✅ Increase polling interval (try 60 seconds instead of 30)
- ✅ Disable temp file cleanup if not needed
- ✅ Check for stuck Chrome processes:
ps aux | grep chrome - ✅ Restart FlowPrint service
- ✅ Review
flowprint.logfor repeated errors
🔴 Duplicate Prints
Problem: Same email prints multiple times
Solutions:
- ✅ Don't run multiple FlowPrint instances on same email
- ✅ Check
printed_uids.txtfile exists and isn't corrupted - ✅ Verify polling interval isn't too short (minimum 15 seconds)
- ✅ Ensure email isn't being moved/copied to monitored folder repeatedly
Log file location: flowprint.log in FlowPrint directory
View logs:
# Windows (PowerShell)
Get-Content flowprint.log -Tail 50 -Wait
# Linux/Mac
tail -f flowprint.log
# Search for errors
grep ERROR flowprint.logLog format:
[2024-11-18 14:30:22] [INFO] Service started
[2024-11-18 14:30:25] [SUCCESS] Connected to mailbox
[2024-11-18 14:31:10] [SUCCESS] Printed: Order #1234
[2024-11-18 14:32:00] [ERROR] Print failed: Chrome timeout
Q: Do I need Shopify to use FlowPrint?
A: No! FlowPrint works with any email source. While it's designed for Shopify stores, you can use it with:
- WooCommerce
- BigCommerce
- Etsy
- eBay
- Any system that sends HTML emails
- Manual emails you send yourself
Just ensure emails have the correct subject prefix.
Q: Can I print to multiple printers?
A: Currently FlowPrint prints to your system's default printer. To use multiple printers:
- Run multiple FlowPrint instances (different folders)
- Use different email addresses or subject prefixes for each
- Change default printer between instances
- Or modify the code to specify printers (advanced)
Q: Can I print to PDF instead of a physical printer?
A: Yes! Set your default printer to:
- Windows: "Microsoft Print to PDF"
- Mac: "Save as PDF"
- Linux: "Print to File"
Q: How many emails can FlowPrint handle per hour?
A: FlowPrint has been tested with 100+ emails per hour. Performance depends on:
- Print speed of your printer
- Complexity of email templates
- Chrome print wait time setting
- Computer specifications
Q: What happens if my computer restarts?
A: If you've set up FlowPrint as a service (see Running as a Service), it will:
- ✅ Automatically start when computer boots
- ✅ Resume monitoring from where it left off
- ✅ Not reprint already-printed emails (tracked in
printed_uids.txt)
Q: Is my email password secure?
A: FlowPrint stores your password in flowprint_config.json as plain text on your local computer. Security recommendations:
- ✅ Use app-specific passwords (Gmail, Outlook)
- ✅ Keep FlowPrint computer physically secure
- ✅ Don't share the config file
- ✅ Use a dedicated email account for printing only
- ✅ For production, consider environment variables (advanced)
Q: Can multiple computers monitor the same email?
A: Not recommended - this causes duplicate prints. Instead:
- Use one FlowPrint instance per email account
- Or use different subject prefixes for different printers
- Or use email folders and have each instance monitor a different folder
Q: Does FlowPrint have a web dashboard?
A: Yes! FlowPrint includes a modern web dashboard at http://localhost:5000 with:
- Real-time service status
- Live job statistics
- Configuration interface
- Dark/Light theme toggle
- Manual email checking
- Recent job history
Q: Can I customize the email templates?
A: Yes! FlowPrint prints whatever HTML is in the email body. You can:
- Modify the included
example-shopify-flow-email-template.html - Create your own templates using HTML/CSS
- Use Shopify Flow's email editor
- Add your own branding, logos, colors
- Include multiple pages with page breaks
Q: What if I delete the printed_uids.txt file?
A: FlowPrint will reprint all emails in your inbox that match the subject prefix. To safely reset:
- Stop FlowPrint service
- Delete
printed_uids.txt - Manually clean out your email inbox (or use a different folder)
- Start FlowPrint service
- Use app-specific passwords (Gmail, Outlook, etc.) instead of main account passwords
- Enable 2FA on your email account
- Use SSL for all IMAP connections (always enabled in FlowPrint)
- Dedicated email account - Consider a separate email just for printing
- Regular password rotation - Change passwords periodically
- Printed documents contain customer data - Ensure physical security of printer area
- Secure the computer running FlowPrint - Use password protection
- Lock the room where printer is located if handling sensitive information
- Don't commit passwords to Git - Add
flowprint_config.jsonto.gitignore - Restrict file permissions on Linux/Mac:
chmod 600 flowprint_config.json
- Use environment variables for production (advanced users):
import os IMAP_PASSWORD = os.getenv('FLOWPRINT_PASSWORD', 'fallback')
- Use secure networks - Avoid public WiFi when possible
- Consider VPN for remote FlowPrint servers
- Firewall rules - Restrict access to port 5000 if needed
The "Delete Email After Print" option is available but use with extreme caution:
- ❌ Don't enable until thoroughly tested
- ❌ Don't rely on this as your only order record
- ✅ Do maintain separate order backups (Shopify has this built-in)
- ✅ Do test extensively in a test environment first
- ✅ Consider using email rules to move to "Processed" folder instead
Contributions are welcome! FlowPrint is open-source and community-driven.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly (see testing guidelines below)
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Before submitting a PR, please test:
- ✅ Different email providers (Gmail, Outlook, etc.)
- ✅ Both auto-print and manual print modes
- ✅ Various email template formats
- ✅ Error handling (wrong credentials, network issues)
- ✅ Startup/shutdown behavior
- ✅ Cross-platform compatibility (if possible)
- Follow PEP 8 Python style guide
- Add comments for complex logic
- Update README for new features
- Keep functions focused and modular
- Maintain existing code structure
Found a bug? Please create an issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Your environment: OS, Python version, email provider
- Log excerpts from
flowprint.log(remove sensitive info!)
Have an idea? Create an issue describing:
- What problem it solves
- How it would work
- Why it would be useful to other users
This project is licensed under the GNU General Public License v3.0.
✅ You CAN:
- Use FlowPrint commercially
- Modify the source code
- Distribute modified versions
- Use it privately
❌ You MUST:
- Keep the same GPL-3.0 license
- Disclose source code of modifications
- State changes you made
- Include the original copyright notice
📄 Full license: See LICENSE file
- Built for the Shopify community
- Inspired by the need for simple, reliable automated printing
- Thanks to all contributors and users!
- 🐛 Issues: GitHub Issues
- 📂 Repository: github.com/NotDonaldTrump/FlowPrint
- 📖 Documentation: This README
- 💬 Discussions: GitHub Discussions
Made with ❤️ for the Shopify community
⭐ Star this repo if FlowPrint helps your business!