This application integrates with the Nylas API for email management and uses OpenAI's API for summarizing email content.
- View a list of emails
- Compose and send emails
- Summarize email content using AI
- Clone the repository
- Run
npm install
to install dependencies - Update
YOUR_CLIENT_ID
,YOUR_CLIENT_SECRET
, andYOUR_OPENAI_API_KEY
in the respective files - Run
npm start
to start the development server
- Upon launching the app, you will be directed to the Dashboard where you can see a list of your emails.
- Each email will display the subject and a snippet of the content, allowing you to quickly scan through your inbox.
- To compose a new email, click on the Compose Email link in the sidebar.
- Fill in the Subject and Body fields.
- You can click the Send Email button to send your email directly.
- If you want to summarize the content of your email, click the Summarize Email button to generate a brief summary using AI.
- When composing an email, you can utilize the AI summarization feature to get a concise summary of your email content.
- This feature is particularly useful for quickly reviewing lengthy emails or for drafting replies.
- The app is designed to be responsive, ensuring a seamless experience on both desktop and mobile devices.
- You can access your emails and compose new ones from any device.
- The app integrates with the Nylas API to fetch and send emails securely.
- Make sure to configure your Nylas API credentials in the
src/utils/api.js
file to enable email functionalities.
- You can customize the styles in the
src/styles
directory to match your preferences or branding. - Modify the CSS files to change colors, fonts, and layouts as needed.
- After cloning the repository, navigate to the project directory and run:
npm install npm start
- This will start the development server, and you can view the app in your web browser at
http://localhost:3000
.
To send an email using the Nylas API, you can use the following POST request format. Make sure to replace the placeholders with actual values.
POST https://api.nylas.com/send
{
"subject": "Your Email Subject",
"body": "This is the body of the email.",
"to": [
{
"name": "Recipient Name",
"email": "recipient@example.com"
}
],
"from": [
{
"name": "Your Name",
"email": "your_email@example.com"
}
]
}
Using curl
, you can send an email as follows:
curl -X POST https://api.nylas.com/send \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"subject": "Hello from Nylas!",
"body": "This is a test email sent from the Nylas Creative App.",
"to": [
{
"name": "John Doe",
"email": "johndoe@example.com"
}
],
"from": [
{
"name": "Your Name",
"email": "your_email@example.com"
}
]
}'
You can create a draft of an email that can be sent later.
POST https://api.nylas.com/drafts
{
"subject": "Draft Email Subject",
"body": "This is the body of the draft email.",
"to": [
{
"name": "Recipient Name",
"email": "recipient@example.com"
}
]
}
curl -X POST https://api.nylas.com/drafts \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"subject": "Draft Email",
"body": "This is a draft email.",
"to": [
{
"name": "Jane Doe",
"email": "janedoe@example.com"
}
]
}'
To fetch a list of emails from your inbox, you can use the following GET request.
GET https://api.nylas.com/messages
curl -X GET https://api.nylas.com/messages \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
To fetch the details of a specific email, you can use the email ID.
GET https://api.nylas.com/messages/{message_id}
curl -X GET https://api.nylas.com/messages/YOUR_MESSAGE_ID \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
- Replace
YOUR_ACCESS_TOKEN
with your actual access token obtained from the Nylas API. - Ensure that you have the necessary permissions and scopes enabled in your Nylas application to perform these actions.
- Contributions are welcome! If you have suggestions for new features or improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.