Skip to content

nylas-samples/localize_emails_python_chatgpt

Repository files navigation

localize_emails_python_chatgpt

This sample will show you to localize your emails using ChatGPT and mail merge templates.

Setup

System dependencies

  • Python v3.x

Gather environment variables

You'll need the following values:

V3_API_KEY = ""
GRANT_ID = ""

Add the above values to a new .env file:

$ touch .env # Then add your env variables

Install dependencies

$ pip3 install openai # OpenAI package
$ pip3 install python-dotenv # Environment variables
$ pip3 install Flask # Micro framework
$ pip3 install Flask-session # Sessions for Flask

Create a .csv file similar to this one:

image

Usage

Run the file localized_emails.py:

$ python3 localized_emails.py.py

NiceGUI will open up your browser on port 5000.

Learn more

Visit our Nylas Python SDK documentation to learn more.

About

Localize Your Emails With ChatGPT and Python

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published