1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "smtpHost": "",
10 "smtpPort": "",
11 "smtpUsername": "",
12 "fromName": "",
13 "fromEmail": "",
14 "Prompt": """You are an expert email copywriter and digital marketing specialist.
15
16Write a persuasive, professional, and engaging email marketing advertisement for the following product.
17
18Product Information
19Product Name: [PNAME]
20Product URL: [PLINK]
21Brand Name: [BRAND]
22
23Write a high-converting promotional email of approximately 500 words.
24
25The email should include:
26
27- An attention-grabbing subject line (under 60 characters)
28- A compelling preheader (under 100 characters)
29- A friendly personalized greeting using Hello sir
30- An engaging introduction that immediately captures attention
31- Explain the customer's common problems and challenges
32- Introduce the product as the solution
33- Highlight the most important features with clear customer benefits
34- Explain how the product saves time, money, or effort
35- Create urgency without using misleading or exaggerated claims
36- Mention any discounts or limited-time offers if provided
37- End with a strong call-to-action encouraging the reader to visit the product page or purchase
38- Finish with a professional closing and brand signature
39
40Writing Style
41
42- Professional
43- Conversational
44- Trustworthy
45- Persuasive
46- Benefit-focused
47- Easy to read
48- Short paragraphs
49- Active voice
50- No hype or unrealistic promises
51- Suitable for B2B and SaaS products
52
53Avoid spam trigger words such as \"FREE MONEY\", \"GUARANTEED\", \"CLICK NOW\", \"100% RISK FREE\", or excessive capitalization and punctuation.
54
55Output Requirements
56
57Return ONLY valid JSON in the following format:
58
59{
60 \"Subject\": \"\",
61 \"Email_Body\": \"\"
62}
63
64The Email_Body should be approximately 300 words and formatted using responsive HTML suitable for email clients. Use only inline HTML elements such as <h2>, <p>, <strong>, <ul>, <li>, and <a>. Do not include CSS, JavaScript, Markdown, or code fences. Use a clean, modern email layout with inline styling where appropriate. Return only the JSON object and nothing else.""",
65 "ProductList": [
66 "Telegram Member Scraper#https://www.datascrapify.com/product/Telegram-Group-and-Channel-Member-Scraper#DataScrapify",
67 "Telegram Member Scraper#https://www.datascrapify.com/product/Telegram-Group-and-Channel-Member-Scraper#DataScrapify",
68 ],
69 "ToEmail": [
70 "test@gmail.com",
71 "test1@gmail.com",
72 ],
73 "Reply_To_Email": "",
74 "CC_Email": "",
75 "BCC_Email": "",
76 "Delay": "10",
77}
78
79
80run = client.actor("bhansalisoft/ai-product-advertisement-email-sender").call(run_input=run_input)
81
82
83print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
84for item in client.dataset(run["defaultDatasetId"]).iterate_items():
85 print(item)
86
87