Email to Are.na Attachment Processor
This project automatically processes email attachments and saves them as blocks to an Are.na channel.
- Email Trigger (
email-to-arena.ts): Receives emails and processes attachments
- Blob Server (
blob-server.ts): Serves stored attachments as public URLs
- Are.na Integration: Creates blocks in your specified channel with attachment URLs
You need to set these environment variables in your Val Town settings:
ARENA_API_KEY: Your Are.na API key (get from https://dev.are.na/oauth/applications)
ARENA_CHANNEL_SLUG: The slug of the Are.na channel where blocks should be added
VAL_TOWN_USERNAME: Your Val Town username (used for generating URLs)
- Go to https://dev.are.na/oauth/applications
- Create a new application
- Copy the access token and set it as
ARENA_API_KEY
- Create or choose an Are.na channel
- Get the channel slug from the URL (e.g., for
https://are.na/username/my-channel, the slug is my-channel)
- Set this as
ARENA_CHANNEL_SLUG
- Send an email with attachments to your Val Town email address
- The system will:
- Store each attachment in blob storage
- Create a public URL for each attachment
- Add a block to your Are.na channel with the attachment URL and metadata
- Supports any file type as attachment
- Preserves original filename and content type
- Adds metadata including sender, subject, file size
- Handles multiple attachments per email
- Error handling for individual attachments
email-to-arena.ts - Main email processing logic
blob-server.ts - HTTP endpoint to serve stored attachments
README.md - This documentation
- Check the Val Town logs for error messages
- Ensure your Are.na API key has write access to the channel
- Verify the channel slug is correct (case-sensitive)
- Large attachments may take longer to process