2015年2月27日 星期五

Google’s form notification for Add-on version is ready. (新版的Google表單信件通知外掛)

中文:
感謝網友的不斷提醒,敝人最近才發現我之前寫的Google 表單寄信scirpt已經失效了。由於Google把所有script改成 Add-On,逼得小弟不得不寫另一個Add-On出來。所有的source code都在https://github.com/allen501pc/Advanced-Form-Notificaiton
用法很簡單,把上面所有除了README.md的檔案下載下來。按照以下步驟:
1. 建立表單,輸入你要的欄位
2. 進入 工具指令編輯器
3. 工具列上方的新增→檔案→專案→對象為Form(表單),將專案命名為:Advanced Form Notification
4. 在你的程式碼.gs,刪除裡面內容,貼上下載下來的Main.gs的內容
5. 新增檔案→HTML檔案→名稱:About (不要有.html),貼上下載的About.html的內容。
6. 如上步驟依序新增AuthorizationEmail.html, CreatorNotification.html, RespondentNotification.html 以及 Slidebar.html等檔案,並貼上相對應檔的內容。
7. 儲存專案
8. 到原表單編輯器中,點選外掛程式→Advanced Form Notification→Configure…
9. 假設你有表單欄位如下:
欄位 1: name
欄位 2: email


今天若想要通知使用者如下內容(假設使用者填寫的email跟name分別是abc@example.com, Allen)
Thanks for filling our questionnaire survey. Your content shows below: 
Your e-mail: abc@example.com
Your name: Allen


那麼只要在右方把Notify respondents打勾,然後在Notification email body寫著如下:
Thanks for filling our questionnaire survey. Your content shows below: 
Your e-mail: __##email##__
Your name: __##name##__



指定好要收件人的email欄位跟信件標題就可以自動寄信囉。

In English:

Google has combined its’ script editor with Google Add-On. The past post I wrote is not available. I’ve created a new project named “Advanced Form Notification” on GitHub ( Project’s URL: https://github.com/allen501pc/Advanced-Form-Notificaiton ).

After downing all of the source codes except README.md of the project. All of you just do the following steps:

1. Create Google form and type any fields you want, including at least one e-mail field.

2. Navigate the toolbar and click script editor

3. Create a new project whose target is “Form”  and entitle it as “Advanced Form Notification “.

4. Remove the content of your current code and paste the content of downloaded Main.gs

5. Go to filenew→HTML file and click it,  adding a new HTML file named “About” (attention, don’t append .html extension file name) and then paste the content of downloaded “About.html”.

6. Similar to the above step 5, add AuthorizationEmail.html, CreatorNotification.html, RespondentNotification.html and Slidebar.html with correspondent file content.

7. Save the project.

8. In the form editor, go to Advanced Form NotificationConfigure….

9. Assume that you have a form like this:

field 1's name: name
field 2's name: email

and you want to customize your notification content for each respondent's email like this ( in this case, the respondent's e-mail is abc@example.com and his name is Allen:
Thanks for filling our questionnaire survey. Your content shows below: 
Your e-mail: abc@example.com
Your name: Allen


The easy way for you is just adding Notification email body of Notify respondents below:
Thanks for filling our questionnaire survey. Your content shows below: 
Your e-mail: __##email##__
Your name: __##name##__

Then indicate the respondent email field and email title. Your form emailer will be worked. Enjoy it!

8 則留言:

  1. Allen 大您好:

    感謝你的分享,但我有一事請教。

    在回信的內容要指定欄位部分,我不論填入中文、英文都不會成功顯示耶?

    都只會出現 __##name##__ 或者 __##姓名##__

    還請指教,謝謝。

    回覆刪除
  2. 感謝 Allen 的分享,自動回信的功能做成功了。
    但在做的過程中,發現 Slidebar.html 的檔案名稱,需改成 Sidebar.html 才不會有錯,供板大參考。
    再次感謝!

    回覆刪除
  3. 請問這個在試算表是不是不能用?謝謝!

    回覆刪除
  4. 請問這個在試算表是不是不能用?謝謝!

    回覆刪除
  5. 是的,在試算表不能用,要另外寫。

    回覆刪除
  6. 你好Allen
    如果想在郵件內容加入算式, 例:

    __##數量##__ X 260

    要怎樣改??

    回覆刪除
  7. 感謝 Allen 的分享

    請問可以直接回郵使用者填寫內容的PDF檔嗎? 或是直接回郵填寫內容當作是給使用者的備份文件0.0??

    回覆刪除
  8. (新手上路)
    其實我看不太懂(哭哭

    回覆刪除