Note that there are some explanatory texts on larger screens.

plurals
  1. POcreate archive of google docs
    primarykey
    data
    text
    <p>I am running the following code. It says </p> <blockquote> <p>unexpected error in <strong>UrlFetchApp.fetch()</strong></p> </blockquote> <pre><code>function archive(){ var oauthConfig = UrlFetchApp.addOAuthService("docs"); oauthConfig.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken"); oauthConfig.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope=https://docs.google.com/feeds/"); oauthConfig.setAuthorizationUrl("https://www.google.com/accounts/OAuthAuthorizeToken"); oauthConfig.setConsumerKey(consumerkey); oauthConfig.setConsumerSecret(consumerSecret); var requestData = { "method": "POST", "headers": { "GData-Version": "3.0" }, "oAuthServiceName": "docs", "payload":getPayload(), "oAuthUseToken": "always" }; var url='https://docs.google.com/feeds/default/private/archive' var result = UrlFetchApp.fetch(url, requestData); } function getPayload() { var xml='&lt;?xml version="1.0" encoding="UTF-8"?&gt;'+ '&lt;atom:entry xmlns="http://www.w3.org/2005/Atom" xmlns:docs="http://schemas.google.com/docs/2007"&gt;'+ '&lt;docs:archiveConversion source="application/vnd.google-apps.document" target="application/msword"/&gt;'+ '&lt;docs:archiveConversion source="application/vnd.google-apps.spreadsheet" target="text/csv"/&gt;'+ '&lt;docs:archiveConversion source="application/pdf" target="application/pdf"/&gt;'+ &lt;/atom:entry&gt;'; Logger.log(xml) return xml; } If you have another way to do this, please let me know asap. Thank you in advance!! </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload