replyEmailWithAttachment
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v1View latest version
At Val Town, we use a physical mail service, Stable, that receives our mail, scans it, and sends me an email with the scanned PDF. I rarely click into these emails, partly because the subject lines are always a very boring "(1) Stable document scans from IRS...". This val spices those up by sending them to ChatGPT:
This val has some useful code for packaging up pdfs to be sent to OpenAI and to be sent via @std/email.
Stable sends these scans to my inbox. I set up a Gmail forwarding rule to forward those emails to this val. Here's how you can do that:
- Remix this val
- Optional, set a cusom email address on
main.ts - Set up
a forwarding email address in gmail
to the email address on
main.ts - In your val's logs, click on the confirmation link to accept forwarding mail
- At the top, in the search box, click the filter icon (in the right of the search box)
- Set the search params (ie From: mailroom@email.usestable.com) and click
Create filter - Check
Forward it toand choose the email address ofmain.ts - Click
Create filter
