FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
martinbowling
martinbowlingemailValHandler
Remix of simplescraper/aiEmailAssistant
Public
Like
emailValHandler
Home
Code
2
README.md
E
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Email AI Assistant

Chat with your favorite AI via email (with enhanced attachment and content support)

What It Does

This advanced email AI assistant allows you to:

  • Send emails to an AI for comprehensive analysis and responses
  • Automatically transform your queries into structured research objectives
  • Parse and analyze various types of content:
    • PDF attachments
    • Image attachments (using GPT-4 Vision)
    • Website content from links in your email
  • Get detailed, context-aware responses directly to your inbox

Setup Guide

  1. Copy this Val and save it as an Email Val (choose Val type in the top-right corner of the editor)

  2. Set up the required environment variables:

    • OPENAI_API_KEY: Your OpenAI API key
    • MD_API_KEY: Your API key for the markdown extraction service (optional)

    You can set these using Val Town's environment variables: https://docs.val.town/reference/environment-variables/

  3. Copy the email address of the Val (click 3 dots in top-right > Copy > Copy email address)

  4. Compose your email:

    • Write your query or request in the email body
    • Attach any relevant PDFs or images
    • Include links to websites you want analyzed
    • Send it to the Val email address
  5. Wait for the AI's response, which will arrive in your inbox shortly

How to Use Effectively

  • Be clear and specific in your queries
  • Provide context when necessary
  • Utilize attachments and links to give the AI more information to work with
  • The AI will transform your query into a structured research objective, so even simple questions may yield comprehensive answers

Supported File Types and Limitations

  • PDFs: Text content will be extracted and analyzed
  • Images: Will be analyzed using GPT-4 Vision API
  • Websites: Content will be extracted and converted to markdown for analysis
  • Other file types are not currently supported and will be ignored

Note: There may be size limitations for attachments and processing times may vary based on the complexity of the content.

The AI uses advanced prompt transformation to enhance your queries, providing more detailed and structured responses. This process helps in generating comprehensive and relevant answers to your questions.

Code
README.md
E
main.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.