Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LuxerOne Package Delivery notifications with Pushcuts and IFTTT Pro
// # LuxerOne Package Delivery
// Office 365 Mail to Pushcuts
// Requires IFTTT Pro
//
// If you live in an apartment building with
// a LuxerOne locker system for packages,
// you can make an action that looks for new
// emails from `support@luxerone.com` and send
// a Pushcuts notification that allows you to
// tap to view the QR code to redeem your
// package.
const codeRe = new RegExp('\\d{6}', 'im')
const qrRe = new RegExp('https://app.luxerone.com/deliveries/qrcode/\\d{8}/[a-z0-9]{40}', 'im')
const code = Office365Mail.newEmailFrom.BodyPreview.match(codeRe)
const qr = Office365Mail.newEmailFrom.Body.match(qrRe)
if (qr && code) {
Pushcut.sendNotification.setTitle(`Your package has arrived! Code: ${code[0]}`)
Pushcut.sendNotification.setText('View QR code')
Pushcut.sendNotification.setInput(qr[0])
} else {
Pushcut.sendNotification.skip()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.