import datetime as dt
from notte_sdk.client import NotteClient
notte = NotteClient()
# retrieve an existing persona or use console.notte.cc/personas to create a new one
persona = notte.Persona("<my-persona-id>")
# read recent emails (received in the past 5 minutes)
recent_emails = persona.emails(
only_unread=True,
limit=10,
timedelta=dt.timedelta(minutes=5),
)
print(f"Recent emails: {recent_emails}")[
{
"subject": "<string>",
"email_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"sender_email": "<string>",
"sender_name": "<string>",
"text_content": "<string>",
"html_content": "<string>"
}
]import datetime as dt
from notte_sdk.client import NotteClient
notte = NotteClient()
# retrieve an existing persona or use console.notte.cc/personas to create a new one
persona = notte.Persona("<my-persona-id>")
# read recent emails (received in the past 5 minutes)
recent_emails = persona.emails(
only_unread=True,
limit=10,
timedelta=dt.timedelta(minutes=5),
)
print(f"Recent emails: {recent_emails}")[
{
"subject": "<string>",
"email_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"sender_email": "<string>",
"sender_name": "<string>",
"text_content": "<string>",
"html_content": "<string>"
}
]The access token received from the authorization server in the OAuth 2.0 flow.
Maximum number of emails
1 <= x <= 100Maximum time since email reception
Whether to only return unread messages
Successful Response
Subject of the email
Email UUID
Creation date
Email address of the sender
Name (if available) of the sender
Raw textual body, can be uncorrelated with html content
HTML body, can be uncorrelated with raw content
Was this page helpful?
Suggestions