ํ”„๋กœ์ ํŠธ ๊ด€๋ฆฌ, ๋ถ„์„ ๋ฐ ๋ฆฌ์›Œ๋“œ
์›นํ›… ์—ฐ๋™ํ•˜๊ธฐ

์›นํ›… ์—ฐ๋™ํ•˜๊ธฐ

๐Ÿ””
์›นํ›…์„ ํ†ตํ•ด ์‘๋‹ต์ด ๋„์ฐฉํ–ˆ์„ ๋•Œ ์•Œ๋ฆผ์„ ๋ฐ›๊ฑฐ๋‚˜, ๋‹ค๋ฅธ ์„œ๋น„์Šค์™€ ์—ฐ๋™ํ•ด ์„ค๋ฌธ๊ณผ ๊ด€๋ จ๋œ ๋‹ค์–‘ํ•œ ์ •๋ณด๋ฅผ ๋ฐ›์•„๋ณผ ์ˆ˜ ์žˆ์–ด์š”.

์›นํ›… ์—ฐ๋™์˜ ๊ธฐ๋ณธ

  1. ์›นํ›… ์ข…๋ฅ˜

    • Submit: ์‘๋‹ต์ด ์ œ์ถœ๋œ ๊ฒฝ์šฐ, ์•Œ๋ฆผ์„ ๋ณด๋‚ด์š”.
    • Reject: ์‘๋‹ต์ด ์ œ์ถœ๋˜์ง€ ๋ชปํ•˜๊ณ  ์ค‘๊ฐ„์— ํƒˆ๋ฝ๋œ ๊ฒฝ์šฐ (ํƒˆ๋ฝ ํ•„๋“œ๋กœ ์ด์–ด์ง„ ๊ฒฝ์šฐ), ์•Œ๋ฆผ์„ ๋ณด๋‚ด์š”.
  2. ์›นํ›… ์ด๋ฆ„: ์›นํ›…์˜ ์ด๋ฆ„์ด์—์š”.

  3. ์›นํ›… ์ฃผ์†Œ: ์„œ๋“œํŒŒํ‹ฐ ํˆด์—์„œ ์›นํ›… ์—ฐ๋™์„ ์œ„ํ•ด ์ œ๊ณตํ•˜๋Š” URL์ด์—์š”.

  4. ์š”์ฒญ ์ข…๋ฅ˜: https ์š”์ฒญ์˜ ์ข…๋ฅ˜๋ฅผ Post ์™€ Get ์ค‘์—์„œ ์„ ํƒํ•  ์ˆ˜ ์žˆ์–ด์š”.

  5. ์ปค์Šคํ…€ Header: Key-Value๋ฅผ ์ž์œ ๋กญ๊ฒŒ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ํ•  ์ˆ˜ ์žˆ์–ด์š”.

    • Header Name: Discord, Slack ๋“ฑ์—์„œ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ 'Content-Type'์„ ์‚ฌ์šฉํ•ด์š”.
    • Value: Discord, Slack ๋“ฑ์—์„œ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ 'application/json'์„ ์‚ฌ์šฉํ•ด์š”.
  6. Body ์„ค์ •:

    • ์ปค์Šคํ…€ Body: Body ํ”„๋ฆฌ์…‹ ๊ฐ’์„ ์ด์šฉํ•ด ์›นํ›… ์•Œ๋ฆผ์˜ ๋‚ด์šฉ์„ ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ์–ด์š”.
    • Body ํ”„๋ฆฌ์…‹: ๊ธฐ๋ณธ์ ์œผ๋กœ "":"{{res:์‘๋‹ต๊ฐ’}}" ์˜ ํ˜•์‹์œผ๋กœ, ๋”ฐ์˜ดํ‘œ ์•ˆ์˜ ๊ฐ’์„ ๋ณต์‚ฌํ•ด ์ปค์Šคํ…€ Body์— ๋ถ™์—ฌ๋„ฃ์–ด ์ด์šฉํ•  ์ˆ˜ ์žˆ์–ด์š”.
      • ๋ฌธํ•ญ: ์–ด๋–ค ๋ฌธํ•ญ์˜ ์‘๋‹ต์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.
        • โ€˜ํžˆ๋“ ํ•„๋“œโ€™๋ฅผ ์ถ”๊ฐ€ํ•œ ๊ฒฝ์šฐ, ๋งจ ์•„๋ž˜์— ์ƒ๊ธฐ๋Š” โ€˜ํžˆ๋“ ํ•„๋“œโ€™์˜ ํ”„๋ฆฌ์…‹์„ ๋ณต์‚ฌํ•  ์ˆ˜ ์žˆ์–ด์š”.
      • projectKey: ์–ด๋–ค ํ”„๋กœ์ ํŠธ์ธ์ง€ project Key๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.
      • customerKey: ์–ด๋–ค ์‘๋‹ต์ž์ธ์ง€ customer Key๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.
        • ์ด๋•Œ URL์— ํžˆ๋“ ํ•„๋“œ์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ customerKey=value ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์–ด์•ผ ํ•ด์š”. ex) https://walla.my/v/~~~?source=Instagram&customerKey=Minsu
      • responseKey: ์–ด๋–ค ์‘๋‹ต์ธ์ง€ response Key๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.
    • ๋งŒ์•ฝ ์‘๋‹ต ๋‚ด์šฉ๊ณผ ํžˆ๋“ ํ•„๋“œ์˜ ์ข…๋ฅ˜๋ฅผ ์•Œ๋ฆผ ๋ฐ›๊ธฐ ์œ„ํ•ด https://walla.my/v/fLptDL9bbvlxRvWRTNud?source=Instagram&customerKey=Minsu ๋ผ๋Š” ์„ค๋ฌธ URL์„ ๊ณต์œ ํ•˜๊ณ , ์•„๋ž˜์™€ ๊ฐ™์ด Body๋ฅผ ์„ค์ •ํ•œ๋‹ค๋ฉด
{
"content": "{{projectKey}} ์„ค๋ฌธ์˜ ์‘๋‹ต์ด ๋„์ฐฉํ–ˆ์Šต๋‹ˆ๋‹ค! ์‘๋‹ต์ž์˜ ์ƒ์ผ์€ {{res:2865092957}}์ž…๋‹ˆ๋‹ค. ์ด ์‘๋‹ต์˜ CustomerKey๋Š” {{customerKey}}์ด๊ณ , ResponseKey๋Š” {{responseKey}}์ž…๋‹ˆ๋‹ค. ํžˆ๋“ ํ•„๋“œ {{hidden:1495742778}}๋ฅผ ํ†ตํ•ด ๊ธฐ๋ก๋œ ์‘๋‹ต์ž…๋‹ˆ๋‹ค."
}

์ด๋Ÿฌํ•œ ์›นํ›… ์•Œ๋ฆผ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์–ด์š”.

Untitled

โš ๏ธ
์›นํ›…์˜ ์š”์ฒญ ๋ฐ์ดํ„ฐ์˜ ํ˜•์‹์€ ๊ฐ ์„œ๋น„์Šค์˜ APP ์—์„œ ์ œ๊ณตํ•˜๋Š” DOCS๋ฅผ ํ™•์ธํ•ด์•ผ๋  ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

Discord ์—ฐ๋™ํ•˜๊ธฐ

1. ์•Œ๋ฆผ์„ ๋ฐ›๊ณ ์ž ํ•˜๋Š” Discord ์„œ๋ฒ„์˜ '์ฑ„๋„ ํŽธ์ง‘' ์„ค์ •์— ๋“ค์–ด๊ฐ€์ฃผ์„ธ์š”.

Untitled

2. '์—ฐ๋™' ํƒญ์˜ '์›นํ›„ํฌ'๋ฅผ ํด๋ฆญํ•ด์ฃผ์„ธ์š”.

Untitled

3. '์›น ํ›„ํฌ URL ๋ณต์‚ฌ'๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

4. ์™ˆ๋ผ์˜ '์—ฐ๋™ํ•˜๊ธฐ' ํƒญ์—์„œ '์›นํ›… ๊ด€๋ฆฌ' ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

5. Discord์—์„œ ๋ณต์‚ฌํ•œ URL์„ ๋ถ™์—ฌ๋„ฃ๊ณ , '์›นํ›… ์ถ”๊ฐ€' ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

6. ์ปค์Šคํ…€ ํ—ค๋”์˜ Header Name ๊ฐ’์€ Content-Type ์œผ๋กœ, Value ๊ฐ’์€ application/json ์œผ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์„ธ์š”.

๐Ÿ””
๋งŒ์•ฝ '์‘๋‹ต ์ œ์ถœ'์ด ์•„๋‹Œ 'ํƒˆ๋ฝ'์— ๋Œ€ํ•œ ์•Œ๋ฆผ์„ ๋ฐ›๊ณ  ์‹ถ๋‹ค๋ฉด, ์›นํ›… ์ข…๋ฅ˜๋ฅผ Reject๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์„ธ์š”.

Untitled

7. Body ์„ค์ •์„ ํ™œ์„ฑํ™”ํ•œ ํ›„, ์•„๋ž˜์˜ Body ํ”„๋ฆฌ์…‹์„ ์ฐธ๊ณ ํ•ด ์ž์œ ๋กญ๊ฒŒ ๋””์Šค์ฝ”๋“œ๋กœ ๋ฐ›๊ณ ์ž ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.

  • ์•„๋ž˜์˜ ํ˜•์‹์— ๋”ฐ๋ผ, ํฐ๋”ฐ์˜ดํ‘œ ์‚ฌ์ด์— ์›ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.

  • ์‘๋‹ต ๋‚ด์šฉ์„ ๋ฐ›๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ์—๋Š” ํ”„๋ฆฌ์…‹์˜ {{res:~~}}๋ฅผ ๋ถ™์—ฌ๋„ฃ์–ด์ฃผ์„ธ์š”.

  • ํžˆ๋“ ํ•„๋“œ๋ฅผ ์„ค์ •ํ•œ ๊ฒฝ์šฐ์—๋Š” ํžˆ๋“ ํ•„๋“œ ๋‚ด์šฉ๋„ ์•Œ๋ฆผ์œผ๋กœ ๋ฐ›์„ ์ˆ˜ ์žˆ์–ด์š”.

Untitled

8. ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ €์žฅํ•œ ํ›„, '์›นํ›… ์„ค์ •'์—์„œ ํ™œ์„ฑํ™” ํ•ด์ฃผ์„ธ์š”.

Untitled

9. ์‘๋‹ต์ด ๋„์ฐฉํ•˜๋ฉด ๋””์Šค์ฝ”๋“œ๋กœ ์•Œ๋ฆผ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์–ด์š”.

Untitled

SLACK ์—ฐ๋™ํ•˜๊ธฐ

1. https://api.slack.com/start/quickstart (opens in a new tab) ์—์„œ 'Go to Your Apps'๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

2. 'Create an App'์„ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

3. 'From scratch'๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

4. ์›นํ›…์˜ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜๊ณ  ์•Œ๋ฆผ์„ ๋ฐ›์„ Slack ์›Œํฌ์ŠคํŽ˜์ด์Šค๋ฅผ ์„ ํƒํ•ด์ฃผ์„ธ์š”.

Untitled

5. 'Incoming Webhooks'๋ฅผ ํด๋ฆญํ•ด์ฃผ์„ธ์š”.

Untitled

6. ์›นํ›… ์‚ฌ์šฉ์„ ํ™œ์„ฑํ™”ํ•ด์ฃผ์„ธ์š”.

Untitled

7. 'Add New Webhook to Workspace'๋ฅผ ํด๋ฆญํ•ด์ฃผ์„ธ์š”.

Untitled

8. ์•Œ๋ฆผ์„ ๋ฐ›์„ ์ฑ„๋„์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”.

Untitled

9. ์™„์„ฑ๋œ ์›นํ›… URL์„ ๋ณต์‚ฌํ•ด์ฃผ์„ธ์š”.

Untitled

10. ์™ˆ๋ผ์˜ '์—ฐ๋™ํ•˜๊ธฐ' ํƒญ์—์„œ '์›นํ›… ๊ด€๋ฆฌ' ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

11. Slack์—์„œ ๋ณต์‚ฌํ•œ URL์„ ๋ถ™์—ฌ๋„ฃ๊ณ , '์›นํ›… ์ถ”๊ฐ€' ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

12. ์ปค์Šคํ…€ ํ—ค๋”์˜ Header Name ๊ฐ’์€ Content-Type ์œผ๋กœ, Value ๊ฐ’์€ application/json ์œผ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์„ธ์š”.

๐Ÿ””
๋งŒ์•ฝ '์‘๋‹ต ์ œ์ถœ'์ด ์•„๋‹Œ 'ํƒˆ๋ฝ'์— ๋Œ€ํ•œ ์•Œ๋ฆผ์„ ๋ฐ›๊ณ  ์‹ถ๋‹ค๋ฉด, ์›นํ›… ์ข…๋ฅ˜๋ฅผ Reject๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์„ธ์š”.

Untitled

13. Body ์„ค์ •์„ ํ™œ์„ฑํ™”ํ•œ ํ›„, ์•„๋ž˜์˜ Body ํ”„๋ฆฌ์…‹์„ ์ฐธ๊ณ ํ•ด ์ž์œ ๋กญ๊ฒŒ SLACK์œผ๋กœ ๋ฐ›๊ณ ์ž ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.

  • ์•„๋ž˜์˜ ํ˜•์‹์— ๋”ฐ๋ผ, ํฐ๋”ฐ์˜ดํ‘œ ์‚ฌ์ด์— ์›ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.
{
    "text": "์ด ๋ถ€๋ถ„์— ์ž์œ ๋กญ๊ฒŒ ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”."
}
  • ์‘๋‹ต ๋‚ด์šฉ์„ ๋ฐ›๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ์—๋Š” ํ”„๋ฆฌ์…‹์˜ {{res:~~}}๋ฅผ ๋ถ™์—ฌ๋„ฃ์–ด์ฃผ์„ธ์š”.

  • ํžˆ๋“ ํ•„๋“œ๋ฅผ ์„ค์ •ํ•œ ๊ฒฝ์šฐ์—๋Š” ํžˆ๋“ ํ•„๋“œ ๋‚ด์šฉ๋„ ์•Œ๋ฆผ์œผ๋กœ ๋ฐ›์„ ์ˆ˜ ์žˆ์–ด์š”.

Untitled

14. ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ €์žฅํ•œ ํ›„, '์›นํ›… ์„ค์ •'์—์„œ ํ™œ์„ฑํ™” ํ•ด์ฃผ์„ธ์š”.

Untitled

15. 'Install App' ํƒญ์—์„œ 'Reinstall to Workspace'๋ฅผ ๋ˆŒ๋Ÿฌ ๋‹ค์‹œ ์›นํ›…์„ ์„ค์น˜ํ•ด์ฃผ์„ธ์š”.

Untitled

16. ์•Œ๋ฆผ์„ ๋ฐ›์„ ์ฑ„๋„์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”.

Untitled

17. ์‘๋‹ต์ด ๋„์ฐฉํ•˜๋ฉด SLACK์œผ๋กœ ์•Œ๋ฆผ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์–ด์š”.

Untitled

์ด๋ฉ”์ผ ์—ฐ๋™ํ•˜๊ธฐ

1. https://script.google.com/ (opens in a new tab) ์— ์ ‘์†ํ•ด '์ƒˆ ํ”„๋กœ์ ํŠธ'๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

2. ๊ธฐ๋ณธ ๋‚ด์šฉ์„ ๋ชจ๋‘ ์ง€์šด ํ›„, ์•„๋ž˜์˜ ์ฝ”๋“œ๋ฅผ ๋ถ™์—ฌ๋„ฃ์–ด์ฃผ์„ธ์š”.

  • ์ฝ”๋“œ ์ค‘ "------@------.---" ๋ถ€๋ถ„์—๋Š” ๋”ฐ์˜ดํ‘œ ์‚ฌ์ด์— ์•Œ๋ฆผ์„ ๋ฐ›์„ ์ด๋ฉ”์ผ์„ ์ ์–ด์ฃผ์„ธ์š”.

  • ex) "minsu@walla.my, yeonghee@walla.my"

  • ์ฝ”๋“œ ์ค‘ <${FORM_TITLE}> ------------ ๋ถ€๋ถ„์—๋Š” ๋ฉ”์ผ์˜ ์ œ๋ชฉ์„ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”.

  • ex) <${FORM_TITLE}> ์„ค๋ฌธ์— ์ œ์ถœ๋œ ์‘๋‹ต

function doPost(e) {
  // Parsing the POST data to get the required data
  var data = JSON.parse(e.postData.contents);
  var formAnswers = data.form_answers;
  var submittedAt = new Date(data.form_response.submitted_at);
 
  var formattedDate = formatDate(submittedAt);
  var FORM_TITLE= data.form_definition.title;
  var PROJECT_KEY= data.form_definition.id;
  // Building email content with enhanced styling
  var emailBody = `<!doctype html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <head> <meta charset="utf-8"/> <meta content="width=device-width" name="viewport"/> <meta content="IE=edge" http-equiv="X-UA-Compatible"/> <meta name="x-apple-disable-message-reformatting"/> <meta content="telephone=no,address=no,email=no,date=no,url=no" name="format-detection"/> <title>Checkout</title> <link href="https://fonts.googleapis.com/css?family=Inter:600" rel="stylesheet" type="text/css"><link href="https://fonts.googleapis.com/css?family=Inter:400" rel="stylesheet" type="text/css"> <!--[if mso]> <style> * { font-family: sans-serif !important; } </style> <![endif]--> <!--[if !mso]><!--> <!-- <![endif]--> <style> html { margin: 0 !important; padding: 0 !important; } * { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } td { vertical-align: top; mso-table-lspace: 0pt !important; mso-table-rspace: 0pt !important; } a { text-decoration: none; } img { -ms-interpolation-mode:bicubic; } @media only screen and (min-device-width: 320px) and (max-device-width: 374px) { u ~ div .email-container { min-width: 320px !important; } } @media only screen and (min-device-width: 375px) and (max-device-width: 413px) { u ~ div .email-container { min-width: 375px !important; } } @media only screen and (min-device-width: 414px) { u ~ div .email-container { min-width: 414px !important; } } </style> <!--[if gte mso 9]> <xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml> <![endif]--> <style> @media only screen and (max-device-width: 599px), only screen and (max-width: 599px) { .eh { height:auto !important; } .desktop { display: none !important; height: 0 !important; margin: 0 !important; max-height: 0 !important; overflow: hidden !important; padding: 0 !important; visibility: hidden !important; width: 0 !important; } .mobile { display: block !important; width: auto !important; height: auto !important; float: none !important; } .email-container { width: 100% !important; margin: auto !important; } .stack-column, .stack-column-center { display: block !important; width: 100% !important; max-width: 100% !important; direction: ltr !important; } .wid-auto { width:auto !important; } .table-w-full-mobile { width: 100%; } .mobile-center { text-align: center; } .mobile-center > table { display: inline-block; vertical-align: inherit; } .mobile-left { text-align: left; } .mobile-left > table { display: inline-block; vertical-align: inherit; } .mobile-right { text-align: right; } .mobile-right > table { display: inline-block; vertical-align: inherit; } } </style></head> <body width="100%" style="background-color:#f0f0f0;margin:0;padding:0!important;mso-line-height-rule:exactly;"> <div style="background-color:#f0f0f0"> <!--[if gte mso 9]> <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t"> <v:fill type="tile" color="#f0f0f0"/></v:background> <![endif]--> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td valign="top" align="center"><table bgcolor="#ffffff" style="margin:0 auto;" align="center" id="brick_container" cellspacing="0" cellpadding="0" border="0" width="600" class="email-container"><tr> <td width="600"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td width="600" style="background-color:#ffffff; " bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="600"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td width="552" style="height:88px; background-color:#ffffff; padding-left:24px; padding-right:24px;" bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td height="8" style="height:8px; min-height:8px; line-height:8px;"></td></tr> <tr><td ><table cellspacing="0" cellpadding="0" border="0"><tr><td width="120" ><img src="https://plugin.markaimg.com/public/43a815fe/bPMY4vgBZFROX7CsM8YKvooE7Gafev.png" width="120" border="0" style="min-width:120px; width:120px; height: auto; display: block;"></td></tr></table></td></tr> <tr><td height="8" style="height:8px; min-height:8px; line-height:8px;"></td></tr></table></td></tr></table></td></tr><tr> <td width="600"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td width="552" style="background-color:#ffffff; padding-left:24px; padding-right:24px;" bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr> <tr> <td width="100%" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td ><div style="line-height:36px;text-align:left;"><span style="color:#101828;font-weight:600;font-family:Inter,Arial,sans-serif;font-size:28px;line-height:36px;text-align:left;">New response is submitted.</span></div></td></tr><tr><td height="8" style="height:8px; min-height:8px; line-height:8px;"></td></tr><tr><td ><div style="line-height:24px;text-align:left;"><span style="color:#667085;font-family:Inter,Arial,sans-serif;font-size:15px;line-height:24px;text-align:left;">A new response was submitted to your project โ€œ${FORM_TITLE}โ€.</span></div></td></tr></table></td></tr> <tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr></table></td></tr></table></td></tr><tr> <td width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="100%" style="background-color:#ffffff; padding-left:24px; padding-right:24px;" bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr> <tr> <td width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="552" align="center" style="background-color:#ffffff; " bgcolor="#ffffff" > <table class="table-w-full-mobile" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" width="49%" class="stack-column-center"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td align="right" style="background-color:#ffffff; " bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="24" align="right"><img src="https://plugin.markaimg.com/public/43a815fe/daIuervM7Qtcl2wyGNMCY87fXUdxzA.png" width="24" border="0" style="min-width:24px; width:24px; height: auto; display: block;"></td><td style="width:8px; min-width:8px;" width="8"></td> <td > <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td align="center" style="background-color:#ffffff; " bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td align="center"><div style="line-height:20px;text-align:left;"><span style="color:#363a57;font-weight:700;font-family:Arial,Arial,sans-serif;font-size:15px;line-height:20px;text-align:left;">Project </span></div></td></tr><tr><td height="4" style="height:4px; min-height:4px; line-height:4px;"></td></tr><tr><td align="center"><div style="line-height:24px;text-align:left;"><span style="color:#101828;font-family:Inter,Arial,sans-serif;font-size:15px;line-height:24px;text-align:left;">${FORM_TITLE}</span></div></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td><td class="stack-column-center" height="16" style="width:16px; min-width:16px; height:16px; min-height:16px;" width="16"></td> <td align="center" width="49%" class="stack-column-center"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td align="right" style="background-color:#ffffff; " bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="24" align="right"><img src="https://plugin.markaimg.com/public/43a815fe/o9Gf4q7jZW8ve9moQojP9v0h91Amrv.png" width="24" border="0" style="min-width:24px; width:24px; height: auto; display: block;"></td><td style="width:8px; min-width:8px;" width="8"></td> <td > <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td align="center" style="background-color:#ffffff; " bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td align="center"><div style="line-height:20px;text-align:left;"><span style="color:#363a57;font-weight:700;font-family:Arial,Arial,sans-serif;font-size:15px;line-height:20px;text-align:left;">Recent timestamp</span></div></td></tr><tr><td height="4" style="height:4px; min-height:4px; line-height:4px;"></td></tr><tr><td align="center"><div style="line-height:20px;text-align:left;"><span style="color:#363a57;font-family:Arial,Arial,sans-serif;font-size:15px;line-height:20px;text-align:left;">${formattedDate}</span></div></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr>`
 
 
 
 
  formAnswers.forEach(function(field, index) {
    var question = field.label;
    var answer = getAnswerString(field);
    const reponseSection = `<tr><td width="100%" align="center" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td height="16" style="height:16px; min-height:16px; line-height:16px;"></td></tr> <tr> <td > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td ><div style="line-height:28px;text-align:left;"><span style="color:#101828;font-weight:600;font-family:Inter,Arial,sans-serif;font-size:20px;line-height:28px;text-align:left;">${question}</span></div></td></tr></table></td></tr></table></td></tr> <tr><td height="16" style="height:16px; min-height:16px; line-height:16px;"></td></tr></table></td></tr><tr> <td width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="100%" style="background-color:#f4f5f6; border-radius:8px; padding-left:12px; padding-right:12px;" bgcolor="#f4f5f6" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td height="16" style="height:16px; min-height:16px; line-height:16px;"></td></tr> <tr> <td width="100%" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td ><div style="line-height:24px;text-align:left;"><span style="color:#667085;font-family:Inter,Arial,sans-serif;font-size:15px;line-height:24px;text-align:left;">${answer}</span></div></td></tr></table></td></tr></table></td></tr> <tr><td height="16" style="height:16px; min-height:16px; line-height:16px;"></td></tr></table></td></tr></table></td></tr></table></td></tr>`
    // Adding to email body
    emailBody += reponseSection
  });
 
  emailBody +=`<tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr></table></td></tr></table></td></tr><tr> <td width="600"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td width="552" align="center" style="vertical-align: middle; background-color:#ffffff; padding-left:24px; padding-right:24px;" bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr> <tr> <td style="vertical-align: middle;" width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="100%" align="center" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="560" align="center" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td align="center"><div style="line-height:24px;text-align:center;"><span style="color:#667085;font-family:Inter,Arial,sans-serif;font-size:15px;line-height:24px;text-align:center;">Check out the most recent response!</span></div></td></tr></table></td></tr></table></td></tr><tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr><tr><td align="center"><table cellspacing="0" cellpadding="0" border="0"><tr><td align="center"> <div> <!--[if mso]> <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://app.walla.my" style="height:50px;v-text-anchor:middle;width:160px;" fillcolor="#000000" stroke="f" arcsize="16%"> <w:anchorlock/> <center style="white-space:nowrap;display:inline-block;text-align:center;color:#ffffff;font-weight:600;font-family:Inter,Arial,sans-serif;font-size:18px;">Take me</center></v:roundrect> <![endif]--> <a href="https://app.walla.my" style="white-space:nowrap;background-color:#000000;border-radius:8px; display:inline-block;text-align:center;color:#ffffff;font-weight:600;font-family:Inter,Arial,sans-serif;font-size:18px;line-height:50px;width:160px; -webkit-text-size-adjust:none;mso-hide:all;">Take me</a></div></td></tr></table></td></tr></table></td></tr></table></td></tr> <tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr></table></td></tr></table></td></tr><tr> <td width="600"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td width="552" align="center" style="vertical-align: middle; background-color:#ffffff; padding-left:24px; padding-right:24px;" bgcolor="#ffffff" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr> <tr> <td style="vertical-align: middle;" width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="552" align="center" style="vertical-align: bottom; " > <table class="table-w-full-mobile" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="vertical-align: bottom;" align="center" width="48%" class="stack-column-center"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td style="height:120px; " > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td ><table cellspacing="0" cellpadding="0" border="0"><tr><td width="120" ><img src="https://plugin.markaimg.com/public/43a815fe/eoRbQJjbNomN1QrfzlYBQ63bLAqadg.png" width="120" border="0" style="min-width:120px; width:120px; height: auto; display: block;"></td></tr></table></td></tr><tr><td height="12" style="height:12px; min-height:12px; line-height:12px;"></td></tr><tr> <td width="100%" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td ><div style="line-height:24px;text-align:left;"><span style="color:#101828;font-weight:600;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:24px;text-align:left;">Walla Form</span></div></td></tr><tr><td height="4" style="height:4px; min-height:4px; line-height:4px;"></td></tr><tr><td ><div style="line-height:24px;text-align:left;"><span style="color:#667085;font-family:Inter,Arial,sans-serif;font-size:15px;line-height:24px;text-align:left;">Form your insights.</span></div></td></tr></table></td></tr></table></td></tr></table></td><td class="stack-column-center" height="16" style="width:24px; min-width:24px; height:16px; min-height:16px;" width="24"></td> <td style="vertical-align: bottom;" align="center" width="48%" class="stack-column-center"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100%" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td ><div style="line-height:24px;text-align:left;"><span style="color:#667085;font-family:Inter,Arial,sans-serif;font-size:15px;line-height:24px;text-align:left;">Seoul, Mapodae-ro 122</span></div></td></tr><tr><td height="4" style="height:4px; min-height:4px; line-height:4px;"></td></tr><tr><td ><div style="line-height:24px;text-align:left;"><span style="color:#667085;font-family:Inter,Arial,sans-serif;font-size:15px;line-height:24px;text-align:left;"><a style="color:#667085;text-decoration:none;" href="mailto:cs@walla.my" target="_blank">cs@walla.my</a></span></div></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr> <tr><td height="24" style="height:24px; min-height:24px; line-height:24px;"></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></div></body></html>`
 
  // Send the email
  var recipientEmail = "------@------.---"; // Replace with the actual recipient's email
  var subject = `<${FORM_TITLE}> ------------`;
   var advancedOptions = {
    htmlBody: emailBody,
    charset: "UTF-8"
  };
  GmailApp.sendEmail(recipientEmail, subject, "", advancedOptions);
 
  return ContentService.createTextOutput(JSON.stringify({result: "success"})).setMimeType(ContentService.MimeType.JSON);
}
 
 
// Helper function to format the date
function formatDate(date) {
  return Utilities.formatDate(date, "Asia/Seoul", "yyyy-MM-dd HH:mm:ss");
}
 
 
// Helper function to format the answer based on its type
function getAnswerString(field) {
  switch (field.type) {
    case 'CHECKBOX':
    case 'RADIO':
      return Array.isArray(field.response) ? field.response.join(', ') : field.response;
    case 'CHECKBOX_GRID':
    case 'RADIO_GRID':
      return field.response.map(el => el.lineResponse.join(', ')).join('; ');
    case 'GEOLOCATION':
      return Object.entries(field.response || {}).map(([key, value]) => `${key}: ${value}`).join(', ');
    case 'HIDDEN':
      return field.response || '';
    default:
      return Array.isArray(field.response) ? field.response.join(', ') : field.response;
  }
}

3. '์ƒˆ ๋ฐฐํฌ'๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

4. ์œ ํ˜•์€ '์›น ์•ฑ', ์•ก์„ธ์Šค ๊ถŒํ•œ์ด ์žˆ๋Š” ์‚ฌ์šฉ์ž๋Š” '๋ชจ๋“  ์‚ฌ์šฉ์ž'๋กœ ์„ค์ •ํ•ด์ฃผ์„ธ์š”.

Untitled

5. ์•ก์„ธ์Šค๋ฅผ ์Šน์ธํ•ด์ฃผ์„ธ์š”.

Untitled

6. ๋ฐœ์‹ ์ธ์ด ๋  ๋ฉ”์ผ ์ฃผ์†Œ๋ฅผ ์„ ํƒํ•ด ์ฃผ์„ธ์š”.

Untitled

7. 'URL'์„ ๋ณต์‚ฌํ•ด์ฃผ์„ธ์š”.

Untitled

8. ์™ˆ๋ผ์˜ '์—ฐ๋™ํ•˜๊ธฐ' ํƒญ์—์„œ '์›นํ›… ๊ด€๋ฆฌ' ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

9. URL์„ ๋ถ™์—ฌ๋„ฃ๊ณ  ์›นํ›…์„ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.

Untitled

10. ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ €์žฅํ•œ ํ›„, '์›นํ›… ์„ค์ •'์—์„œ ํ™œ์„ฑํ™” ํ•ด์ฃผ์„ธ์š”.

