-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinal_campaign.py
More file actions
71 lines (55 loc) · 2.11 KB
/
final_campaign.py
File metadata and controls
71 lines (55 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python3
"""Final working email campaign with Bedrock Nova."""
import asyncio
from ai_email_generator import AIEmailGenerator
async def run_final_campaign():
"""Run production-ready email campaign."""
print("🚀 Production Email Campaign - Bedrock Nova")
print("=" * 50)
# Add your real contacts here (manually or from CSV)
contacts = [
{
"name": "Andreas Garcia",
"email": "andreas@allcode.com",
"company": "AllCode",
"title": "Account Executive",
"industry": "Cloud Services",
},
{
"name": "Joel Garcia",
"email": "joel@allcode.com",
"company": "AllCode",
"title": "CEO",
"industry": "Technology",
},
]
ai_generator = AIEmailGenerator()
for i, contact in enumerate(contacts, 1):
print(f"\n📤 Contact {i}: {contact['name']} ({contact['email']})")
try:
# Create profile data
profile_data = {
"name": contact["name"],
"company": contact["company"],
"job_title": contact["title"],
"about": f"Professional in {contact['industry']} at {contact['company']}",
}
# Format for AI
profile_info = ai_generator.format_profile_for_ai(profile_data)
first_name = contact["name"].split()[0]
# Generate email with Bedrock Nova
print("🤖 Generating Bedrock Nova email...")
ai_email = await ai_generator.generate_ai_email(profile_info, first_name)
print("✅ Generated Email:")
print("-" * 50)
print(ai_email)
print("-" * 50)
# Here you can add CCAI email sending
# await send_via_ccai(contact, ai_email)
except Exception as e:
print(f"❌ Error: {e}")
print("\n🎉 Campaign completed!")
print("💡 Add more contacts to the 'contacts' list above")
print("💡 Integrate with CCAI for actual sending")
if __name__ == "__main__":
asyncio.run(run_final_campaign())