-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbedrock_campaign.py
More file actions
67 lines (53 loc) · 1.97 KB
/
bedrock_campaign.py
File metadata and controls
67 lines (53 loc) · 1.97 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
#!/usr/bin/env python3
"""Bedrock Nova email campaign with mock LinkedIn data."""
import asyncio
from ai_email_generator import AIEmailGenerator
async def run_bedrock_campaign():
"""Run email campaign using Bedrock Nova."""
print("🚀 Bedrock Nova Email Campaign")
print("=" * 40)
# Mock LinkedIn profiles (replace with real data when scraping works)
contacts = [
{
"name": "Andreas Garcia",
"email": "andreas@allcode.com",
"profile": {
"name": "Andreas Garcia",
"company": "AllCode",
"job_title": "Account Executive",
"about": "Experienced in cloud solutions and AWS architecture",
},
},
{
"name": "Joel Garcia",
"email": "joel@allcode.com",
"profile": {
"name": "Joel Garcia",
"company": "AllCode",
"job_title": "CEO",
"about": "Leading cloud transformation initiatives",
},
},
]
ai_generator = AIEmailGenerator()
for i, contact in enumerate(contacts, 1):
print(f"\n📤 Contact {i}: {contact['name']} ({contact['email']})")
try:
# Format profile for AI
profile_info = ai_generator.format_profile_for_ai(contact["profile"])
first_name = contact["name"].split()[0]
# Generate email using 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)
except Exception as e:
print(f"❌ Error: {e}")
print("\n🎉 Campaign completed!")
print(
"💡 Replace mock data with real LinkedIn scraping when authentication is fixed"
)
if __name__ == "__main__":
asyncio.run(run_bedrock_campaign())