Readme

Email notifications when your vals are referenced

Screenshot 2023-08-18 at 1.32.34 PM.png

Setup

  1. Create a Val Town API Token
  2. Add it to your secrets as valtown
  3. Fork & Run this val
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { refHtml } from "https://esm.town/v/andreterron/refHtml";
import process from "node:process";
import { references } from "https://esm.town/v/andreterron/references";
export const referencesNotify = async (interval: Interval) => {
const refs = await references({
token: process.env.valtown,
since: interval.lastRunAt,
});
if (refs?.length) {
console.email({
html: refHtml(refs),
}, "Val Town References");
}
return refs;
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023