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

小学生でもわかる SlackAPI×GAS

yosi
August 09, 2022

小学生でもわかる SlackAPI×GAS

yosi

August 09, 2022
Tweet

More Decks by yosi

Other Decks in Programming

Transcript

  1. ʮখֶੜͰ΋Θ͔Δʯ


    SlackAPI × GAS
    גࣜձࣾRaiseTechɹΑ͠

    View full-size slide

  2. ࣗݾ঺հ


    Α͠(দా޾య)

    ΤϯδχΞ ྺ 1೥1ϲ݄


    29ࡀɹ෕ྺ1೥ɹ


    ݩখֶߍڭ་ (6೥ؒ)


    →डୗ։ൃاۀ(php)


    →ΤϯδχΞϦϯάεΫʔϧRaiseTech


    ɹJava,React,TypeScript,GAS


    View full-size slide

  3. ຊ೔ͷςʔϚ
    GAS×SlackAPI͸


    ϝϦοτ͕͍ͬͺ͍ʂ


    View full-size slide

  4. ᶃ࣮૷͕͓खܰ


    ᶄGAS͸൚༻ੑͷߴ͍ݴޠ


    ᶅνʔϜʹߩݙ͠΍͍͢
    ϝϦοτ

    View full-size slide

  5. ɾΞϝϦΧͰ։ൃ͞ΕͨϏδωενϟοτπʔϧͰ͢ɻ

    ɾݩʑ։ൃελοϑ͕ͨͪࣾ಺ͷίϛϡχέʔγϣϯ༻ʹ࡞ͬͨ


    πʔϧɻ


    ɾࣗ෼ͰΧελϚΠζͰ͖ΔAPI͕๛෋

    ڝ߹


    MicrosoftTeams,LINE WORKS,,,etc


    ࠾༻اۀ

    αΠόʔΤʔδΣϯτ / ύφιχοΫ / ϝϧΧϦ / σΟʔɾΤψɾ
    Τʔ / Ϡϑʔδϟύϯ /
    Slack

    View full-size slide

  6. SlackAPI×GASͰͰ͖Δ͜ͱ
    ɾఆ࣌ͷϝοηʔδૹ৴


    ɾGoogleformͷճ౴Λϝοηʔδʹ౤ߘ


    ɾ Slackͷ͋Δಈ࡞ΛτϦΨʔʹ͠ɺ

    ͦΕ͕ߦͳͬͨࡍͷॲཧΛ͢Δɻ


    → SlackAPIͷϦϑΝϨϯε͋Δࣄ͸ͳΜͰ΋Ͱ͖Δʂʂ


    →ࣗಈԽͰ࡞ۀ͕࣌ؒ࡟ݮʂʂ


    View full-size slide

  7. 1. ࣮૷͕͓खܰ


    View full-size slide

  8. ࣮૷͢Δࡍʹग़ͯ͘Δোน
    ։ൃ؀ڥΛ
    ·ͣ͸੔͑ͯ ೖྗϑΥʔϜ΍ɺ
    ݟͨ໨ͷ෦෼
    Ͳ͏΍͔ͬͯ͜ʔ͔ͳʁ
    σϓϩΠ·Ͱ͢Δʹ
    Πϯϑϥͷͱͪ͜ΐͬͱ
    ۤखͳΜͩΑͳʙ

    View full-size slide

  9. ɾGoogle͕։ൃ,ఏڙ͍ͯ͠Δݴޠ

    ɾJavaScriptΛϕʔεͱͨ͠εΫϦϓτݴޠ


    ɾGoogleͷఏڙ͢ΔαʔϏεͱͷ࿈ܞ


    ɾ։ൃ؀ڥͷ४උ͸͍Βͳ͍


    ɾτϦΨʔઃఆ,σϓϩΠ΋؆୯

    →΍ͬͯΈ͍ͨʂͱࢥͬͨΒଈ࣮ݱՄೳ
    GAS(Google Apps Script)


    View full-size slide

  10. 2. GAS͸൚༻ੑͷߴ͍ݴޠ


    View full-size slide

  11. ͜Ε͸ֶͿ΂͖ݴޠͩʂͱ
    ࢥ͏΋ͷ͸ԿͰ͠ΐ͏͔??

    View full-size slide

  12. ࠓֶͿ΂͖ݴޠͱͯ͠ɺ


    JavaScript͸ͱͯ΋͓͍͍͠😋
    GAS͸JSΛϕʔεʹ࡞ΒΕͯΔˣ

    View full-size slide

  13. 3.νʔϜʹߩݙ͠΍͍͢


    View full-size slide

  14. νʔϜʹߩݙ͠ʹ͍͘!


    δϡχΞͷ೰Έ,,,

    View full-size slide



  15. ࣗ෼ͷͰ͖Δࣄʹϑϧίϛοτ


    νʔϜͷ࿈ܞؒͰɺ
    ฦ౴࿙Ε͕͋ͬͨΓɺ
    ͯ͠ͳ͍͔ͳ
    ࠓͷ؀ڥʹ͸͜ͷ
    λεΫπʔϧ΋
    ͋ͬͯΔͷͰ͸ͳ͍͔
    ͜ͷఆظతͳ࡞ۀ͸
    ࣗಈԽͰ͖ͳ͍͔ͳʁʁ

    View full-size slide

  16. ɾAPIΛୟ͖ʹߦ͘࡞ۀ


    ɾOAuth,τʔΫϯ


    ɾJSON


    ɾWebhook
    API࿈ܞͷษڧʹͳΔ

    View full-size slide

  17. GAS×SlackAPI͸


    ͙͢ʹ࣮૷Ͱ͖Δ͠ɺ


    ίʔσΟϯά΋؆୯


    JSͷษڧʹ΋ͳΔɺ


    API࿈ܞͷ࿅शʹ΋ͳΔʂʂ



    View full-size slide

  18. GAS×SlackAPI͸


    ϝϦοτ͕͍ͬͺ͍ʂ


    View full-size slide