{"id":79451,"date":"2019-09-18T15:06:15","date_gmt":"2019-09-18T06:06:15","guid":{"rendered":"https:\/\/support.questetra.com\/?p=79451"},"modified":"2022-06-07T15:03:47","modified_gmt":"2022-06-07T06:03:47","slug":"google-drive-gfile-export-as-microsoft-office","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/addons\/google-drive-gfile-export-as-microsoft-office\/","title":{"rendered":"Google Drive: GFile; Export as Microsoft-Office"},"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-drive-gfile-export-as-microsoft-office-2021\/\">https:\/\/support.questetra.com\/en\/addons\/google-drive-gfile-export-as-microsoft-office-2021\/<\/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<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\">Google Drive: GFile; Export as Microsoft-Office<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n\n\n\n<p class=\"wp-block-paragraph\">Exports the specified file in the Drive to the Workflow Data Item in Microsoft format: docx, xlsx, or pptx. If a file other than a Google file (Docs \/ Sheets \/ Slides etc.) is specified, an error will occur. File ID can be obtained from URI.<\/p>\n\n\n<\/div><\/div>\n\n\n\n<p class=\"has-text-align-right wp-block-paragraph\">2019-09-18 (C) Questetra, Inc. (MIT License)<br>\n<a href=\"https:\/\/support.questetra.com\/en\/addons\/google-drive-gfile-export-as-microsoft-office\/\">https:\/\/support.questetra.com\/en\/addons\/google-drive-gfile-export-as-microsoft-office\/<\/a><\/p>\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\">\n\n\n\n<ul class=\"fa-ul\">\n<li>A: Select OAuth2 Config Name (at [OAuth 2.0 Setting])<span style=\"color:#990000;\"> *<\/span><\/li>\n<li> B: Set FILE-ID to Download<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"> <sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/li>\n<li> C: Select FILES DATA for Exported File (added)<span style=\"color:#990000;\"> *<\/span><\/li>\n<li> D: Set FILE NAME if you want to save as a different name<span style=\"color:#000099;\"> <sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/li>\n<li> E: Select STRING DATA for File Name in Drive (update)<\/li>\n<\/ul>\n\n\n<\/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 (click to open)<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\n\/\/ (c) 2019, Questetra, Inc. (the MIT License)\n\n\/\/\/\/ == OAuth2 Setting example ==\n\/\/ Authorization Endpoint URL:\n\/\/  &quot;https:\/\/accounts.google.com\/o\/oauth2\/auth?access_type=offline&approval_prompt=force&quot;\n\/\/ Token Endpoint URL:\n\/\/  &quot;https:\/\/accounts.google.com\/o\/oauth2\/token&quot;\n\/\/ Scope:\n\/\/  &quot;https:\/\/www.googleapis.com\/auth\/drive.readonly&quot;\n\/\/ Client ID:\n\/\/  ( from https:\/\/console.developers.google.com\/ )\n\/\/ Consumer Secret:\n\/\/  ( from https:\/\/console.developers.google.com\/ )\n\/\/  *Redirect URLs: &quot;https:\/\/s.questetra.net\/oauth2callback&quot;\n\n\n\/\/\/\/\/\/\/\/ START &quot;main()&quot; \/\/\/\/\/\/\/\/\nmain();\nfunction main(){ \n\n\/\/\/\/ == Config Retrieving \/ \u5de5\u7a0b\u30b3\u30f3\u30d5\u30a3\u30b0\u306e\u53c2\u7167 ==\nconst oauth2  = configs.get( &quot;conf_OAuth2&quot;  ) + &quot;&quot;;\nconst fileId  = configs.get( &quot;conf_FileId&quot;) + &quot;&quot;;\nconst dataIdC = configs.get( &quot;conf_DataIdC&quot; ) + &quot;&quot;;\nlet   saveAs  = configs.get( &quot;conf_SaveAs&quot;) + &quot;&quot;;\nconst dataIdE = configs.get( &quot;conf_DataIdE&quot; ) + &quot;&quot;;\n\/\/ &#39;java.lang.String&#39; (String Obj) to javascript primitive &#39;string&#39;\nengine.log( &quot; AutomatedTask Config: File ID: &quot; + fileId );\nif( fileId === &quot;&quot; ){\n  throw new Error( &quot;\\n AutomatedTask ConfigError:&quot; + \n                   &quot; String {B} (File ID) is required \\n&quot; );\n}\nengine.log( &quot; AutomatedTask Config: Save As: &quot; + saveAs );\n\n\n\/\/\/\/ == Data Retrieving \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u306e\u53c2\u7167 ==\nvar tmpFiles = engine.findDataByNumber( dataIdC ); \/\/ java.util.ArrayList\nif( tmpFiles === null ) {\n  engine.log( &quot; AutomatedTask FilesArray {C} (empty)&quot; );\n  tmpFiles = new java.util.ArrayList();\n}else{\n  engine.log( &quot; AutomatedTask FilesArray {C}: &quot; + \n              tmpFiles.size() + &quot; files&quot; );\n}\n\n\n\/\/\/\/ == Calculating \/ \u6f14\u7b97 ==\n\/\/\/ obtain OAuth2 Access Token\nconst token   = httpClient.getOAuth2Token( oauth2 );\n\n\/\/\/ get File Name (Metadata)\nlet apiRequest = httpClient.begin(); \/\/ HttpRequestWrapper\napiRequest = apiRequest.bearer( token );\napiRequest = apiRequest.queryParam( &quot;supportsAllDrives&quot;, &quot;true&quot; );\n\/\/ This parameter will only be effective until June 1, 2020.\n\/\/ see https:\/\/developers.google.com\/drive\/api\/v3\/reference\/files\/get\nconst apiUri = &quot;https:\/\/www.googleapis.com\/drive\/v3\/files\/&quot; + fileId;\nengine.log( &quot; AutomatedTask Trying: GET &quot; + apiUri );\nconst response = apiRequest.get( apiUri );\nconst responseCode = response.getStatusCode() + &quot;&quot;;\nengine.log( &quot; AutomatedTask ApiResponse: Status &quot; + responseCode );\nif( responseCode !== &quot;200&quot;){\n  throw new Error( &quot;\\n AutomatedTask UnexpectedResponseError: &quot; +\n         responseCode + &quot;\\n&quot; + response.getResponseAsString() + &quot;\\n&quot; );\n}\nconst responseStr = response.getResponseAsString() + &quot;&quot;;\nconst responseObj = JSON.parse( responseStr );\nengine.log( &quot; AutomatedTask ApiResponse: File Name: &quot; + responseObj.name );\nengine.log( &quot; AutomatedTask ApiResponse: File MIME Type: &quot; + responseObj.mimeType );\nif( saveAs === &quot;&quot; ){\n  saveAs = responseObj.name + &quot;.unknow&quot;;\n  if( responseObj.mimeType === &quot;application\/vnd.google-apps.document&quot; ){\n    saveAs = responseObj.name + &quot;.docx&quot;;\n  }else if( responseObj.mimeType === &quot;application\/vnd.google-apps.spreadsheet&quot; ){\n    saveAs = responseObj.name + &quot;.xlsx&quot;;\n  }else if( responseObj.mimeType === &quot;application\/vnd.google-apps.presentation&quot; ){\n    saveAs = responseObj.name + &quot;.pptx&quot;;\n  }\n}\n\n\/\/\/ get Microsoft File\nlet apiRequest2 = httpClient.begin(); \/\/ HttpRequestWrapper\napiRequest2 = apiRequest2.bearer( token );\nif( responseObj.mimeType === &quot;application\/vnd.google-apps.document&quot; ){\n  apiRequest2 = apiRequest2.queryParam( &quot;mimeType&quot;,\n                &quot;application\/vnd.openxmlformats-officedocument.wordprocessingml.document&quot; );\n}else if( responseObj.mimeType === &quot;application\/vnd.google-apps.spreadsheet&quot; ){\n  apiRequest2 = apiRequest2.queryParam( &quot;mimeType&quot;,\n                &quot;application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet&quot; );\n}else if( responseObj.mimeType === &quot;application\/vnd.google-apps.presentation&quot; ){\n  apiRequest2 = apiRequest2.queryParam( &quot;mimeType&quot;,\n                &quot;application\/vnd.openxmlformats-officedocument.presentationml.presentation&quot; );\n}\nconst apiUri2 = &quot;https:\/\/www.googleapis.com\/drive\/v3\/files\/&quot; + \n                 fileId + &quot;\/export&quot;;\nengine.log( &quot; AutomatedTask Trying: GET &quot; + apiUri2 );\nconst response2 = apiRequest2.get( apiUri2 );\nconst responseCode2 = response2.getStatusCode() + &quot;&quot;;\nengine.log( &quot; AutomatedTask ApiResponse: Status &quot; + responseCode2 );\nif( responseCode2 !== &quot;200&quot;){\n  throw new Error( &quot;\\n AutomatedTask UnexpectedResponseError: &quot; +\n         responseCode2 + &quot;\\n&quot; + response2.getResponseAsString() + &quot;\\n&quot; );\n}\nconst qfile = new com.questetra.bpms.core.event.scripttask.NewQfile(\n    saveAs, response2.getContentType(), response2.getResponse()\n  );\ntmpFiles.add( qfile );\n\n\n\/\/\/\/ == Data Updating \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u3078\u306e\u4ee3\u5165 ==\nengine.setDataByNumber( dataIdC, tmpFiles );\nif( dataIdE !== &quot;&quot; ){\n  engine.setDataByNumber( dataIdE, responseObj.name );\n}\n\n} \/\/\/\/\/\/\/\/ END &quot;main()&quot; \/\/\/\/\/\/\/\/\n\n<\/code><\/pre><\/div>\n\n\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright\"><img decoding=\"async\" src=\"data:image;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEB0lEQVRYR8VXXWgcVRT+zszuzM6Y\ntgltUFRagxTaiDS1IKKUjX1IFyrWUi0iVJOHvgjSFAVnEbX+4KaIZIv4JGKkhRaC2JSW7uahbqmI\nfSimSCVUsK1oWv\/IxpTM\/s6RO8lmN\/O3s43U+zLL3vPznXO\/c869hP95USv++w4VnyGuxgnUw+B2\n8RX6DJ4gUF58ATmXNdSxsHabAugd5vZYqbCfmQcJ1B7GMIPzRJQuKLHDuQOUD9IJBJBImf1MPBzW\nsdORAMIkD4y\/rp7wA+ELYPvQXJpA+8NE3EyGwemsoR\/wkvMEkEiZIyC81Mxwi\/sjGUMbcOq4APyX\nkXscyeGsoQ82\/r8EgDhzED4PiuzZRyOId8uQHdDLVeD09xWM\/1ANTIxF0q5GTiyaEWxXi+bVIMLF\nN8p4cWsEmkLouMvt58pNhnGsCLPkj0EQs6hqXbXqWASQSJkHQXg7CH7qeQU96yTcyDPWrCBE5aXS\nIguj31Vw5JtKMD0Y72SS2kEhtAhg+9BcnkCr\/DT3PBbBC09EoEaAQhmYNRmdK90cvjnDOHSyhMkp\n9gUhspA19I5FAKLDSWx95adxXwfhjV0KujrrDv+aBXQV0JWlWhYDZy9X8dHpcigu2BabMX\/ftgie\n3hJBRKrbrFjAn\/8w7hEN2eEqPwd8nCnh25+soCzYFWHrJlJmDoS4l\/SmtRJee0rBmhXu3ckpC50r\nJaxuc+9NXLeQPB7IxnOZpNZbA3ANhHVeAJI7o9i6QXZFOVsAPhkv46H7JezYLENypEHwZORcGWMX\nvctSDK6soW+eBzBkejKm72EZ+7ZF0RZzn3Puxyo+PFXG2tWEt3YrEDxxrp\/\/YHxwooTfpr0JmTE0\n8gWgKcB7zyl2hM7lZHpjhTTKCp6cvFjBp2e9y7IOIGW6jqAVo62ArQFk8KWsoff4knB4r4IN97qj\nn5pm3CrA1YRkCVCjwHxO66tqAWcmqhi94MgCo05CrzLcuUVGfzyKWLRuLKgB+dWbOP93vyzhl7+X\n8oDB9TL0a0Tv71HwSJdkV4BQvzE93\/2cLdjPeakCO\/KjHq25NpQCW\/Hj6yW8klDQrsNOuyCV+B12\nXf7VwpujJddwYvBM1tDt613TYfTqjiie7Jbx+8x813PWux+YW0Xgs6\/LyFzy6ANew2hhHF9zDiRR\n5y\/3RfHg3RLa1HCxi+M6P1lFasw9D0T0RVV7wDWOF1py0wtJOAj+Ur4XkppKs8G0LAANqa\/ZuXOX\nUsYXmaTW7wzgjlzL4RF5YAZqmwtPsZGgm1LQkQjCMcn9t\/UwqRm2n2aFwiCT\/TTzvbI1AhGOiSld\niMXSy3qaOaNbyEgvMfUw2Y\/TTUJGDBZiyjPxBJOcC4o4NAeWxfYWlP8FgpLGMJo42BUAAAAASUVO\nRK5CYII=\" alt=\"\"\/><\/figure><\/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:\/\/drive.google.com\/a\/questetra.com\/file\/d\/1AE52dxFcFKuY0UmehjHiCNQE0LcfbxWl\/view?usp=sharing\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Google-Drive-GFile-Export-as-Microsoft-Office.xml (opens in a new tab)\">Google-Drive-GFile-Export-as-Microsoft-Office.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\/2019\/09\/gdrive-export-as-ms.png?ssl=1\" alt=\"\" class=\"wp-image-84005\" style=\"border:10px solid #aaaaaa; padding:5px; margin:5px;\"><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-capture-en.png?ssl=1\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"675\" data-attachment-id=\"79456\" data-permalink=\"https:\/\/support.questetra.com\/en\/addons\/google-drive-gfile-export-as-microsoft-office\/attachment\/google-drive-gfile-export-as-microsoft-office-capture-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-capture-en.png?fit=1200%2C675&amp;ssl=1\" data-orig-size=\"1200,675\" 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=\"Google-Drive-GFile-Export-as-Microsoft-Office-capture-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-capture-en.png?fit=1024%2C576&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-capture-en.png?fit=1024%2C576&amp;ssl=1\" alt=\"\" class=\"wp-image-79456\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-capture-en.png?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-capture-en.png?resize=560%2C315&amp;ssl=1 560w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-capture-en.png?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-capture-en.png?resize=1024%2C576&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-lightbulb-exclamation\"><\/i> Notes<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li> Supports all drives such as My Drive and Shared Drive.<\/li><li>If a file other than a Google file (Docs \/ Sheets \/ Slides etc.) is specified, an error \u201cfileNotExportable\u201d will occur.<\/li><li>fileNotExportable: Export only supports Google Docs.<\/li><li>TimeoutException error may occur in case many pages or images. <\/li><\/ol>\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><a href=\"https:\/\/support.questetra.com\/en\/addons\/google-drive-gfile-export-as-pdf\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Google Drive: GFile; Export as PDF(opens in a new tab)\">Google Drive: GFile; Export as PDF<\/a><\/li><li><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/intermediate-error-catch-event-boundary-type\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Intermediate Error Catch Event (Boundary Type)(opens in a new tab)\">Intermediate Error Catch Event (Boundary Type)<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Exports the specified file in the Drive to the Workflow Data Item in Microsoft format: docx, xlsx, or pptx. If a file other than a Google file (Docs \/ Sheets \/ Slides etc.) is specified, an error will occur. File ID can be obtained from URI.<\/p>\n","protected":false},"author":2,"featured_media":79452,"comment_status":"open","ping_status":"open","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":"{title}\n\n{excerpt}\n\n{url}","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-79451","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\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?fit=1200%2C675&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?fit=1200%2C675&ssl=1",1200,675,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?fit=560%2C315&ssl=1",560,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?fit=768%2C432&ssl=1",768,432,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?fit=1024%2C576&ssl=1",1024,576,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?fit=1200%2C675&ssl=1",1200,675,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?fit=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=900%2C675&ssl=1",900,675,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=600%2C675&ssl=1",600,675,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=800%2C675&ssl=1",800,675,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-en.png?fit=1200%2C675&ssl=1",1200,675,true]},"uagb_author_info":{"display_name":"IMAMURA, Genichi","author_link":"https:\/\/support.questetra.com\/en\/author\/imamuragenichi\/"},"uagb_comment_info":1,"uagb_excerpt":"Exports the specified file in the Drive to the Workflow Data Item in Microsoft format: docx, xlsx, or pptx. If a file other than a Google file (Docs \/ Sheets \/ Slides etc.) is specified, an error will occur. File ID can be obtained from URI.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-kFt","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":79303,"url":"https:\/\/support.questetra.com\/en\/addons\/google-drive-gfile-export-as-pdf\/","url_meta":{"origin":79451,"position":0},"title":"Google Drive: GFile; Export as PDF","author":"IMAMURA, Genichi","date":"2019-09-12","format":false,"excerpt":"Exports the specified file in the Drive to the Workflow Data Item in PDF format. If a file other than a Google file (Docs \/ Sheets \/ Slides etc.) is specified, an error will occur (Please use File Download). File ID can be obtained from URI.","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\/09\/Google-Drive-GFile-Export-as-PDF-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\/09\/Google-Drive-GFile-Export-as-PDF-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-PDF-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-PDF-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-PDF-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":82954,"url":"https:\/\/support.questetra.com\/en\/addons\/google-drive-gfile-export-as-text\/","url_meta":{"origin":79451,"position":1},"title":"Google Drive: GFile, Export as Text","author":"IMAMURA, Genichi","date":"2019-12-25","format":false,"excerpt":"Exports text information from a GFile in Google Drive. If a file other than a Google file (Docs \/ Slides) is specified, an error will occur (Please use File Download). File ID can be obtained from URI.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Google Drive: GFile, Export as Text","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/12\/Google-Drive-GFile-Export-as-Text-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\/12\/Google-Drive-GFile-Export-as-Text-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/12\/Google-Drive-GFile-Export-as-Text-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/12\/Google-Drive-GFile-Export-as-Text-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/12\/Google-Drive-GFile-Export-as-Text-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":82966,"url":"https:\/\/support.questetra.com\/en\/addons\/google-drive-file-convert\/","url_meta":{"origin":79451,"position":2},"title":"Google Drive: File, Convert","author":"IMAMURA, Genichi","date":"2019-12-25","format":false,"excerpt":"Converts file in Google Drive and save as another MimeType file. Supports both Google Doc files and common files. File ID can be obtained from URI etc. (If Folder-ID not specified, the file will inherit any discoverable parents of the source file.)","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"Google Drive: File, Convert","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/12\/Google-Drive-File-Convert-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\/12\/Google-Drive-File-Convert-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/12\/Google-Drive-File-Convert-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/12\/Google-Drive-File-Convert-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/12\/Google-Drive-File-Convert-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":79282,"url":"https:\/\/support.questetra.com\/en\/addons\/google-drive-file-download\/","url_meta":{"origin":79451,"position":3},"title":"Google Drive: File; Download","author":"IMAMURA, Genichi","date":"2019-09-12","format":false,"excerpt":"Downloads the specified file in the Drive to the Workflow Data Item. If a Google File (Docs \/ Sheets \/ Slides, etc.) is specified, an error will occur (Please use File Export). The File ID can be obtained from the sharing settings screen.","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\/09\/Google-Drive-File-Download-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\/09\/Google-Drive-File-Download-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-File-Download-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-File-Download-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-File-Download-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":79460,"url":"https:\/\/support.questetra.com\/ja\/addons\/google-drive-gfile-export-as-microsoft-office\/","url_meta":{"origin":79451,"position":4},"title":"Google \u30c9\u30e9\u30a4\u30d6: G\u30d5\u30a1\u30a4\u30eb; Microsoft-Office \u30a8\u30af\u30b9\u30dd\u30fc\u30c8","author":"IMAMURA, Genichi","date":"2019-09-18","format":false,"excerpt":"Google\u30c9\u30e9\u30a4\u30d6\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092Microsoft Office\u30d5\u30a1\u30a4\u30eb\uff08docx\/xlsx\/pptx\uff09\u3068\u3057\u3066\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3001\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u9805\u76ee\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002Google\u30d5\u30a1\u30a4\u30eb\uff08Docs\/Sheets\/Slides\u306a\u3069\uff09\u4ee5\u5916\u304c\u6307\u5b9a\u3055\u308c\u305f\u5834\u5408\u306f\u30a8\u30e9\u30fc\u3068\u306a\u308a\u307e\u3059\u3002\u306a\u304a\u3001File ID \u306f URI \u7b49\u304b\u3089\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002","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\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-ja.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\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-ja.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-ja.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-ja.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/09\/Google-Drive-GFile-Export-as-Microsoft-Office-ja.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":76390,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-google-drive-file-upload\/","url_meta":{"origin":79451,"position":5},"title":"Google Drive: File Upload","author":"Hirotaka NISHI","date":"2019-04-23","format":false,"excerpt":"Uploads files specified in File Type Data Item to the specified folder of Google Drive. Capable of obtaining the file ID, the display URL, and the download URL as the response and storing them in a String type Data Item.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.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\/79451","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=79451"}],"version-history":[{"count":8,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/79451\/revisions"}],"predecessor-version":[{"id":105630,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/79451\/revisions\/105630"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/79452"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=79451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=79451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=79451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}