{"id":67305,"date":"2018-09-03T16:27:03","date_gmt":"2018-09-03T07:27:03","guid":{"rendered":"https:\/\/support.questetra.com\/?p=67305"},"modified":"2022-05-24T15:50:48","modified_gmt":"2022-05-24T06:50:48","slug":"googlesheets-appendtsv","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/addons\/googlesheets-appendtsv\/","title":{"rendered":"New Record to Google Sheets (TSV)"},"content":{"rendered":"<div class=\"su-note\"  style=\"border-color:#e5dab2;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF4CC;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n<h3><i class=\"fal fa-exclamation-circle\"><\/i> PAGE UPDATED<\/h3>\n<div style=\"text-align: center;\"><i class=\"fal fa-truck fa-lg\"><\/i> <a href=\"https:\/\/support.questetra.com\/en\/addons\/google-sheets-sheet-append-tsv\/\">https:\/\/support.questetra.com\/en\/addons\/google-sheets-sheet-append-tsv\/<\/a><\/div>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"68\" data-attachment-id=\"89186\" data-permalink=\"https:\/\/support.questetra.com\/en\/maintenance\/maintenance-20251117\/attachment\/professional-banner-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/professional-banner-en.png?fit=1200%2C68&amp;ssl=1\" data-orig-size=\"1200,68\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"professional-banner-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/professional-banner-en.png?fit=1024%2C58&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/professional-banner-en.png?resize=1200%2C68&#038;ssl=1\" alt=\"\" class=\"wp-image-89186\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/professional-banner-en.png?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/professional-banner-en.png?resize=600%2C34&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/professional-banner-en.png?resize=1024%2C58&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/06\/professional-banner-en.png?resize=768%2C44&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#003e04;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#267137;color:#ffffff;border-top-left-radius:0px;border-top-right-radius:0px\">New Record to Google Sheets (TSV)<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">Adds the TSV data in String type data item to the end of a Google Spreadsheets and stores its communication log in the data item. If there exists no sheet, adds one automatically.\n<br><span style=\"float: right;\">2018 (C) Questetra, Inc. (MIT License)<\/span><\/div><\/div>\n\n\n\n<div class=\"su-spoiler su-spoiler-style-modern-light su-spoiler-icon-plus-square-1\" data-anchor=\"configs\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Configs<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\"><ul class=\"fa-ul\">\n<li> A: Select TSV STRING DATA * <span style=\"color:#990000;\"> *<\/span><\/li>\n<li> B: Set THROW COL IDs (e.g. &#8220;0,1,5d,3n,6&#8221;) *<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"> <sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/li>\n<li> C: Set OAuth2 Config Name (at [OAuth 2.0 Setting]) * <span style=\"color:#000099;\"> <sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/li>\n<li> D: Select STRING\/SELECT for Spreadsheet ID (Non-existent Error) * \n<span style=\"color:#000099;\"><\/span><\/li>\n<li> E: Select STRING\/SELECT for Sheet Name (Non-existent Create) * <\/li>\n<\/ul><\/div><\/div>\n\n\n<div class=\"su-spoiler su-spoiler-style-modern-light su-spoiler-icon-plus-square-1 su-spoiler-closed\" data-anchor=\"script\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Script<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\/\/ OAuth2 config sample\n\/\/\/\/ at Workflow App &gt; Detail &gt; OAuth2 Setting &gt; (Get Refresh Token)\n\/\/ - Authorization Endpoint URL: https:\/\/accounts.google.com\/o\/oauth2\/auth?access_type=offline&amp;approval_prompt=force\n\/\/ - Token Endpoint URL: https:\/\/accounts.google.com\/o\/oauth2\/token\n\/\/ - Scope: https:\/\/www.googleapis.com\/auth\/spreadsheets\n\/\/ - Consumer Key: (Get from Google Developers Console)\n\/\/ - Consumer Secret: (Get from Google Developers Console)\n\/\/ Ref.\n\/\/ - https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets\/get\n\/\/ - https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets\/request\n\n\n\/\/\/\/\/\/\/\/ START \"main()\" \/\/\/\/\/\/\/\/\nmain();\nfunction main(){ \n\n\n\/\/\/\/ == Config Retrieving \/ \u5de5\u7a0b\u30b3\u30f3\u30d5\u30a3\u30b0\u306e\u53c2\u7167 ==\nconst dataIdA = configs.get( \"conf_DataIdA\" ) + \"\";\nconst dataIdD = configs.get( \"conf_DataIdD\" ) + \"\";\nconst dataIdE = configs.get( \"conf_DataIdE\" ) + \"\";\n\nconst colIds  = configs.get( \"conf_ColIds\"  ) + \"\";\nconst oauth2  = configs.get( \"conf_OAuth2\"  ) + \"\";\n\/\/ convert 'java.lang.String' to javascript primitive 'string'\n\n\n\/\/\/\/ == Data Retrieving \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u306e\u53c2\u7167 ==\nlet myTsv   = engine.findDataByNumber( dataIdA );\n  if( myTsv === null){ throw new Error( \"TSV no data\" ); }else{ myTsv += \"\";}\nlet docId   = \"\";\n  if( engine.findDataDefinitionByNumber( dataIdD ).matchDataType( \"SELECT_SINGLE\" ) ){\n    docId = engine.findDataByNumber( dataIdD ).get(0).getValue() + \"\";\n  }else{\n    docId = engine.findDataByNumber( dataIdD ) + \"\";\n  }\nlet sheetName = \"\";\n  if( engine.findDataDefinitionByNumber( dataIdE ).matchDataType( \"SELECT_SINGLE\" ) ){\n    sheetName = engine.findDataByNumber( dataIdE ).get(0).getValue() + \"\";\n  }else{\n    sheetName = engine.findDataByNumber( dataIdE ) + \"\";\n  }\n\n\n\/\/\/\/ == Calculating \/ \u6f14\u7b97 ==\n\/\/ obtain OAuth2 Access Token\nconst token  = httpClient.getOAuth2Token( oauth2 );\n\n\/\/\/ (1) Sheet Exist Check\n\/\/ prepare API Request\nlet apiRequest = httpClient.begin(); \/\/ HttpRequestWrapper\n\/\/ - com.questetra.bpms.core.event.scripttask.HttpClientWrapper\napiRequest     = apiRequest.bearer( token );\napiRequest     = apiRequest.queryParam( \"includeGridData\", false );\n\/\/ - To retrieve only the specific fields of the spreadsheet\n\/\/ - Ref: https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets\/get\n\n\/\/ access API (with post(), get(), put(), etc.)\nconst response    = apiRequest.get( \"https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/\" + docId );\n\/\/ - HttpResponseWrapper\nconst httpStatus  = response.getStatusCode() + \"\";\nconst responseStr = response.getResponseAsString() + \"\";\nconst responseObj = JSON.parse( responseStr );\nengine.log( \"GET &#091;spreadsheet specific]: \" + httpStatus );\nif( httpStatus !== \"200\" ){\n  let errorMessage = \"\\n- HTTP STATUS is not 200, Service Task stopped. -\\n\";\n  errorMessage += responseStr + \"\\n\";\n  throw new Error( errorMessage );\n}\n\n\/\/ get Sheet ID\nlet sheetId = -1; \/\/ NotExist\nengine.log( \"SPREADSHEET TITLE: \" + responseObj.properties.title );\nfor( let i = 0; i &lt; responseObj.sheets.length; i++ ){\n  if( responseObj.sheets&#091;i].properties.title === sheetName ){\n    sheetId = parseInt( responseObj.sheets&#091;i].properties.sheetId, 10 );\n    engine.log( \" SHEET NAME: \" + sheetName + \" exists, id=\" + sheetId );\n    break;\n  }else{\n    engine.log( \" SHEET NAME: \" + sheetName + \" does not exist\" );\n  }\n}\n\n\/\/\/ (2) Create New Sheet (if NotExist)\nif(sheetId === -1){\n  \/\/ prepare API Request2\n  \/\/ - define Request2 Object for spreadsheets.batchUpdate request\n  sheetId = processInstance.getProcessInstanceId() - 0;\n  let requestObj2 = {};\n      requestObj2.requests = &#091;];\n      requestObj2.requests&#091;0] = {};\n      requestObj2.requests&#091;0].addSheet = {};\n      requestObj2.requests&#091;0].addSheet.properties = {};\n      requestObj2.requests&#091;0].addSheet.properties.sheetId = sheetId;\n      requestObj2.requests&#091;0].addSheet.properties.title = sheetName;\n      \/\/ - Ref: https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets\/request#addsheetrequest\n  let apiRequest2 = httpClient.begin(); \/\/ HttpRequestWrapper\n  apiRequest2     = apiRequest2.bearer( token );\n  apiRequest2     = apiRequest2.body( JSON.stringify( requestObj2 ), \"application\/json\" );\n\n  \/\/ access API (with post())\n  const response2    = apiRequest2.post( \"https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/\" + docId + \":batchUpdate\" );\n  const httpStatus2  = response2.getStatusCode() + \"\";\n  const responseStr2 = response2.getResponseAsString() + \"\";\n  engine.log( \"POST &#091;AddSheet request]: \" + httpStatus2 );\n  if( httpStatus2 !== \"200\" ){\n    let errorMessage2 = \"\\n- HTTP STATUS is not 200, Service Task stopped. -\\n\";\n    errorMessage2 += responseStr2 + \"\\n\";\n    throw new Error( errorMessage2 );\n  }\n}\n\n\/\/\/ (3) Append Records\n\/\/ prepare API Request3\nconst arrColIds = colIds.split(\",\");\nconst arrMyTsv  = myTsv.split(\"\\n\");\nlet requestObj3 = {};\n    requestObj3.requests = &#091;]; \/\/ Array\n    requestObj3.requests&#091;0] = {};\n    requestObj3.requests&#091;0].appendCells = {};\n    requestObj3.requests&#091;0].appendCells.rows = &#091;]; \/\/ Array\n    requestObj3.requests&#091;0].appendCells.sheetId = sheetId;\n    requestObj3.requests&#091;0].appendCells.fields = \"*\";\nfor( let i = 0; i &lt; arrMyTsv.length; i++ ){\n  requestObj3.requests&#091;0].appendCells.rows&#091;i] = {};\n  requestObj3.requests&#091;0].appendCells.rows&#091;i].values = &#091;];\n  let arrMyCellValues = arrMyTsv&#091;i].split(\"\\t\");\n  for( let j = 0; j &lt; arrColIds.length; j++ ){\n    requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j] = {};\n    if( arrColIds&#091;j].slice(-1) === \"n\" ){ \/\/ Numeric Type\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredValue = {};\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredValue.numberValue = arrMyCellValues&#091;parseInt( arrColIds&#091;j] )];\n    }else if( arrColIds&#091;j].slice(-1) === \"d\" ){ \/\/ Date Type\n      let dateMyCellDate = new Date( arrMyCellValues&#091;parseInt( arrColIds&#091;j] )] );\n      let serialNumber = dateMyCellDate.getTime() \/ 86400000 + 25569;\n      \/\/ - https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/DateTimeRenderOption#ENUM_VALUES.SERIAL_NUMBER\n      \/\/ 25569 means 1970-01-01 00:00:00, 86400 means the number of seconds per day\n\n      serialNumber += engine.getTimeZoneOffsetInMinutes() \/ (60 * 24); \/\/ Depends on Your Drive Setting\n\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredFormat = {};\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredFormat.numberFormat = {};\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredFormat.numberFormat.type = \"DATE\";\n\/\/      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredFormat.numberFormat.type = \"DATE_TIME\";\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredValue = {};\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredValue.numberValue = serialNumber;\n    }else{\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredValue = {};\n      requestObj3.requests&#091;0].appendCells.rows&#091;i].values&#091;j].userEnteredValue.stringValue = arrMyCellValues&#091;parseInt( arrColIds&#091;j] )];\n    }\n  }\n}\/\/ - Ref: https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets\/request#appendcellsrequest\nlet apiRequest3 = httpClient.begin(); \/\/ HttpRequestWrapper\napiRequest3     = apiRequest3.bearer( token );\napiRequest3     = apiRequest3.body( JSON.stringify( requestObj3 ), \"application\/json\" );\n\n\/\/ access API (with post())\nconst response3    = apiRequest3.post( \"https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/\" + docId + \":batchUpdate\" );\nconst httpStatus3  = response3.getStatusCode() + \"\";\nconst responseStr3 = response3.getResponseAsString() + \"\";\nengine.log( \"POST &#091;AppendCells request]: \" + httpStatus3 );\nif( httpStatus3 !== \"200\" ){\n  let errorMessage3 = \"\\n- HTTP STATUS is not 200, Service Task stopped. -\\n\";\n  errorMessage3 += responseStr3 + \"\\n\";\n  throw new Error( errorMessage3 );\n}\n\n\n\/\/\/\/ == Data Updating \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u3078\u306e\u4ee3\u5165 ==\n\/\/ (nothing)\n\n\n} \/\/\/\/\/\/\/\/ END \"main()\" \/\/\/\/\/\/\/\/<\/code><\/pre>\n\n\n<\/div><\/div>\n\n\n<div class=\"su-divider su-divider-style-dashed\" style=\"margin:30px 0;border-width:8px;border-color:#009900\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-cloud-download-alt\"><\/i> Download<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/questetra.github.io\/addon\/service-task\/GoogleSheets-appendTsv.xml\" target=\"_blank\" rel=\"noopener noreferrer\">google-drive-file-copy.xml<\/a><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-images\"><\/i> Capture<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"84005\" data-permalink=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/onedrive-file-upload\/attachment\/setting-service-task-pdf-generation-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/setting-service-task-pdf-generation-en.png?fit=959%2C833&amp;ssl=1\" data-orig-size=\"959,833\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"setting-service-task-pdf-generation-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/setting-service-task-pdf-generation-en.png?fit=725%2C630&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/gsheets-new-record.png?ssl=1\" alt=\"\" class=\"wp-image-84005\" style=\"border:10px solid #aaaaaa; padding:5px; margin:5px;\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-lightbulb-exclamation\"><\/i> Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u201c0,1,5d, 3n, 6\u201d means that appending ID: 0 as a String, ID: 1 as a String, ID: 5 as Date-time, ID: 3 as a number, ID: 6 as a String.<\/li><li>The File ID can be obtained from the URL<ul><li><a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/SPREADSHEETID\/edit#gid=0\" rel=\"nofollow\">https:\/\/docs.google.com\/spreadsheets\/d\/SPREADSHEETID\/edit#gid=0<\/a><\/li><\/ul><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-balance-scale\"><\/i> See also<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>2016-11-07 <a href=\"http:\/\/en.workflow-sample.net\/2016\/11\/append-customer-master.html\">Episode 508: Officialize Corporate Names in \u201cCustomer Master\u201d by Corporate Number API<\/a><\/li><li>2016-09-20 <a href=\"http:\/\/en.workflow-sample.net\/2016\/09\/planning-approval.html\">Episode 501:You Don\u2019t Know the Spending of Budget?<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Download google-drive-file-copy.xml Capture Notes \u201c0,1,5d, 3n, 6\u201d means that appending ID: 0 as a String, ID: 1 as a String, ID: 5 as Date-time, ID: 3 as a number, ID: 6 as a String. The File ID can be obtained from the URL <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/SPREADSHEETID\/edit#gid=0\" rel=\"nofollow\">https:\/\/docs.google.com\/spreadsheets\/d\/SPREADSHEETID\/edit#gid=0<\/a> See also 2016-11-07 Episode 508: Officialize Corporate Names in \u201cCustomer Master\u201d [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":90391,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[168],"tags":[],"class_list":["post-67305","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-addons"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?fit=1200%2C675&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?fit=1200%2C675&ssl=1",1200,675,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?fit=560%2C315&ssl=1",560,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?fit=768%2C432&ssl=1",768,432,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?fit=1024%2C576&ssl=1",1024,576,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?fit=1200%2C675&ssl=1",1200,675,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?fit=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=900%2C675&ssl=1",900,675,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=600%2C675&ssl=1",600,675,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=800%2C675&ssl=1",800,675,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/09\/google-sheets-row-addition-header.png?fit=1200%2C675&ssl=1",1200,675,true]},"uagb_author_info":{"display_name":"Hirotaka NISHI","author_link":"https:\/\/support.questetra.com\/en\/author\/nishiquestetra\/"},"uagb_comment_info":0,"uagb_excerpt":"Download google-drive-file-copy.xml Capture Notes \u201c0,1,5d, 3n, 6\u201d means that appending ID: 0 as a String, ID: 1 as a String, ID: 5 as Date-time, ID: 3 as a number, ID: 6 as a String. The File ID can be obtained from the URL https:\/\/docs.google.com\/spreadsheets\/d\/SPREADSHEETID\/edit#gid=0 See also 2016-11-07 Episode 508: Officialize Corporate Names in \u201cCustomer Master\u201d&hellip;","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-hvz","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":77746,"url":"https:\/\/support.questetra.com\/en\/templates\/expense-record-flow-20161121\/","url_meta":{"origin":67305,"position":0},"title":"Expense Record Flow","author":"Hirotaka NISHI","date":"2021-03-01","format":false,"excerpt":"Reports and records expenses after approval\/correction. The Process for all employees is automatically started at the beginning of every month. The employee holds the [1. Report] Task until the closing date and inputs the expenses and payments on behalf of during that term. At the [3. Confirmation\/Adjustment] Step, the accounting\u2026","rel":"","context":"In &quot;Workflow Apps&quot;","block_context":{"text":"Workflow Apps","link":"https:\/\/support.questetra.com\/en\/category\/templates\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-expense-record-flow-20161121-220-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-expense-record-flow-20161121-220-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-expense-record-flow-20161121-220-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-expense-record-flow-20161121-220-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-expense-record-flow-20161121-220-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":77695,"url":"https:\/\/support.questetra.com\/en\/templates\/approval-flow-budget-control-20160920\/","url_meta":{"origin":67305,"position":1},"title":"Approval Flow-Budget Control","author":"Hirotaka NISHI","date":"2022-01-17","format":false,"excerpt":"A Proposal-approval flow that automatically records the approved spending in a Google Sheet. When a new Issue is entered at the [1. Submit plan draft] Step, the \u201cBudget Consumption Log\u201d (Google sheet) is referred to, and the total expenditure so far is calculated automatically. At the Step of [2. Decision],\u2026","rel":"","context":"In &quot;Workflow Apps&quot;","block_context":{"text":"Workflow Apps","link":"https:\/\/support.questetra.com\/en\/category\/templates\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-approval-flow-budget-control-20160920-220-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-approval-flow-budget-control-20160920-220-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-approval-flow-budget-control-20160920-220-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-approval-flow-budget-control-20160920-220-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/07\/eye-catch-approval-flow-budget-control-20160920-220-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":71055,"url":"https:\/\/support.questetra.com\/en\/addons\/googlesheets-getvaluesastsv\/","url_meta":{"origin":67305,"position":2},"title":"Get Google Sheets Values as TSV","author":"Hirotaka NISHI","date":"2018-08-19","format":false,"excerpt":"Convert values on Google Sheets into TSV","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/googlesheets-get-value-as-tsv-header.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/googlesheets-get-value-as-tsv-header.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/googlesheets-get-value-as-tsv-header.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/googlesheets-get-value-as-tsv-header.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/googlesheets-get-value-as-tsv-header.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":97139,"url":"https:\/\/support.questetra.com\/en\/addons\/google-sheets-sheet-row-update-with-singleline-tsv\/","url_meta":{"origin":67305,"position":3},"title":"Google Sheets: Sheet Row, Update with Singleline TSV","author":"IMAMURA, Genichi","date":"2020-10-28","format":false,"excerpt":"Updates a Google Sheet with a single line of TSV data. Searches for an A-Column cell that exactly matches the first value of the TSV and overwrite only the first occurrence. The values will be parsed as if they were entered manually by the user. If no matching line exists,\u2026","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Google Sheets: Sheet Row, Update with Singleline TSV","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":81186,"url":"https:\/\/support.questetra.com\/en\/addons\/google-sheets-values-export-as-tsv\/","url_meta":{"origin":67305,"position":4},"title":"Google Sheets: Values, Export as TSV","author":"IMAMURA, Genichi","date":"2021-02-01","format":false,"excerpt":"Exports the values in the rectangular range as TSV text, which has the same number of tab delimiters on each line. Empty cells are regarded as the null string. Two range export are also supported: e.g. Freezed headings and recent data.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/Google-Sheets-Values-Export-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/Google-Sheets-Values-Export-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/Google-Sheets-Values-Export-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/Google-Sheets-Values-Export-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/Google-Sheets-Values-Export-as-TSV-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":96354,"url":"https:\/\/support.questetra.com\/en\/addons\/google-sheets-sheet-append-tsv\/","url_meta":{"origin":67305,"position":5},"title":"Google Sheets: Sheet, Append TSV","author":"IMAMURA, Genichi","date":"2020-10-14","format":false,"excerpt":"Adds the TSV dataset after the last row. New rows will be inserted into the sheet if necessary. Only the specified columns of TSV are added, column ID with an identifier \"d\" as Datetime, and column ID with an identifier \"n\" as Numeric; eg \"0,2d,5n\".","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Google Sheets: Sheet, Append TSV","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Append-TSV-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Append-TSV-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Append-TSV-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Append-TSV-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Append-TSV-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/67305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=67305"}],"version-history":[{"count":22,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/67305\/revisions"}],"predecessor-version":[{"id":122308,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/67305\/revisions\/122308"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/90391"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=67305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=67305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=67305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}