{"id":9403,"date":"2018-02-27T12:01:16","date_gmt":"2018-02-27T03:01:16","guid":{"rendered":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=9403"},"modified":"2022-08-08T13:20:29","modified_gmt":"2022-08-08T04:20:29","slug":"azure-functions%e3%81%a7event-webhook%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e5%8f%97%e4%bf%a1%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=9403","title":{"rendered":"Azure Functions\u3067Event Webhook\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u3059\u308b"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/Azure-Functions_COLOR_450.png\" alt=\"Azure Functions\u3067Event Webhook\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u3059\u308b\" width=\"100%\" class=\"aligncenter size-full wp-image-9418\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/Azure-Functions_COLOR_450.png 860w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/Azure-Functions_COLOR_450-300x157.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/Azure-Functions_COLOR_450-768x402.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/p>\n<p>SendGrid\u30b5\u30dd\u30fc\u30c8\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u83ca\u7530(<a href=\"https:\/\/twitter.com\/kikutaro_\" target=\"_blank\">@kikutaro_<\/a>)\u3067\u3059\u3002\u672c\u65e5\u306e\u30d6\u30ed\u30b0\u3067\u306f<a href=\"https:\/\/azure.microsoft.com\/ja-jp\/\" target=\"_blank\">Microsoft Azure<\/a>\u306eFaaS\uff08Function-as-a-Service\uff09\u3067\u3042\u308b<a href=\"https:\/\/azure.microsoft.com\/ja-jp\/services\/functions\/\" target=\"_blank\">Azure Functions<\/a>\u3092\u4f7f\u3063\u3066\u3001SendGrid\u306eEvent Webhook\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/sendgrid.kke.co.jp\/docs\/API_Reference\/Webhooks\/event.html\" target=\"_blank\">Event Webhook<\/a>\u306fSendGrid\u306e\u30e1\u30fc\u30eb\u9001\u4fe1\u30a4\u30d9\u30f3\u30c8\u3092\u901a\u77e5\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3059\u3002\u901a\u77e5\u3092\u53d7\u4fe1\u3059\u308b\u306b\u306f\u3001HTTP\u306ePOST\u3092\u53d7\u3051\u53d6\u308c\u308b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304c\u5fc5\u8981\u3067\u3059\u304c\u3001Azure Functions\u3092\u5229\u7528\u3059\u308b\u3068\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u307e\u3059(<a href=\"#1\">\u203b1<\/a>)\u3002<\/p>\n<p>\u5b9f\u969b\u306bAzure Functions\u3067Event Webhook\u306e\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u3057\u305f\u7d50\u679c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/1.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/1.png\" alt=\"Event Webhook\u306e\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u7d50\u679c\" width=\"100%\" class=\"aligncenter size-full wp-image-9412\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/1.png 1104w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/1-300x55.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/1-768x141.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/1-1024x188.png 1024w\" sizes=\"(max-width: 1104px) 100vw, 1104px\" \/><\/a><\/p>\n<p>\u53d7\u4fe1\u3057\u305f\u30c7\u30fc\u30bf\u306f\u95a2\u6570\u3067\u51e6\u7406\u3057\u305f\u5f8c\u3001<a href=\"https:\/\/docs.microsoft.com\/ja-jp\/azure\/azure-functions\/functions-triggers-bindings\" target=\"_blank\">\u51fa\u529b\u30d0\u30a4\u30f3\u30c9<\/a>\u3092\u4f7f\u3063\u3066\u4ed6\u306e\u51e6\u7406\u3078\u7e4b\u3052\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\uff08\u3061\u306a\u307f\u306b\u51fa\u529b\u30d0\u30a4\u30f3\u30c9\u306b\u306fSendGrid\u3082\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059 <a href=\"#2\">\u203b2<\/a>\uff09<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u5177\u4f53\u7684\u306a\u8a2d\u5b9a\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>Microsoft Azure\u306e\u30dd\u30fc\u30bf\u30eb\u304b\u3089\u300c<strong>\u30ea\u30bd\u30fc\u30b9\u306e\u4f5c\u6210<\/strong>\u300d\u3067\u300c<strong>Function App<\/strong>\u300d\u3092\u9078\u3073\u307e\u3059\u3002<br \/>&nbsp;<img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/2.png\" alt=\"Microsoft Azure\u306e\u30dd\u30fc\u30bf\u30eb\u304b\u3089\u300c\u30ea\u30bd\u30fc\u30b9\u306e\u4f5c\u6210\u300d\u3067\u300cFunction App\u300d\u3092\u9078\u629e\" width=\"100%\" class=\"aligncenter size-full wp-image-9413\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/2.png 1264w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/2-300x215.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/2-768x550.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/2-1024x734.png 1024w\" sizes=\"(max-width: 1264px) 100vw, 1264px\" \/><\/li>\n<li>\u30a2\u30d7\u30ea\u540d\u306a\u3069\u306e\u5fc5\u8981\u60c5\u5831\u3092\u5165\u529b\u3057\u3066\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u4eca\u56deOS\u306f\u30d7\u30ec\u30d3\u30e5\u30fc\u7248\u306eLinux\u3092\u9078\u3073\u307e\u3057\u305f\u3002<br \/>&nbsp;<img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/3_tri.png\" alt=\"\u74b0\u5883\u3092\u4f5c\u6210\" width=\"50%\" class=\"aligncenter size-full wp-image-9434\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/3_tri.png 316w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/3_tri-167x300.png 167w\" sizes=\"(max-width: 316px) 100vw, 316px\" \/><\/li>\n<li>\u3057\u3070\u3089\u304f\u5f85\u3064\u3068\u6b21\u306e\u3088\u3046\u306a\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u95a2\u6570\u306e\u6a2a\u306b\u3042\u308b\u300c<strong>\uff0b<\/strong>\u300d\u3092\u62bc\u3057\u307e\u3059\u3002<br \/>&nbsp;<a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/4.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/4.png\" alt=\"\u6982\u8981\u306e\u753b\u9762\" width=\"100%\" class=\"aligncenter size-full wp-image-9415\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/4.png 1474w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/4-300x184.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/4-768x472.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/4-1024x629.png 1024w\" sizes=\"(max-width: 1474px) 100vw, 1474px\" \/><\/a><\/li>\n<li>\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u305f\u3081\u306e\u30c8\u30ea\u30ac\u30fc\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u4eca\u56de\u306fHTTP\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u30c8\u30ea\u30ac\u30fc\u3068\u3059\u308b\u305f\u3081\u3001<a href=\"https:\/\/docs.microsoft.com\/ja-jp\/azure\/azure-functions\/functions-bindings-http-webhook\" target=\"_blank\">HTTP trigger<\/a>\u3092\u4f7f\u3044\u307e\u3059\u3002\u300c<strong>webhook + API<\/strong>\u300d\u3092\u9078\u629e\u3057\u3066\u3001\u8a00\u8a9e\u306f\u300c<strong>C#<\/strong>\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<br \/>&nbsp;<a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/5.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/5.png\" alt=\"\u30c8\u30ea\u30ac\u30fc\u3092\u9078\u629e\" width=\"100%\" class=\"aligncenter size-full wp-image-9416\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/5.png 1474w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/5-300x184.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/5-768x472.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/5-1024x629.png 1024w\" sizes=\"(max-width: 1474px) 100vw, 1474px\" \/><\/a><\/li>\n<li>\u95a2\u6570\u306e\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u7c21\u6613\u7684\u306a\u30a8\u30c7\u30a3\u30bf\u3067\u3059\u304c\u3001\u30d6\u30e9\u30a6\u30b6\u4e0a\u3067\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002<br \/>&nbsp;<a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/6.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/6.png\" alt=\"\u95a2\u6570\u306e\u51e6\u7406\u3092\u8a18\u8ff0\" width=\"100%\" class=\"aligncenter size-full wp-image-9417\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/6.png 1471w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/6-300x185.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/6-768x472.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/6-1024x630.png 1024w\" sizes=\"(max-width: 1471px) 100vw, 1471px\" \/><\/a><\/li>\n<li>\u53d7\u4fe1\u3057\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u30dc\u30c7\u30a3\u3092\u30ed\u30b0\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3059\u308b\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u8a66\u3057\u307e\u3057\u305f\u3002<br \/>&nbsp;<br \/>run.csx\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\"> using System.Net;\r\n\r\npublic static void Run(HttpRequest req, TraceWriter log)\r\n{ \r\n    log.Info(new StreamReader(req.Body).ReadToEnd());\r\n}\r\n<\/pre>\n<\/li>\n<li>\u4fdd\u5b58\u3057\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u6210\u529f\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u305f\u3089\u52d5\u4f5c\u78ba\u8a8d\u3057\u307e\u3059\u3002Azure Functions\u3067\u306f\u30b3\u30f3\u30bd\u30fc\u30eb\u4e0a\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u9001\u4fe1\u304c\u3067\u304d\u307e\u3059\u3002\u753b\u9762\u53f3\u5074\u306e\u30d1\u30cd\u30eb\u306b\u3042\u308b\u300c<strong>\u30c6\u30b9\u30c8<\/strong>\u300d\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u30dc\u30c7\u30a3\u306b\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u884c\u3057\u307e\u3059\u3002<br \/>&nbsp;<img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/7.png\" alt=\"\u52d5\u4f5c\u78ba\u8a8d\" width=\"50%\" class=\"aligncenter size-full wp-image-9404\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/7.png 327w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/7-300x279.png 300w\" sizes=\"(max-width: 327px) 100vw, 327px\" \/><\/li>\n<li>\u6210\u529f\u3059\u308b\u3068\u30b3\u30f3\u30bd\u30fc\u30eb\u30ed\u30b0\u306b\u53d7\u4fe1\u3057\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>&nbsp;<img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/14.png\" alt=\"\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u5185\u5bb9\" width=\"100%\" class=\"aligncenter size-full wp-image-9460\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/14.png 660w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/14-300x59.png 300w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><br \/>\u4ee5\u4e0a\u3067Azure Functions\u5074\u306e\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002<br \/>&nbsp;<\/li>\n<li>\u6b21\u306bSendGrid\u306eEvent Webhook\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u8a2d\u5b9a\u3059\u308bURL\u306fAzure Functions\u306e\u300c<strong>\u95a2\u6570\u306eURL\u306e\u53d6\u5f97<\/strong>\u300d\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br \/>&nbsp;<img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/8.png\" alt=\"SendGrid\u306eEvent Webhook\u3092\u8a2d\u5b9a\" width=\"100%\" class=\"aligncenter size-full wp-image-9405\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/8.png 639w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/8-300x83.png 300w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><br \/>URL\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<br \/>&nbsp;<img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/9.png\" alt=\"URL\u3092\u30b3\u30d4\u30fc\" width=\"100%\" class=\"aligncenter size-full wp-image-9406\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/9.png 592w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/9-300x82.png 300w\" sizes=\"(max-width: 592px) 100vw, 592px\" \/><\/li>\n<li>SendGrid\u306e\u300c<strong>Mail Settings<\/strong>\u300d\u306b\u3042\u308b\u300c<strong>Event Notification<\/strong>\u300d\u3067URL\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u305f\u3089\u300c<strong>Test Your Integration<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002<br \/>&nbsp;<a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/10.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/10.png\" alt=\"\u30c6\u30b9\u30c8\u7528\u306e\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\" width=\"100%\" class=\"aligncenter size-full wp-image-9407\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/10.png 1497w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/10-300x143.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/10-768x367.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/10-1024x489.png 1024w\" sizes=\"(max-width: 1497px) 100vw, 1497px\" \/><\/a><br \/>\u6b21\u306e\u3088\u3046\u306b\u53d7\u4fe1\u3092\u78ba\u8a8d\u3067\u304d\u305f\u3089\u52d5\u4f5c\u78ba\u8a8d\u5b8c\u4e86\u3067\u3059\u3002SendGrid\u3067\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u3066\u3001\u662f\u975e\u5b9f\u969b\u306e\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<br \/>&nbsp;<a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/11.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/11.png\" alt=\"\u53d7\u4fe1\u78ba\u8a8d\" width=\"100%\" class=\"aligncenter size-full wp-image-9408\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/11.png 1104w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/11-300x55.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/11-768x141.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/11-1024x188.png 1024w\" sizes=\"(max-width: 1104px) 100vw, 1104px\" \/><\/a><\/li>\n<\/ol>\n<p><\/p>\n<p>\u306a\u304a\u3001Azure Functions\u306e\u51fa\u529b\u30d0\u30a4\u30f3\u30c9\u306b\u3042\u308b<a href=\"https:\/\/docs.microsoft.com\/ja-jp\/azure\/azure-functions\/functions-bindings-storage-blob\" target=\"_blank\">Azure Blob Storage<\/a>\u3092\u4f7f\u3046\u3068Blob\u5f62\u5f0f\u306e\u30ed\u30b0\u4fdd\u5b58\u3082\u7c21\u5358\u306b\u3067\u304d\u307e\u3059\u3002\u51fa\u529b\u30d0\u30a4\u30f3\u30c9\u3092\u8a2d\u5b9a\u3059\u308bfunction.json\u306b\u5f93\u3063\u3066\u3001\u30b3\u30fc\u30c9\u3092\u6b21\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p style=\"margin-bottom:0;\">function.json<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\"> \r\n{\r\n    &quot;bindings&quot;: &#x5B;\r\n        {\r\n            &quot;authLevel&quot;: &quot;function&quot;, \r\n            &quot;direction&quot;: &quot;in&quot;, \r\n            &quot;methods&quot;: &#x5B;\r\n                &quot;get&quot;, \r\n                &quot;post&quot;\r\n            ], \r\n            &quot;name&quot;: &quot;req&quot;, \r\n            &quot;type&quot;: &quot;httpTrigger&quot;\r\n        }, \r\n        {\r\n            &quot;connection&quot;: &quot;funceventstorage_STORAGE&quot;, \r\n            &quot;direction&quot;: &quot;out&quot;, \r\n            &quot;name&quot;: &quot;outputBlob&quot;, \r\n            &quot;path&quot;: &quot;outcontainer\/{rand-guid}&quot;, \r\n            &quot;type&quot;: &quot;blob&quot;\r\n        }\r\n    ]\r\n}\r\n<\/pre>\n<p style=\"margin-bottom:0;\">run.csx<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n\r\nusing System.Net;\r\n\r\npublic static void Run(HttpRequest req, &#x5B;Blob(&quot;outcontainer\/{rand-guid}&quot;, FileAccess.Write)] out string outputBlob, TraceWriter log)\r\n{ \r\n     outputBlob = new StreamReader(req.Body).ReadToEnd();\r\n}\r\n<\/pre>\n<p>Blob\u306e\u4fdd\u5b58\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/12.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/12.png\" alt=\"Blob\u306e\u4fdd\u5b58\" width=\"100%\" class=\"aligncenter size-full wp-image-9409\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/12.png 1332w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/12-300x64.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/12-768x164.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/12-1024x219.png 1024w\" sizes=\"(max-width: 1332px) 100vw, 1332px\" \/><\/a><\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066Blob\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3068\u53d7\u4fe1\u3057\u305f\u30c7\u30fc\u30bf\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/13.png\"  target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/13.png\" alt=\"\u53d7\u4fe1\u3057\u305f\u30c7\u30fc\u30bf\u306e\u78ba\u8a8d\" width=\"100%\" class=\"aligncenter size-full wp-image-9410\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/13.png 856w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/13-300x49.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2018\/02\/13-768x125.png 768w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/a><\/p>\n<p>Azure Functions\u3067\u672c\u683c\u7684\u306b\u958b\u767a\u3059\u308b\u5834\u5408\u306f<a href=\"https:\/\/docs.microsoft.com\/ja-jp\/azure\/azure-functions\/functions-create-your-first-function-visual-studio\"a target=\"_blank\">Visual Studio<\/a>\u306a\u3069\u3092\u5229\u7528\u3057\u3066\u5b9f\u88c5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3061\u3087\u3063\u3068\u3057\u305f\u52d5\u4f5c\u78ba\u8a8d\u306e\u30b3\u30fc\u30c9\u3067\u3042\u308c\u3070\u4eca\u56de\u306e\u3088\u3046\u306b\u30d6\u30e9\u30a6\u30b6\u3060\u3051\u3067\u3082\u5341\u5206\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u4eca\u5f8c\u3001\u4ed6\u306eFaaS\u3082\u8a66\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p id=\"1\">(\u203b1)<br \/>\nEvent Webhook\u3092\u7c21\u5358\u306b\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\u306f\u4eca\u56de\u306e\u65b9\u6cd5\u4ee5\u5916\u306b\u3082\u8272\u3005\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/requestb.in\/\" target=\"_blank\">RequetBin<\/a><br ><a href=\" https:\/\/sendgrid.kke.co.jp\/docs\/API_Reference\/Webhooks\/debug.html#-RequestBin\" target=\"_blank\">Webhook\u306e\u30c7\u30d0\u30c3\u30b0 RequetBin<\/a><\/li>\n<li><a href=\"https:\/\/www.mongodb.com\/\" target=\"_blank\">MongoDB<\/a><br \/><a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/?p=2489\" target=\"_blank\">SendGrid\u306e\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u3092MongoDB\u306b\u30b9\u30c8\u30a2\u3059\u308b\u65b9\u6cd5<\/a><\/li>\n<li><a href=\"https:\/\/flow.microsoft.com\/ja-jp\/\" target=\"_blank\">Microsoft Flow<\/a><br \/><a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/?p=6747\" target=\"_blank\">SendGrid\u306e\u30e1\u30fc\u30eb\u9001\u4fe1\u30a4\u30d9\u30f3\u30c8\u3092LINE Notify\u3067\u901a\u77e5\u3059\u308b \uff5eMicrosoft Flow\u306b\u3088\u308b\u30ce\u30f3\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u9023\u643a\uff5e<\/a><\/li>\n<li><a href=\"https:\/\/ngrok.com\/\" target=\"_blank\">ngrok<\/a><br \/><a href=\"https:\/\/sendgrid.kke.co.jp\/docs\/API_Reference\/Webhooks\/debug.html#-ngrok\" target=\"_blank\">Webhook\u306e\u30c7\u30d0\u30c3\u30b0 ngrok<\/a><\/li>\n<\/ul>\n<p id=\"2\">(\u203b2)<br \/>\n\u4ee5\u4e0b\u306fSendGrid\u306e\u51fa\u529b\u30d0\u30a4\u30f3\u30c9\u306b\u95a2\u3059\u308b\u8a18\u4e8b\u3084\u30d6\u30ed\u30b0\u3067\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/ja-jp\/azure\/azure-functions\/functions-how-to-use-sendgrid\" target=\"_blank\">Azure Functions \u3067 SendGrid \u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5<\/a><\/li>\n<li><a href=\"https:\/\/qiita.com\/superriver\/items\/d245539b7652b7512f9b\" target=\"_blank\">Azure Function App\u304b\u3089\u5b9a\u671f\u7684\u306b\u30e1\u30fc\u30eb\u3092\u9001\u308b<\/a><\/li>\n<li><a href=\"http:\/\/tsubalog.hatenablog.com\/entry\/2017\/08\/15\/005327\" target=\"_blank\">\u30ad\u30e5\u30fc\u3092\u30c8\u30ea\u30ac\u30fc\u306b\u3057\u3066SendGrid\u3067\u30e1\u30fc\u30eb\u3092\u9001\u308bAzure Functions\u3092\u4f5c\u3063\u3066\u307f\u305f<\/a><\/li>\n<li><a href=\"http:\/\/tsubalog.hatenablog.com\/entry\/devsumi-kyushu-2017\" target=\"_blank\">Developers Summit Kyushu 2017\u3067\u300c\u30af\u30e9\u30a6\u30c9\u3084OSS\u3067\u201c\u30c7\u30b6\u30a4\u30f3\u201d\u3059\u308b\u30e2\u30c0\u30f3\u306a\u30b7\u30b9\u30c6\u30e0\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u300d\u3068\u3044\u3046\u767b\u58c7\u3092\u884c\u3044\u307e\u3057\u305f<\/a><\/li>\n<li><a href=\"http:\/\/level69.net\/archives\/25346\" target=\"_blank\">Azure Functions \u3067Datadog \u306eWebhook \u30a4\u30f3\u30c6\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3057SendGrid \u7d4c\u7531\u3067\u30a2\u30e9\u30fc\u30c8\u914d\u4fe1\u3092\u3059\u308b\u3002<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>SendGrid\u30b5\u30dd\u30fc\u30c8\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u83ca\u7530(@kikutaro_)\u3067\u3059\u3002\u672c\u65e5\u306e\u30d6\u30ed\u30b0\u3067\u306fMicrosoft Azure\u306eFaaS\uff08Function-as-a-Service\uff09\u3067\u3042\u308bAzure Functions\u3092\u4f7f\u3063\u3066\u3001S <a class=\"read-more\" href=\"https:\/\/sendgrid.kke.co.jp\/blog\/?p=9403\">&#8230;\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":9,"featured_media":9418,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-9403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9403"}],"version-history":[{"count":56,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9403\/revisions"}],"predecessor-version":[{"id":9506,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9403\/revisions\/9506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/media\/9418"}],"wp:attachment":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}