❄️ Winter Sale: 40% OFF AIWU
WINTER_SECRET
Valid until Mar 1st
Automated Weekly Newsletter from Database - AIWU – AI Plugin for WordPress

Automated Weekly Newsletter from Database

Content Email Medium

Automatically fetch active subscribers from your MySQL database every week and send each one an AI-generated newsletter. Get a summary notification in Telegram when the campaign completes. Use Case You have a subscribers table in your database and want to send weekly newsletters without manual work. This workflow runs automatically every 7 days, queries active subscribers, generates content with AI, sends personalized emails, and notifies you with delivery statistics.

Automated Weekly Newsletter from Database workflow template preview
JSON Workflow Template
Automated-Weekly-Newsletter-from-Database.json 3 KB JSON
Download JSON

📋 How to Build This Workflow

1

Schedule Trigger

Set up weekly automation.
Mode: Interval
Frequency: 7 days
Start date: Select your preferred start date and time
2

MySQL Execute Query

Fetch active subscribers from database.
Account: Select your MySQL connection
Query: SELECT id, email, name, subscription_type FROM subscribers WHERE status = 'active'
Info: Adjust table name and columns to match your database structure.
3

Open AI Generate Text

Iterate through each subscriber.
Model: gpt-4o
Max Tokens: 4096
Temperature: 0.7
Prompt: Write a short friendly email for a weekly newsletter to subscribers. Topic: this week's news in AI industry. Keep it concise, 3-4 sentences. Do not include subject line.
Info: Customize the topic to match your business.
4

Loop Custom Array

Iterate through each subscriber.
Json: {{node#2.result_data}}
5

Send Email (LOOP output)

Send email to each subscriber.
To Email: {{node#4.json_field[email]}}
To Name: {{node#4.json_field[name]}}
Subject: Weekly AI Newsletter
Message: Hi {{node#4.json_field[name]}}!{{node#3.content}}Best regards,AIWU Team
6

Send Telegram Message (END output)

Receive summary when complete.
Account: Select your Telegram bot
Text: Weekly newsletter completed!📊 Statistics:• Total subscribers: {{node#4.count_steps}}• Successfully sent: {{node#4.count_success}}• Errors: {{node#4.count_errors}}

💡 Pro Tips

  • Test with LIMIT 5 in your SQL query first to verify everything works
  • Make sure your MySQL connection is configured in AIWU Integrations tab
  • Customize the AI prompt to match your newsletter topic

Ready to Build This Workflow?

AIWU Workflow Builder lets you recreate this template in minutes without writing code. Free visual automation tool that runs directly on your WordPress site.

Free Forever
No monthly fees, unlimited workflows
Visual Builder
Drag-and-drop, no code needed
🔑
Your API Keys
Use OpenAI, Claude, or any provider
Explore Workflow Builder
Scroll to Top