feat: implement personalized email composition for outreach based on website data and user proposals
This commit is contained in:
@@ -216,6 +216,41 @@ def find_backlink_opportunities(keyword):
|
|||||||
results.append(detailed_result)
|
results.append(detailed_result)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
def compose_personalized_email(website_data, insights, user_proposal):
|
||||||
|
"""
|
||||||
|
Compose a personalized outreach email based on website data, insights, and user proposal.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
website_data (dict): The data of the website including metadata and contact info.
|
||||||
|
insights (str): Insights generated by the LLM about the website.
|
||||||
|
user_proposal (str): The user's proposal for a guest post or content contribution.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: A personalized email message.
|
||||||
|
"""
|
||||||
|
contact_name = website_data.get("contact_info", {}).get("name", "Webmaster")
|
||||||
|
site_name = website_data.get("metadata", {}).get("title", "your site")
|
||||||
|
proposed_topic = user_proposal.get("topic", "a guest post")
|
||||||
|
|
||||||
|
email_body = f"""
|
||||||
|
Hi {contact_name},
|
||||||
|
|
||||||
|
I hope this message finds you well. I recently came across {site_name} and was impressed by the high-quality content you provide on {website_data.get("metadata", {}).get("keywords", "various topics")}.
|
||||||
|
|
||||||
|
Based on the insights I gathered, I believe there is a great opportunity for collaboration. I would love to contribute {proposed_topic} that aligns with your site's focus and audience.
|
||||||
|
|
||||||
|
Here are some insights and guidelines I gathered:
|
||||||
|
{insights}
|
||||||
|
|
||||||
|
Please let me know if you are interested in discussing this further. I am excited about the possibility of working together and contributing to your site.
|
||||||
|
|
||||||
|
Best regards,
|
||||||
|
[Your Name]
|
||||||
|
[Your Contact Information]
|
||||||
|
"""
|
||||||
|
|
||||||
|
return email_body
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def search_for_urls(query):
|
def search_for_urls(query):
|
||||||
|
|||||||
Reference in New Issue
Block a user