
When sending emails with Twilio SendGrid, sometimes you want to be able to keep track of the status of these emails, such as when a recipient opens the message or reports it as spam. This is made possible by the use of Event Webhooks. Let's walk through how to use Node.js and Express to track the status of emails that you send.
Prerequisites and dependencies
Make sure you have the following before moving on:
- Node.js and npm installed (do this first if you haven't already)
- A free SendGrid account
- An email address to test out this project
- A domain on which you will receive emails. For the purposes of this article, I’m going to use yourdomainhere.com. You will need to replace it with your own domain name.
We'll need to install the node modules for SendGrid and Express. To install these npm modules, navigate to the directory where …

When sending emails with Twilio SendGrid, sometimes you want to be able to keep track of the status of these emails, such as when a recipient opens the message or reports it as spam. This is made possible by the use of Event Webhooks. Let's walk through how to use Python and Flask to track the status of emails that you send.
Prerequisites and dependencies
Make sure you have the following before moving on:
- Python 3 installed on your machine
- A free SendGrid account
- An email address to test out this project
- A domain on which you will receive emails. For the purposes of this article, I’m going to use yourdomainhere.com. You will need to replace it with your own domain name.
Here is a guide you can follow for setting up your development environment if you are going to be doing more web development with Python in …

必要なデータをオンラインで入手できる場合でも、専用のREST APIが使えるとは限りません。幸いなことに、JavaScript開発者向けにNode.js用のさまざまなツールが用意されており、Webサイトから直接データのスクレイピングと解析を行い、プロジェクトやアプリケーションで使用できます。
ここでは、4つのライブラリーを取り上げ、その機能とともにそれぞれを比較して説明します。
コンピューターに最新バージョンのNode.js(16.14.2以上)とnpmがインストールされていることを確認してください。ターミナルを開き、コードを格納するディレクトリで次のコマンドを実行します。
npm init --yes
本稿で構築する一部のアプリケーションにではGotライブラリーを使用してHTTPリクエストを行うため、次のコマンドを使用して同じディレクトリにインストールします。
npm install got
こちらのWebページにあるVideo Game Music Archiveには、さまざまなNintendoゲームミュージックが収録されています。ここから固有のMIDIファイルを参照するリンクを探す処理を今回ご紹介するライブラリーのサンプル課題として使用します。
Webスクレイピングのためのヒント
各ツールを紹介する前に、どの方法を選ぶ場合でも役に立つ共通のテーマがあります。
必要なコンテンツを解析するコード …

Twilio SendGrid API(Inbound Parse機能など)を評価する場合、無料アカウントを作成した後に最初に行う手順は、通常はドメイン認証の設定です。退屈なプロセスではありますが、これを終えるとメールを受信するコードを作成できるようになります。
本稿では、Twilio SendGridのドメイン認証の設定方法を順を追って説明し、コードを書くなどの重要な作業ができるようにします。
チュートリアルの要件
チュートリアルを進めるには、以下が必要です。
- Twilio SendGridアカウント - Twilio SendGridを新規に使用する場合は、無料アカウントを作成することにより1日100件のメール送信が可能になります。
- メールを受信するドメイン - 本稿では、
yourdomainhere.com
を使用します。ご自分のドメイン名に置き換えて進めてください。
以上が準備できたら、早速始めましょう。
ドメイン認証の開始
まず、SendGridアカウントにログインします。画面左側のナビゲーションバーの [Settings] を開き、[Sender Authentication] を選択します。
[Sender Authentication] ページの [Domain Authentication] セクションにある [Get Started] ボタンをクリックします。
最初に表示されるプロンプトでDNSプロバイダーを選択します。これは多くの場合、ドメイン …

NASA has a bunch of awesome APIs which give you programmatic access to the wonders of space. I think the Mars Rover Photos API in particular is really amazing as you can use it to see what kind of pictures the Mars Curiosity rover has been taking.
Let’s build an app using the Mars Rover API with Twilio SendGrid, Python, and Flask to make it so that we can send an email and receive back pictures from Mars.
Prerequisites and dependencies
Make sure you have the following before moving on:
- Python 3 installed on your machine
- A free SendGrid account
- An email address to test out this project
- A domain on which you will receive emails. For the purposes of this article, I’m going to use yourdomainhere.com. You will need to replace it with your own domain name.
Here is a guide you can follow for setting …

Setting up an application to receive emails can be tiresome if you want to do it yourself. Luckily Twilio SendGrid includes the Inbound Parse feature, a greatly simplified method for receiving emails based on webhooks. Let's walk through how to receive emails on your own domain using Node.js.
Requirements and dependencies
We'll need to install the node modules for Express and the multer middleware. To install these npm modules, navigate to the directory where you want this code to live and run the following command in your terminal to create an npm package for this project:
npm init --yes
The --yes
argument just runs through all of the prompts that you would otherwise have to fill out or skip. Now that we have a package.json for our app, let’s install the necessary libraries with the following shell command:
npm install express@4.17.2 multer@1.4.4
Domain authentication
The first step in setting up …

この記事はSam Agnewがこちらで公開した記事(英語)を日本語化したものです。
インターネットにはあまりに多くのデータがあふれています。しかし、これらのデータがREST APIの形式ではないと、プログラムによってアクセスすることは難しくなります。Beautiful SoupなどのPythonツールを使用すると、Webページから直接データをスクレイピングして解析し、プロジェクトやアプリケーションで使えるようになります。
本稿では、インターネットからMIDIデータをスクレイピングする方法をご紹介します。過去のブログで、Magentaによるニューラルネットワークのトレーニングを使用してクラシックな任天堂ゲームミュージックを作成する方法をご紹介しました。この実装には、昔の任天堂ゲームのMIDIミュージックが必要になります。今回は、Beautiful Soupを使用して、ビデオゲーム音楽アーカイブからMIDIデータを取得する方法をご紹介します。
プロジェクトの準備と依存パッケージの設定
まず、最新バージョンのPython 3とpipがインストールされていることを確認してください。また、依存パッケージをインストールする前に、仮想環境を作成して有効にしてください。
Webページからのデータ取得のHTTPリクエストを作成するRequestsライブラリと、HTMLを解析するBeautiful Soupをインストールする必要があります。
仮想環境を有効にしたら、ターミナルで次のコマンドを実行します。
pip install requests==2.22. …

With cool APIs like Open Notify we can programmatically access the location of the International Space Station to determine when it is flying by a specific location, and with Twilio SendGrid we can send an email notification when this occurs.
Let's walk through how to do this in Python using Redis Queue to schedule the email.
Prerequisites and dependencies
Make sure you have the following before moving on:
- Python 3 installed on your machine
- A free SendGrid account
- An email address to test out this project
Here is a guide you can follow for setting up your development environment if you are going to be doing more web development with Python in general and are unfamiliar with things like virtual environments.
Before writing code, you'll need to install some dependencies:
- The SendGrid Python library for sending emails
- RQ Scheduler - a lightweight, elegant solution built on top of …

Many applications have the need to send emails programmatically at specific times or regular intervals. In Python this is possible with the use of the Twilio SendGrid API for sending emails as well as Redis Queue and RQ Scheduler. Let's walk through how to schedule an email step by step.
Prerequisites and dependencies
Make sure you have the following before moving on:
- Python 3 installed on your machine
- A free SendGrid account
- An email address to test out this project
Here is a guide you can follow for setting up your development environment if you are going to be doing more web development with Python in general and are unfamiliar with things like virtual environments.
Before writing code, you'll need to install some dependencies:
- The SendGrid Python library for sending emails
- RQ Scheduler - a lightweight, elegant solution built on top of another tool with a low barrier …

When working with Twilio SendGrid APIs such as Inbound Parse, one of the first steps after creating a free account is to set up domain authentication. This can be a tedious process, but once you are finished you will be able to write code to receive emails.
Let's walk through how to authenticate your domain with Twilio SendGrid step-by-step so you can get on to important things like writing code.
Tutorial Requirements
To follow this tutorial you will need to have the following items:
- A Twilio SendGrid account — If you are new to Twilio SendGrid you can create a free account, which allows you to send 100 emails per day forever.
- A domain on which you will receive emails. For the purposes of this article, I’m going to use yourdomainhere.com. You will need to replace it with your own domain name.
With that taken care of, …