Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SendGrid + Googleスプレッドシートによる簡単Webサイト構築

SendGrid + Googleスプレッドシートによる簡単Webサイト構築

SendGrid Night ~10th Anniversary〜 向けのLT資料です

Atsushi Nakatsugawa

December 14, 2023
Tweet

More Decks by Atsushi Nakatsugawa

Other Decks in Technology

Transcript

  1. PAGE DAY 2017/11/01 # MOONGIFT / 12 SendGrid + GoogleεϓϨου

    γʔτʹΑΔ؆୯WebαΠτߏங 1 4FOE(SJE/JHIUʙUI"OOJWFSTBSZʙ THOJHIUUI
  2. PAGE # MOONGIFT / 50 DAY 2019/02/14 ࣗݾ঺հ 2 @goofmint

    fb.me/goofmint த௡઒ ಞ࢘ גࣜձࣾMOONGIFT୅දऔక໾ https://www.moongift.co.jp ΤόϯδΣϦετɾίϛϡχςΟϚωʔδϟʔ ίϛϡχςΟ ओ࠵ THOJHIUUI
  3. PAGE # MOONGIFT / 50 DAY 2019/02/14 ࠓ೔͓࿩͢͠Δ͜ͱ DevRelCon Yokohama

    2023ͷWebαΠτ Λࢧ͑ͨSendGridͷ͓࿩ 3 THOJHIUUI
  4. PAGE # MOONGIFT / 50 DAY 2019/02/14 DevRelCon is Կʁ

    • DevRelʢDeveloper Relationsʣʹؔ͢Δ άϩʔόϧͳΧϯϑΝϨϯε • DevRel = ࣗࣾ΍ࣗࣾαʔϏεͱɺ֎෦ͷ ։ൃऀͱͷؒʹྑ޷ͳؔ܎ੑΛங͘׆ಈ 4 THOJHIUUI
  5. PAGE # MOONGIFT / 50 DAY 2019/02/14 ΧϯϑΝϨϯεެࣜαΠτͷ ίϯηϓτ •

    Ͱ͖Δָ͚ͩʹӡӦ͍ͨ͠ • ͳΔ΂͘खؒΛ͔͚ͨ͘ͳ͍ • ࣗಈԽ͍ͨ͠ 5 ϓϩάϥϚʔͷࡾେඒಙʮଵଦʯʮ୹ؾʯʮၗຫʯ THOJHIUUI
  6. PAGE # MOONGIFT / 50 DAY 2019/02/14 ΞʔΩςΫνϟ 6 γʔτͷσʔλΛ

    +40/Ͱμ΢ϯϩʔυ ੩తαΠτΛ σϓϩΠ THOJHIUUI
  7. PAGE # MOONGIFT / 50 DAY 2019/02/14 ΞʔΩςΫνϟ 7 ϝʔϧͰͷ

    ͓໰͍߹Θͤ 8FCIPPLͰ ("4ݺͼग़͠ 4MBDLͰ ӡӦʹ௨஌ THOJHIUUI
  8. PAGE # MOONGIFT / 50 DAY 2019/02/14 Google Apps Script

    11 function doPost(e) { const { to, from, subject, text, html, headers } = e.parameter; // লུ } THOJHIUUI
  9. PAGE # MOONGIFT / 50 DAY 2019/02/14 12 const property

    = PropertiesService.getScriptProperties(); const body = { "personalizations": [{"to": [{ email }], subject, }], "from": { "email": from, "name" : from_name }, "content": [{"type": "text/plain", "value": body_text}] }; if (body_html) { body.personalizations[0].content.push({ "type": "text/html", "value": body_html }); } const payload = JSON.stringify(body); const res = UrlFetchApp.fetch('https://api.sendgrid.com/v3/mail/send', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${property.getProperty('SENDGRID_API_KEY')}`}, payload: payload }); return res.getResponseCode() === 202; THOJHIUUI
  10. PAGE # MOONGIFT / 50 DAY 2019/02/14 SendGrid΁ͷ͓ئ͍ 🙇 •

    εύϜϑΟϧλʔ෇͚ͯ΋ɺΊͬͪΌεύϜདྷΔ • ϙετ͢Δ಺༰ΛUTF-8ʹม׵ͯ͘͠ΕΔͱخ͍͠… • GAS SDK͕͋Δͱྑ͍Μ͡Όͳ͍͔ͳʁ 13 THOJHIUUI
  11. PAGE # MOONGIFT / 50 DAY 2019/02/14 ΞʔΩςΫνϟ αΠτσʔλ αΠτσϓϩΠ

    ͓໰͍߹Θͤ ϝʔϧ ௨஌ Ұ੪ૹ৴ 8FCIPPL ొஃऀɾࢀՃऀ޲͚ ϝʔϧ THOJHIUUI
  12. PAGE # MOONGIFT / 50 DAY 2019/02/14 αʔϏεબఆʹ͍ͭͯ 16 ීஈ͔Β࢖͍ͬͯΔ

    ແྉ࿮ͰӡӦ͍ͯ͠ΔʢίϛϡχςΟʹͯʣ "1*Ͱ௨஌Λड͚औΕΔʢࣗಈԽͰ͖Δʣ THOJHIUUI
  13. PAGE # MOONGIFT / 50 DAY 2019/02/14 αʔϏεબఆʹ͍ͭͯ 17 ࢖͍׳Ε͍ͯΔ

    ("4͕ศརʢ1045Λड͚औΕΔͳͲʣ σʔλΛ%#෩ʹɺॊೈʹ؅ཧͰ͖Δ THOJHIUUI
  14. PAGE # MOONGIFT / 50 DAY 2019/02/14 αʔϏεબఆʹ͍ͭͯ 18 ແྉ࿮͕͋Δ

    σϓϩΠ͕؆୯ʢ(JU)VC࿈ܞɺ$-*ͳͲʣ άϩʔόϧରԠͨ͠$%/ʢதࠃআ͘ʣ THOJHIUUI
  15. PAGE # MOONGIFT / 50 DAY 2019/02/14 αʔϏεબఆʹ͍ͭͯ 19 ීஈ͔Β࢖͍ଓ͚͍ͯΔ৴པײ

    ϝʔϧड৴ରԠͷαʔϏε͸ݶΒΕΔ ड৴ɾૹ৴ରԠͷϝʔϧαʔόʔΛ҆ఆɾ ϝϯςφϯεϑϦʔͰӡ༻Ͱ͖Δ THOJHIUUI
  16. PAGE # MOONGIFT / 50 DAY 2019/02/14 ·ͱΊ • SendGrid

    10प೥͓ΊͰͱ͏͍͟͝·͢ʂ 🎊🎊🎊 • DevRelCon YokohamaͷαΠτ͸΄΅ແྉͰ҆ఆͯ͠ӡ༻ • Google Apps Script + SendGrid͸ศརͳͷͰ͓קΊ • Ϋϥ΢υαʔϏεͷબఆ͸ྉۚɾ҆ఆੑɾ֦ுੑɾ৴པੑ 20 THOJHIUUI
  17. PAGE # MOONGIFT / 50 DAY 2019/02/14 👋 Thanks! @goofmint

    fb.me/goofmint ͝ײ૝͓଴ͪ͠·͢ʂ