• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
nbbaier

nbbaier

serialize-email

Public
Like
serialize-email
Home
Code
3
README.md
new-file-7477.tsx
sqlite.ts
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 milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
8/31/2025
Viewing readonly version of main branch: v42
View latest version
README.md

SQLite Email Storage Utilities

Simple utilities for storing email data in SQLite on Val Town.

Functions

createTable(tableName: string)

Creates a table with the following schema:

  • id - INTEGER PRIMARY KEY
  • timestamp - INTEGER NOT NULL (Unix timestamp)
  • data - TEXT NOT NULL (JSON string)

insertEmail(tableName: string, data: Email)

Inserts an email object into the specified table with the current timestamp.

Usage

Create val
import { createTable, insertEmail } from "./sqlite.ts"; // Create table await createTable("my_emails"); // Insert email data await insertEmail("my_emails", emailObject);

Requirements

  • Val Town SQLite standard library
  • Email objects must be JSON serializable
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.