More Products

Upload images from a CSV file

Last updated: Sep-04-2025

When you need to upload multiple images with specific public IDs and organize them into folders based on data from external sources, manually uploading each image and setting its properties can be time-consuming and error-prone.

This sample PowerFlow automatically uploads images from URLs listed in a CSV file, assigns custom public IDs, and organizes them into folders based on the CSV data. This is particularly useful for bulk importing product catalogs, migrating assets from other platforms, or organizing large image collections with consistent naming conventions.

Learn more about uploading assets.

Overview

CSV Upload PowerFlow

The PowerFlow uses the following blocks:

  • DAM App: Allows you to trigger the flow from selected CSV files in the Media Library.
  • Parse CSV Asset: Reads and parses the CSV file containing image URLs, public IDs, and folder paths.
  • Iterate List: Iterates through each row in the CSV file and exposes fields for the Upload Media block configuration.
  • Upload Media: Uploads each image to Cloudinary with the specified public ID and folder.

CSV File Format

This flow works with a CSV file that includes the following three columns:

  • url: The URL of the image to upload
  • public_id: The desired public ID for the image
  • folder: The folder path where the image should be stored

Example CSV format:

Example CSV format

Download this example CSV file

DAM App

The DAM App block lets you trigger the flow from selected CSV files in your Media Library.

Steps:

  1. Add the DAM App block to your canvas.
  2. Open the block configuration and set the Title to Upload images from CSV.
  3. Leave the other settings as their defaults.

DAM App configuration

Parse CSV Asset

The Parse CSV Asset block reads and parses your CSV file containing the image URLs, public IDs, and folder paths.

Steps:

  1. Add the Parse CSV Asset block to your canvas.
  2. Connect the output of the DAM App block to its input.
  3. Open the block configuration and check the following settings:
    • Use the asset from: DAM App - this is the only available option
    • CSV delimiter: , - the default delimiter character is a comma
    • Skip empty lines: Yes - ignores empty rows in the CSV
    • Trim values (cells): No - preserves whitespace in cell values

Parse CSV Asset configuration

Iterate List

The Iterate List block iterates through each row in the parsed CSV data, processing one image at a time and exposing the specific fields needed for the upload.

Steps:

  1. Add the Iterate List block to your canvas.
  2. Connect the output of the Parse CSV Asset block to its input.
  3. Open the block configuration and set the following:
    • List to iterate: Click the + icon to insert the variable Rows from the Parse CSV Asset block.
    • Fields to expose: Add the three fields from your CSV:
      • url - the image URL to upload
      • public_id - the custom public ID for the image
      • folder - the folder path for organization

Iterate List configuration

Upload Media

The Upload Media block uploads each image from the URL specified in the CSV to your Cloudinary product environment with the specified public ID and folder.

Steps:

  1. Add the Upload Media block to your canvas.
  2. Connect the output of the Iterate List block to its input.
  3. Open the block configuration and set the following:

    • Media URL: Click the + icon to insert the variable Item url from the Iterate List block. This references the URL from the current CSV row.
    • Resource type: Set to Auto to automatically detect the media type
    • Incoming transformation (optional): Leave empty or add any desired transformations
    • Upload parameters (optional): Add the following JSON to set the public_id and asset_folder parameters of the Upload call:

Note
If your Cloudinary product environment is using the legacy fixed folder mode, replace asset_folder with folder in the JSON.

Upload Media configuration

Execute the flow

Save the flow and test it to check that it works before enabling it. Once enabled, you can try it out by selecting a CSV file of the correct format in your Media Library and running the Upload images from CSV automation.

After executing the flow, you can verify that:

  • All images have been uploaded to your Media Library
  • Images are organized in the correct folders as specified in the CSV
  • Each image has the custom public ID assigned from the CSV

Uploaded images in the Media Library

✔️ Feedback sent!

Rate this page: