Skip to main content

🎥 Get Email Notifications for ENS Registrations via the QuickAlerts UI

Updated on
Dec 14, 2023

1 min read

In this video, we will set up a QuickAlert for ENS Domain registrations and get notified via email with the help of Pipedream.
Subscribe to our YouTube channel for more videos!

The following code example includes the QuickAlerts expression for ENS Domain registrations, as seen in the video.

Expression
Deploy
1
tx_logs_topic0 == '0xca6abbe9d7f11422cb6ca7629fbf6fe9efb1c621f71ce8f02b9f2a230097404f'

Following is the code added to Pipedream in the video.

import Web3 from 'web3';

export default defineComponent({
async run({ steps, $ }) {
const domainsData = [];
steps.trigger.event.forEach(e => {
domainsData.push(e.logs[8].data);
})

const dataArray = domainsData.map(domain => Web3.utils.hexToAscii('0x' + domain.substr(-128)));

let emailString = 'New ENS domain(s) registered:\n';

dataArray.forEach(d => {
emailString += (domain + '\n, ');
})

return emailString;
},
})

We ❤️ Feedback!

Let us know if you have any feedback or requests for new topics. We'd love to hear from you.

Share this guide