Untitled

11. ์‘๋‹ต์ด ๋„์ฐฉํ•˜๋ฉด ์ด๋ฉ”์ผ๋กœ ์•Œ๋ฆผ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์–ด์š”.

Untitled

๊ตฌ๊ธ€์‹œํŠธ ์—ฐ๋™ํ•˜๊ธฐ

1. ๊ตฌ๊ธ€์‹œํŠธ์˜ 'ํ™•์žฅ ํ”„๋กœ๊ทธ๋žจ' ํƒญ์—์„œ 'App Script'๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

2. ์ƒˆ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.

Untitled

3. ๊ธฐ๋ณธ ๋‚ด์šฉ์„ ๋ชจ๋‘ ์ง€์šด ํ›„, ์•„๋ž˜์˜ ์ฝ”๋“œ๋ฅผ ๋ถ™์—ฌ๋„ฃ์–ด์ฃผ์„ธ์š”.

function doPost(e) {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheets()[0];
  ss.setSpreadsheetTimeZone('Asia/Seoul');
  // Parsing the POST data to get the required data
  var data = JSON.parse(e.postData.contents);
 
  var formAnswers = data.form_answers;
  var submittedAt = new Date(data.form_response.submitted_at);
 
  var responseId = data.form_response.response_id.slice(0,10);
  // First row: labels
  if (sheet.getLastRow() === 0) {
    var fieldLabels = formAnswers.map(function(answer) {
      if (answer.type === 'RADIO_GRID' || answer.type === 'CHECKBOX_GRID') {
        return answer.response.map(el => `${answer.label} - ${el.lineLabel}`);
      }
      return answer.label
    }).flat();
    var headers = ['Response ID', 'Time Submitted', ...fieldLabels]
    sheet.appendRow(headers);
  }
   var rowData = formAnswers.map(field => {
      switch (field.type) {
        case 'CHECKBOX':
        case 'RADIO': {
          var isResponseArray = Array.isArray(field.response);
          if (isResponseArray) {
            return field.response.filter(el => Boolean(el)).join(', ');
          }
          return field.response || '';
        }
        case 'CHECKBOX_GRID':
        case 'RADIO_GRID': {
          var isLineResponseArray = Array.isArray(field.response.lineResponse)
          return field.response.map(el => {
            if (isLineResponseArray) {
              return el.lineResponse.filter(el => Boolean(el)).join(', ');
            }
            return el.lineResponse || '';
          })
        }
        case 'GEOLOCATION': {
          var response = field.response || {};
          var responseArray = Object.entries(response).map(el => `${el[0]}: ${el[1]}`);
          return responseArray.join(', ');
        }
        case 'HIDDEN': {
          return field.response === undefined || field.response === null
            ? ''
            : field.response;
        }
        default: {
          var response =
            field.response === undefined || field.response === null ? '' : field.response;
          if (Array.isArray(response)) {
            return response.join(', ');
          }
          return response;
        }
      }
    }).flat();
  sheet.appendRow([responseId, submittedAt, ...rowData]);
  return ContentService.createTextOutput(JSON.stringify({result: "success"})).setMimeType(ContentService.MimeType.JSON);
}

