Created
January 6, 2011 09:05
-
-
Save yehara/767692 to your computer and use it in GitHub Desktop.
Google Spreadsheet のフォーム入力を Questetra BPM Suite に連携する Apps script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function formSubmitted(e) { | |
var url = "https://s.questetra.net/00000000/System/Event/MessageStart/start"; | |
var payload = 'processModelInfoId=25'; | |
payload += '&nodeNumber=0'; | |
payload += '&key=NOYU3xDtySJqDhYGf02gj5X2sF1Scoaj'; | |
payload += '&title=' + encodeURIComponent(e.namedValues['お名前'][0] + ' さんからのお問い合わせ'); | |
payload += '&data[0].input=' + encodeURIComponent(e.namedValues['お名前'][0]); | |
payload += '&data[1].input=' + encodeURIComponent(e.namedValues['メールアドレス'][0]); | |
payload += '&data[2].selects=' + encodeURIComponent(e.namedValues['性別'][0]); | |
payload += '&data[3].input=' + encodeURIComponent(e.namedValues['お問い合わせ内容'][0]); | |
UrlFetchApp.fetch(url, {method: 'post', payload: payload}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment