Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Azure Functions で、SendGrid の Event Webhook からの通...
Search
TonyTonyKun
December 10, 2017
Technology
0
800
Azure Functions で、SendGrid の Event Webhook からの通知を受け取ってみる
Build 2016 報告会の LT 資料です。
TonyTonyKun
December 10, 2017
Tweet
Share
More Decks by TonyTonyKun
See All by TonyTonyKun
Prompty を使って生成 AI アプリケーション開発のプロンプトを管理する/jat03
thara0402
0
9
Azure OpenAI Service で意図せず PTU モデルをデプロイして高額請求されてしまった件/jat04
thara0402
0
7
「Durable Task Scheduler」をチョイ見せ!/jat05
thara0402
0
2
Azure App Service on Linux の Sidecar に Phi-3 を配置してインテリジェントなアプリケーションを作ってみよう/jazug-anniv14
thara0402
0
1k
サイクルガードサービス AlterLock の問い合わせ対応業務に Azure OpenAI Service を活用した話/jazug46
thara0402
0
870
Microsoft Ignite 2023 現地参加レポート/ignite2023
thara0402
0
250
Azure Container Apps で .NET 7 アプリを Blue-Green デプロイしてみよう!/jazug12
thara0402
0
1.7k
Azure Synapse Analytics 入門/jazug11
thara0402
0
710
Azure Bicep で始める Infrastructure as Code/ace0917
thara0402
0
450
Other Decks in Technology
See All in Technology
プロダクトエンジニア構想を立ち上げ、プロダクト志向な組織への成長を続けている話 / grow into a product-oriented organization
hiro_torii
1
300
Share my, our lessons from the road to re:Invent
naospon
0
110
CDKのコードを書く環境を作りました with Amazon Q
nobuhitomorioka
1
120
OpenID Connect for Identity Assurance の概要と翻訳版のご紹介 / 20250219-BizDay17-OIDC4IDA-Intro
oidfj
0
420
【詳説】コンテンツ配信 システムの複数機能 基盤への拡張
hatena
0
130
Visualize, Visualize, Visualize and rclone
tomoaki0705
9
69k
現場で役立つAPIデザイン
nagix
35
13k
白金鉱業Meetup Vol.17_あるデータサイエンティストのデータマネジメントとの向き合い方
brainpadpr
7
920
偏光画像処理ライブラリを作った話
elerac
1
130
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
150
プロダクトエンジニア 360°フィードバックを実施した話
hacomono
PRO
0
120
OpenID BizDay#17 KYC WG活動報告(法人) / 20250219-BizDay17-KYC-legalidentity
oidfj
0
400
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
We Have a Design System, Now What?
morganepeng
51
7.4k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Why Our Code Smells
bkeepers
PRO
336
57k
4 Signs Your Business is Dying
shpigford
182
22k
A Tale of Four Properties
chriscoyier
158
23k
Typedesign – Prime Four
hannesfritz
40
2.5k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
Transcript
Azure Functions で、 SendGrid の Event Webhook からの 通知を受け取ってみる
⾃⼰紹介 • 名前 • Twitter : @TonyTonyKun(トニー) • 仕事 •
C# で業務アプリケーションを開発しています。 • Azure をベースに ASP.NET を使うことが多いです。 • Blog • ROMANCE DAWN for the new world • http://gooner.hateblo.jp/
SendGrid とは? • Azure から使える便利なメール配信サービス しかし、送信したはずのメールが届かないことも・・・
Event Webhook でログを解析する • メールを送信する際に発⽣するイベントを指定した URL にPOSTすることができる • アドレスが間違っていて届かない •
受信メールサーバーでブロックされている • 配信が遅延している • でも、使うにはそれなりの⼿間がかかる • POST された通知を受け取る API を実装する • イベントの JSON データをストレージに転送するコードを書く • クラウドの Web サーバーにデプロイする
そこで、Azure Functions
Azure Functions を作る 初期値の「Generic JSON」だと、SendGrid から の通知を受け取れない。 必ず、「Not a Webhook」に変更する必要あり!
Azure DocumentDB に Output する ここから Azure DocumentDB を作成して、 接続⽂字列の設定を追加できる。
Azure Functions のコードを編集する SendGrid から POST された JSON データを Output
の Bindings にセットする。
SendGrid の Event Webhook を設定する Event Webhook から POST する
URL に、 Azure Functions の URL を設定する。 ※ SendGrind のポータルサイト
Demo
Azure DocumentDB に転送されたデータ 無効なメールアドレスのため、メールの送信に 失敗したことがわかります。
まとめ • いま、Azure Functions がアツい! • API の実装とか、デプロイとか必要なし • Trigger
が発⽕したときだけ実⾏されるので、コス ト的にもうれしい 使ってみて要望があれば、フィードバックしましょう https://feedback.azure.com/forums/355860-azure-functions
ご清聴ありがとうございました。