{"id":15976,"date":"2022-10-27T11:24:43","date_gmt":"2022-10-27T02:24:43","guid":{"rendered":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=15976"},"modified":"2026-04-09T15:10:34","modified_gmt":"2026-04-09T06:10:34","slug":"notion%e3%81%a7%e4%bd%9c%e3%81%a3%e3%81%9f%e5%ae%9b%e5%85%88%e3%83%aa%e3%82%b9%e3%83%88%e3%81%ab%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%92%e4%b8%80%e6%96%89%e9%80%81%e4%bf%a1%e3%81%99%e3%82%8b%e6%96%b9","status":"publish","type":"post","link":"https:\/\/sendgrid.kke.co.jp\/blog\/?p=15976","title":{"rendered":"Notion\u3067\u4f5c\u3063\u305f\u5b9b\u5148\u30ea\u30b9\u30c8\u306b\u30e1\u30fc\u30eb\u3092\u4e00\u6589\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\uff08Java\u7de8\uff09"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/20221027_blog.png\" alt=\"Notion\u3067\u4f5c\u3063\u305f\u5b9b\u5148\u30ea\u30b9\u30c8\u306b\u30e1\u30fc\u30eb\u3092\u4e00\u6589\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\uff08Java\u7de8\uff09\" width=\"100%\" class=\"aligncenter size-full wp-image-15995\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/20221027_blog.png 650w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/20221027_blog-300x185.png 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>\u300c<a href=\"https:\/\/www.notion.so\/\" rel=\"noopener\" target=\"_blank\">Notion<\/a>\u300d\u306f\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4f5c\u6210\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30fb\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u306e\u7ba1\u7406\u307e\u3067\u5e45\u5e83\u3044\u6a5f\u80fd\u3092\u5099\u3048\u305f\u60c5\u5831\u5171\u6709\u30c4\u30fc\u30eb\u3067\u3059\u3002\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b<a href=\"https:\/\/developers.notion.com\/\" rel=\"noopener\" target=\"_blank\">API<\/a>\u3092\u4f7f\u3046\u3053\u3068\u3067Notion\u306e\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u306e\u3067\u3001Twilio SendGrid\u3068\u9023\u643a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001Notion\u3067\u4f5c\u3063\u305f\u5b9b\u5148\u30ea\u30b9\u30c8\u3092\u5229\u7528\u3057\u3066SendGrid\u304b\u3089\u30e1\u30fc\u30eb\u3092\u4e00\u6589\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u88c5\u306fJava\u3092\u4f8b\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u4ed6\u306e\u8a00\u8a9e\u3067\u3082\u540c\u69d8\u306e\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/1.png\" alt=\"Notion\u3067\u4f5c\u3063\u305f\u5b9b\u5148\u30ea\u30b9\u30c8\u3092\u5229\u7528\u3057\u3066SendGrid\u304b\u3089\u30e1\u30fc\u30eb\u3092\u4e00\u6589\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\" width=\"100%\" class=\"aligncenter size-full wp-image-15977\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/1.png 913w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/1-300x154.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/1-768x394.png 768w\" sizes=\"(max-width: 913px) 100vw, 913px\" \/><\/p>\n<h3>\u4f5c\u6210\u306e\u6d41\u308c<\/h3>\n<p>\u6b21\u306e4\u3064\u306e\u624b\u9806\u3067\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li>Notion\u306e\u30da\u30fc\u30b8\u3067\u5b9b\u5148\u30ea\u30b9\u30c8\u3092\u4f5c\u308b<\/li>\n<li>Notion API\u3092\u4f7f\u3046\u6e96\u5099\u3092\u3059\u308b\uff08Notion Integration\u306e\u4f5c\u6210\uff09<\/li>\n<li>SendGrid API\u3092\u4f7f\u3046\u6e96\u5099\u3092\u3059\u308b\uff08API\u30ad\u30fc\u306e\u4f5c\u6210\uff09<\/li>\n<li>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u88c5\u3059\u308b<\/li>\n<\/ol>\n<p>Notion\u3068SendGrid\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u304a\u6301\u3061\u3067\u306a\u3044\u65b9\u306f\u3042\u3089\u304b\u3058\u3081\u4f5c\u6210\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002SendGrid\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u3053\u3061\u3089\u306e\u30dc\u30bf\u30f3\u304b\u3089\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<br \/>\n<a class=\"fitWidthLink\" href=\"https:\/\/sendgrid.kke.co.jp\/app?p=signup.index&#038;utm_source=sg&#038;utm_medium=web&#038;utm_campaign=blog\" target=\"_blank\" style=\"width:50%;\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/09\/blog_cta2.png\" alt=\"\u7121\u6599\u3067\u8a66\u3059\" class=\"aligncenter size-full noshadow\" \/><\/a><\/p>\n<h3>1. Notion\u306e\u30da\u30fc\u30b8\u3067\u5b9b\u5148\u30ea\u30b9\u30c8\u3092\u4f5c\u308b<\/h3>\n<p>\u5b9b\u5148\u30ea\u30b9\u30c8\u306f\u300c\u30c6\u30fc\u30d6\u30eb\u300d\u3092\u4f7f\u3063\u3066\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/2.png\" alt=\"\u300c\u30c6\u30fc\u30d6\u30eb\u300d\u3092\u4f7f\u3063\u3066\u5b9b\u5148\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\" width=\"100%\" class=\"aligncenter size-full wp-image-15978\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/2.png 839w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/2-300x196.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/2-768x501.png 768w\" sizes=\"(max-width: 839px) 100vw, 839px\" \/><\/p>\n<p>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3068\u540d\u524d\u3092\u4e26\u3079\u305f\u3060\u3051\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u5b9b\u5148\u30ea\u30b9\u30c8\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/3.png\" alt=\"\u5b9b\u5148\u30ea\u30b9\u30c8\" width=\"100%\" class=\"aligncenter size-full wp-image-15979\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/3.png 1170w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/3-300x175.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/3-768x448.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/3-1024x598.png 1024w\" sizes=\"(max-width: 1170px) 100vw, 1170px\" \/><\/p>\n<h3>2. Notion Integration\u306e\u4f5c\u6210<\/h3>\n<p>Notion API\u3092\u4f7f\u3046\u6e96\u5099\u3092\u9032\u3081\u307e\u3059\u3002<a href=\"https:\/\/www.notion.com\/my-integrations\" rel=\"noopener\" target=\"_blank\">My integrations<\/a>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u300cNew integration\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/4.png\" alt=\"My integrations\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u300cNew integration\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\" width=\"100%\" class=\"aligncenter size-full wp-image-15980\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/4.png 1198w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/4-300x162.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/4-768x414.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/4-1024x552.png 1024w\" sizes=\"(max-width: 1198px) 100vw, 1198px\" \/><\/p>\n<p>Name(\u540d\u79f0)\u306f\u300cNotionSendGrid\u300d\u306b\u3057\u3066\u4e0b\u56f3\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/5.png\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/5.png\" alt=\"Name(\u540d\u79f0)\u306f\u300cNotionSendGrid\u300d\u306b\u3059\u308b\" width=\"100%\" class=\"aligncenter size-full wp-image-15981\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/5.png 1159w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/5-217x300.png 217w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/5-768x1064.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/5-739x1024.png 739w\" sizes=\"(max-width: 1159px) 100vw, 1159px\" \/><\/a><\/p>\n<p>\u300cSubmit\u300d\u3092\u62bc\u3057\u3066\u6b21\u306b\u9032\u3080\u3068\u30c8\u30fc\u30af\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30c8\u30fc\u30af\u30f3\u306f\u5f8c\u307b\u3069\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u969b\u306b\u5229\u7528\u3059\u308b\u306e\u3067\u5024\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/6.png\" alt=\"\u300cSubmit\u300d\u3092\u62bc\u3057\u3066\u6b21\u306b\u9032\u3080\u3068\u30c8\u30fc\u30af\u30f3\u304c\u8868\u793a\u3055\u308c\u308b\" width=\"100%\" class=\"aligncenter size-full wp-image-15982\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/6.png 609w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/6-300x130.png 300w\" sizes=\"(max-width: 609px) 100vw, 609px\" \/><\/p>\n<p>\u5b9b\u5148\u30ea\u30b9\u30c8\u306e\u30da\u30fc\u30b8\u306b\u623b\u3063\u3066\u3001\u30e1\u30cb\u30e5\u30fc\u306e\u300cAdd connections\u300d\u304b\u3089\u5148\u307b\u3069\u5165\u529b\u3057\u305fIntegration\u540d\u306e\u300cNotionSendGrid\u300d\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3067Notion API\u306e\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/7.png\" alt=\"\u30e1\u30cb\u30e5\u30fc\u306e\u300cAdd connections\u300d\u304b\u3089Integration\u540d\u306e\u300cNotionSendGrid\u300d\u3092\u9078\u629e\" width=\"100%\" class=\"aligncenter size-full wp-image-15997\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/7.png 1193w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/7-292x300.png 292w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/7-768x788.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/7-998x1024.png 998w\" sizes=\"(max-width: 1193px) 100vw, 1193px\" \/><\/p>\n<h3>3.SendGrid\u306eAPI\u30ad\u30fc\u4f5c\u6210<\/h3>\n<p>\u7d9a\u3044\u3066SendGrid\u306eAPI\u3092\u4f7f\u3046\u6e96\u5099\u3092\u9032\u3081\u307e\u3059\u3002\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306e<a href=\"https:\/\/app.sendgrid.com\/settings\/api_keys\" rel=\"noopener\" target=\"_blank\">Settings &gt; API Keys<\/a>\u3092\u958b\u3044\u3066<a href=\"https:\/\/sendgrid.kke.co.jp\/docs\/Tutorials\/A_Transaction_Mail\/manage_api_key.html#-Generate\" rel=\"noopener\" target=\"_blank\">API\u30ad\u30fc\u3092\u4f5c\u6210<\/a>\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4eca\u56de\u4f5c\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u6a29\u9650\u306e\u307f\u3042\u308c\u3070\u5341\u5206\u306a\u306e\u3067\u300cAPI Key Permissions\u300d\u306f\u300cRestricted Access\u300d\u3092\u9078\u629e\u3057\u3001API\u30ad\u30fc\u540d\u3092\u5165\u529b\u3057\u307e\u3059\u3002\u300cMail Send\u300d\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u3092\u300cFull Access\u300d\u306b\u3057\u305f\u3089API\u30ad\u30fc\u306e\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\u3002\u767a\u884c\u3055\u308c\u305fAPI\u30ad\u30fc\u306f\u5f8c\u307b\u3069\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u3046\u306e\u3067\u5024\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/8.png\" alt=\"SendGrid\u306eAPI\u30ad\u30fc\u4f5c\u6210\" width=\"100%\" class=\"aligncenter size-full wp-image-15984\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/8.png 1115w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/8-300x74.png 300w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/8-768x189.png 768w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/8-1024x253.png 1024w\" sizes=\"(max-width: 1115px) 100vw, 1115px\" \/><\/p>\n<h3>4.\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u6e96\u5099<\/h3>\n<h4>\u30e9\u30a4\u30d6\u30e9\u30ea<\/h4>\n<p>\u4eca\u56de\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u6b21\u306e2\u3064\u306eJava\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3044\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/seratch\/notion-sdk-jvm\" rel=\"noopener\" target=\"_blank\">Notion SDK for Any JVM Language<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/sendgrid\/sendgrid-java\" rel=\"noopener\" target=\"_blank\">SendGrid Java<\/a><\/li>\n<\/ul>\n<p>Notion\u306e\u30da\u30fc\u30b8\u306f\u4e0b\u56f3\u306e\u3088\u3046\u306a\u5185\u90e8\u69cb\u6210\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/9.png\" alt=\"Notion\u306e\u30da\u30fc\u30b8\u306e\u5185\u90e8\u69cb\u6210\" width=\"100%\" class=\"aligncenter size-full wp-image-15985\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/9.png 434w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/9-300x228.png 300w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/p>\n<p>\u30da\u30fc\u30b8\u306e\u30c7\u30fc\u30bf\u306fURL\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308bPageID\u3092\u4f7f\u3063\u3066\u53d6\u5f97\u3057\u307e\u3059\u3002\u30da\u30fc\u30b8\u5185\u306e\u3042\u3089\u3086\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306fBlock\u3068\u3044\u3046\u5358\u4f4d\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001Table\u306eBlock\u3001\u3055\u3089\u306b\u305d\u306e\u4e2d\u306eTableRow\u3068\u3044\u3046\u884c\u76f8\u5f53\u306eBlock\u304b\u3089\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3068\u540d\u524d\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<h4>\u74b0\u5883\u5909\u6570<\/h4>\n<p>Notion\u306e\u30c8\u30fc\u30af\u30f3\u3068SendGrid\u306eAPI\u30ad\u30fc\u3001PageID\u306f.env\u30d5\u30a1\u30a4\u30eb\u306b\u74b0\u5883\u5909\u6570\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u307e\u3059\u3002<a href=\"https:\/\/github.com\/cdimascio\/dotenv-java\" rel=\"noopener\" target=\"_blank\">dotenv-java<\/a>\u3092\u4f7f\u3063\u3066\u6b21\u306e.env\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nNTOKEN=secret_xxxxxxxxxx\nSGKEY=SG.xxxxxxxxxx\nPAGEID=xxxxxxxxxxx\n<\/pre>\n<h4>\u30b3\u30fc\u30c9<\/h4>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306f<a href=\"https:\/\/github.com\/kikutaro\/notionmail\" rel=\"noopener\" target=\"_blank\">\u3053\u3061\u3089<\/a>\u306b\u7f6e\u304d\u307e\u3057\u305f\u3002\u524d\u8ff0\u306e\u3068\u304a\u308aTable\u5185\u306eTableRow\u5358\u4f4d\u306b\u30eb\u30fc\u30d7\u3092\u56de\u3057\u3066\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3068\u540d\u524d\u3092\u53d6\u5f97\u3057\u305f\u3089\u3001SendGrid\u306e<a href=\"https:\/\/github.com\/sendgrid\/sendgrid-java\/blob\/main\/src\/main\/java\/com\/sendgrid\/helpers\/mail\/objects\/Personalization.java\" rel=\"noopener\" target=\"_blank\">Personalization<\/a>\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\nDotenv env = Dotenv.load();\ntry (NotionClient client = new NotionClient(env.get(&quot;NTOKEN&quot;))) {\n    \/\/\u30e1\u30fc\u30eb\u306e\u57fa\u672c\u60c5\u5831\n    Mail msg = new Mail();\n    msg.setSubject(&quot;name\u3055\u3093\u5b9b\u3066\u306e\u30e1\u30fc\u30eb\u3067\u3059&quot;);\n    msg.setFrom(new Email(&quot;from@example.com&quot;));\n    msg.addContent(new Content(&quot;text\/plain&quot;, &quot;name \u3055\u3093 \u3053\u3093\u306b\u3061\u306f\u3002&quot;));\n\n    \/\/\u30da\u30fc\u30b8\u304b\u3089Table Block\u3092\u53d6\u5f97\n    Blocks pageBlocks = client.retrieveBlockChildren(env.get(&quot;PAGEID&quot;), null, 0);\n    TableBlock table = pageBlocks.getResults().get(0).asTable();\n    Blocks rows = client.retrieveBlockChildren(table.getId(), null, 0);\n\n    \/\/Table Block\u304b\u3089TableRow Block\u3092\u53d6\u5f97\u3057\u3066\u51e6\u7406\n    rows.getResults().stream().forEach(r -&gt; {\n        TableRowBlock tbr = r.asTableRow();\n            Personalization p = new Personalization();\n            for(int i=0; i &lt; tbr.getTableRow().getCells().size(); i++) {\n                List&lt;RichText&gt; list = tbr.getTableRow().getCells().get(i);\n                if(i%2==0) {\n                    p.addTo(new Email(list.get(0).getPlainText()));\n                } else {\n                    p.addSubstitution(&quot;name&quot;, list.get(0).getPlainText());\n                }\n            }\n        msg.addPersonalization(p);\n });\n<\/pre>\n<p>\u3042\u3068\u306fmail\/send\u3067\u4e00\u6589\u9001\u4fe1\u3059\u308b\u3060\u3051\u3067\u3059\u3002\u3053\u308c\u3067\u3001\u5b9b\u5148\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u5fdc\u3058\u305f\u540d\u524d\u3092\u672c\u6587\u306b\u5dee\u3057\u8fbc\u3093\u3060\u30e1\u30fc\u30eb\u3092\u9001\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\n\/\/\u9001\u4fe1\u51e6\u7406\nSendGrid sg = new SendGrid(env.get(&quot;SGKEY&quot;));\nRequest req = new Request();\nreq.setMethod(Method.POST);\nreq.setEndpoint(&quot;mail\/send&quot;);\nreq.setBody(msg.build());\nResponse resp = sg.api(req);\n\u2026\n<\/pre>\n<p>\u5b9f\u969b\u306b\u53d7\u4fe1\u3057\u305f\u30e1\u30fc\u30eb\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/10.png\" alt=\"\u5b9f\u969b\u306b\u53d7\u4fe1\u3057\u305f\u30e1\u30fc\u30eb1\" width=\"100%\" class=\"aligncenter size-full wp-image-15986\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/10.png 625w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/10-300x73.png 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/11.png\" alt=\"\u5b9f\u969b\u306b\u53d7\u4fe1\u3057\u305f\u30e1\u30fc\u30eb2\" width=\"100%\" class=\"aligncenter size-full wp-image-15987\" srcset=\"https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/11.png 632w, https:\/\/sendgrid.kke.co.jp\/blog\/wp\/wp-content\/uploads\/2022\/10\/11-300x74.png 300w\" sizes=\"(max-width: 632px) 100vw, 632px\" \/><\/p>\n<h3>\u304a\u308f\u308a\u306b<\/h3>\n<p>\u4eca\u56de\u306e\u30d6\u30ed\u30b0\u3067\u306fNotion\u3067\u4f5c\u3063\u305f\u5b9b\u5148\u30ea\u30b9\u30c8\u3092SendGrid\u3068\u9023\u643a\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u9023\u643a\u306fJava\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u5b9f\u88c5\u3057\u307e\u3057\u305f\u304c\u3001Zapier\u306a\u3069\u306e\u30ce\u30fc\u30b3\u30fc\u30c9\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u540c\u3058\u3053\u3068\u304c\u3067\u304d\u305d\u3046\u3067\u3059\u3002\u4eca\u5ea6\u8a66\u3057\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300cNotion\u300d\u306f\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4f5c\u6210\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30fb\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u306e\u7ba1\u7406\u307e\u3067\u5e45\u5e83\u3044\u6a5f\u80fd\u3092\u5099\u3048\u305f\u60c5\u5831\u5171\u6709\u30c4\u30fc\u30eb\u3067\u3059\u3002\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308bAPI\u3092\u4f7f\u3046\u3053\u3068\u3067Notion\u306e\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u306e\u3067\u3001Twilio SendGrid <a class=\"read-more\" href=\"https:\/\/sendgrid.kke.co.jp\/blog\/?p=15976\">&#8230;\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":9,"featured_media":15995,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-15976","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\/15976","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=15976"}],"version-history":[{"count":11,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15976\/revisions"}],"predecessor-version":[{"id":20592,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15976\/revisions\/20592"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=\/wp\/v2\/media\/15995"}],"wp:attachment":[{"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sendgrid.kke.co.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}