4. '์ƒˆ ๋ฐฐํฌ'๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

5. ์œ ํ˜•์€ '์›น ์•ฑ', ์•ก์„ธ์Šค ๊ถŒํ•œ์ด ์žˆ๋Š” ์‚ฌ์šฉ์ž๋Š” '๋ชจ๋“  ์‚ฌ์šฉ์ž'๋กœ ์„ค์ •ํ•ด์ฃผ์„ธ์š”.

Untitled

6. ์•ก์„ธ์Šค๋ฅผ ์Šน์ธํ•ด์ฃผ์„ธ์š”.

Untitled

7. 'URL'์„ ๋ณต์‚ฌํ•ด์ฃผ์„ธ์š”.

Untitled

8. ์™ˆ๋ผ์˜ '์—ฐ๋™ํ•˜๊ธฐ' ํƒญ์—์„œ '์›นํ›… ๊ด€๋ฆฌ' ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”.

Untitled

9. URL์„ ๋ถ™์—ฌ๋„ฃ๊ณ  ์›นํ›…์„ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.

Untitled

10. ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ €์žฅํ•œ ํ›„, '์›นํ›… ์„ค์ •'์—์„œ ํ™œ์„ฑํ™” ํ•ด์ฃผ์„ธ์š”.

Untitled

11. ์‘๋‹ต์ด ๋„์ฐฉํ•˜๋ฉด ๊ตฌ๊ธ€์‹œํŠธ์— ์‘๋‹ต ๋‚ด์šฉ์ด ๊ธฐ๋ก๋ผ์š”.

Untitled

๐Ÿ””

์™ˆ๋ผ์˜ ๊ฐœ๋ฐœ ๊ณ„ํš์„ ํ™•์ธํ•˜๊ฑฐ๋‚˜ ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์ œ์•ˆํ•˜๊ณ  ์‹ถ์œผ์‹ ๊ฐ€์š”? ์ œํ’ˆ ๋กœ๋“œ๋งต ๋ฐ ๊ธฐ๋Šฅ ์ œ์•ˆ ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ด์š”!