Image & Video APIs

How to perform an unsigned image upload from Google Apps Script to Cloudinary

Last updated: Jan-20-2026

On this page:

Google Apps Script does not have native support for the FormData object used in JavaScript for handling file uploads. However, you can still upload images to Cloudinary by using a simple JSON object instead.

This article will guide you through the process of uploading images to Cloudinary using Google Apps Script with the UrlFetchApp service.

Prerequisite parameters:

  • file:

    • This can be a publicly accessible URL or a base64-encoded string representing an image.
    • Google Apps Script does not support direct file uploads from Google Drive, so you need to retrieve the file's public URL beforehand.
  • upload_preset:

    • An Upload Preset is required if you are using unsigned uploads (i.e., without authentication).
    • You can create one in the Cloudinary Console.
  • options object:

    • method: 'post' → Specifies that this is a POST request.
    • payload: formData → Sends the form data as JSON in the request body.
  • Cloudinary API Endpoint:

    • Replace with your Cloudinary cloud name.
    • The API URL follows this format: https://api.cloudinary.com/v1_1/<cloud_name>/image/upload/

Here is the example code:

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars