Google Drive

Automatically store rendered files in your Google Drive folders

Updated

The Orshot Google Drive integration allows you to automatically save generated files directly to your Google Drive account. When enabled, every render (images, PDFs, videos) via the API can be stored in a specified Google Drive folder, making it easy to organize, share, and access your generated content.

Connecting Google Drive#

  1. In Orshot, open Integrations from the workspace sidebar
  2. Find Google Drive and click Connect
  3. Authorize Orshot to access your Google Drive account
  4. Click the gear icon on the Google Drive card and pick a folder under Save renders to

Video Tutorial#

Using Google Drive in API Requests#

While Automatic saving is on in the Google Drive settings, every render is uploaded to Google Drive. You do not need to add connections to your API request.

To control the upload, add the connections parameter to your render request.

JSON
{
  "templateId": 25,
  "modifications": {
    "headline": "Hello World"
  },
  "response": {
    "type": "url",
    "format": "png"
  },
  "connections": [
    {
      "type": "storage",
      "provider": "google-drive"
    }
  ]
}

Custom File Names#

Use response.fileName to set a custom name for the uploaded file. Orshot keeps letters, numbers, - and _ (up to 50 characters) and adds a short random suffix so files never overwrite each other, for example marketing-banner-001-Ab12C.png. Without a name, files are called orshot-<templateId>-<date>-<suffix>.<ext>.

JSON
{
  "templateId": 25,
  "modifications": { "headline": "Hello" },
  "response": {
    "type": "url",
    "format": "png",
    "fileName": "marketing-banner-001"
  },
  "connections": [
    {
      "type": "storage",
      "provider": "google-drive"
    }
  ]
}

API Response Examples#

Successful Upload#

JSON
{
  "data": {
    "content": "https://storage.orshot.com/cloud/w-50/renders/images/abc123.png",
    "type": "url",
    "format": "png",
    "responseTime": 1234.56
  },
  "connections": [
    {
      "type": "storage",
      "provider": "google-drive",
      "path": "Orshot Renders",
      "status": "success"
    }
  ]
}

Multi-Page Upload#

When rendering multi-page templates, each page is uploaded separately:

JSON
{
  "data": [
    {
      "page": 1,
      "pageId": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
      "content": "https://storage.orshot.com/cloud/w-50/renders/images/abc123.png"
    },
    {
      "page": 2,
      "pageId": "b2c3d4e5-6f78-9012-bcde-f23456789012",
      "content": "https://storage.orshot.com/cloud/w-50/renders/images/def456.png"
    }
  ],
  "format": "png",
  "type": "url",
  "responseTime": 3166.01,
  "totalPages": 2,
  "renderedPages": 2,
  "connections": [
    {
      "type": "storage",
      "provider": "google-drive",
      "path": [
        { "page": 1, "path": "Orshot Renders" },
        { "page": 2, "path": "Orshot Renders" }
      ],
      "status": "success"
    }
  ]
}

Upload Failed (with Warning)#

Connection issues return warnings but don't block the render:

JSON
{
  "data": {
    "content": "https://storage.orshot.com/cloud/w-50/renders/images/abc123.png",
    "type": "url",
    "format": "png",
    "responseTime": 1234.56
  },
  "warnings": [
    {
      "title": "Failed to upload to google-drive: Token expired",
      "details": ""
    }
  ],
  "connections": [
    {
      "type": "storage",
      "provider": "google-drive",
      "path": null,
      "status": "error",
      "error": "Token expired"
    }
  ]
}

Google Drive Not Connected#

JSON
{
  "data": {
    "content": "https://storage.orshot.com/cloud/w-50/renders/images/abc123.png",
    "type": "url",
    "format": "png",
    "responseTime": 1234.56
  },
  "warnings": [
    {
      "title": "Failed to upload to google-drive: Google Drive is not connected. Connect it in workspace settings.",
      "details": ""
    }
  ],
  "connections": [
    {
      "type": "storage",
      "provider": "google-drive",
      "path": null,
      "status": "error",
      "error": "Google Drive is not connected. Connect it in workspace settings."
    }
  ]
}

Connection Parameters#

ParameterTypeRequiredDescription
typestringNoOptional. Defaults to "storage"
providerstringYesMust be "google-drive"
folderstringNoDrive folder ID. Uses the folder from settings if not given
disabledbooleanNoSet to true to skip this entry

Notes#

  • Non-blocking: Google Drive upload failures won't block your render. You'll still get the image URL
  • Automatic refresh: Access tokens are automatically refreshed when they expire
  • Folder selection: Pick your target folder in the Google Drive settings on the Integrations page
  • Supported formats: PNG, JPG, JPEG, WebP, AVIF, PDF, MP4, WebM, MOV, MKV, GIF

Need Help?#

  • Contact support at hi@orshot.com or use the chat button in your Orshot dashboard
Was this page helpful?

Ready to automate?

Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.

Get your API key
  • Image, PDF and video generation via API
  • Visual editor with AI and smart layouts
  • Zapier, Make, MCP and 40+ integrations
  • White-label embed for your own app
  • 100 free credits a month, no credit card required