I created an AI email marketing agent using Langchain and AI21 jurrasic J2 model in python.
Recently I was starting to use langchain, which is a good framework for creating AI agents. To put it simply, langchain is tool which you can use to link AI LLM APIs like openai gpt or ai21 and so on with url reading functionality or document reading functionality or reading plain text and so on. It enables us to chain such functionalities together one by one to form an workflow creating AI chatbots, AI search engines, AI agents or anything AI that you wish to.
The Idea
But then I came to a thought, why now create a python script to read a csv file of contacts lists containing the name email and description of the lead/contact/recipient and send customised AI generated emails to each of them based on an intention we input to the script. My intention was to automate outreaches like cold emailing, email marketing customised for each individual contact, email updates etc.
The possibilities that I saw in using AI like this was to increase conversions, increase email engagement due to customisation for individual customers.
The implementation
Like the great creator of linux said:
βTalk is cheap. Show me the code.β β Linus Torvalds