Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yehara/767692 to your computer and use it in GitHub Desktop.
Save yehara/767692 to your computer and use it in GitHub Desktop.
Google Spreadsheet のフォーム入力を Questetra BPM Suite に連携する Apps script
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