← Back to Stock Monitor
Step 1: Create EmailJS Account
- Go to emailjs.com
- Click "Sign Up" in the top right corner
- Choose to sign up with Google, GitHub, or create an account with email
- Complete the registration process
- Verify your email address if required
Free Tier: EmailJS offers 200 free emails per month, which is perfect for stock monitoring!
Step 2: Add Email Service
- Once logged in, go to the Email Services tab
- Click "Add New Service"
- Choose your email provider (Gmail, Outlook, Yahoo, etc.)
- Follow the setup instructions for your chosen provider:
- Gmail: You'll need to enable 2-factor authentication and create an app-specific password
- Outlook: Use your regular email and password
- Other providers: Follow the specific instructions provided
- Test the service to make sure it's working
- Copy the Service ID (e.g., "service_abc123") - you'll need this later
Save this: Service ID: service_xxxxxxxx
Step 3: Create Email Template
- Go to the Email Templates tab
- Click "Create New Template"
- Choose a template name (e.g., "Stock Alert")
- Set up the template with the following content:
Subject Line:
{{subject}}
Email Body:
Hello!
{{message}}
Product Details:
• Name: {{product_name}}
• Link: {{product_url}}
• Alert Time: {{timestamp}}
This alert was sent by your Stock Monitor app.
--
Sent by {{from_name}}
Available Template Variables:
{{to_email}} - Recipient email address
{{to_name}} - Recipient name
{{from_name}} - Sender name (Stock Monitor)
{{subject}} - Email subject
{{message}} - Main email message
{{product_name}} - Product name
{{product_url}} - Product URL
{{timestamp}} - When alert was sent
- Click "Save"
- Test the template by clicking "Test It"
- Copy the Template ID (e.g., "template_xyz789")
Save this: Template ID: template_xxxxxxxx
Step 4: Get Your Public Key
- Go to the Account tab (or Integration tab)
- Find the "Public Key" section
- Copy your public key (it looks like a random string of letters and numbers)
Save this: Public Key: xxxxxxxxxxxxxxxx
Step 5: Configure Stock Monitor
- Go back to your Stock Monitor app
- Check the "Enable email notifications" checkbox
- Click "Email Options" to expand the section
- Fill in all the fields:
- Your email address: Where you want to receive alerts
- EmailJS Service ID: From Step 2
- EmailJS Template ID: From Step 3
- EmailJS Public Key: From Step 4
- Click "Test Email" to verify everything works
- Start monitoring and you'll receive email alerts when products come back in stock!
Troubleshooting
Common Issues:
- "Recipients address is empty": Make sure your template uses
{{to_email}} for the recipient
- "Service not found": Double-check your Service ID
- "Template not found": Double-check your Template ID
- "Authentication failed": Verify your Public Key
- Gmail issues: Make sure you're using an app-specific password, not your regular password
Still having issues? Check the browser console (F12) for detailed error messages.