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
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:
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:
- Add the DAM App block to your canvas.
- Open the block configuration and set the Title to
Upload images from CSV
. - Leave the other settings as their defaults.
Parse CSV Asset
The Parse CSV Asset block reads and parses your CSV file containing the image URLs, public IDs, and folder paths.
Steps:
- Add the Parse CSV Asset block to your canvas.
- Connect the output of the DAM App block to its input.
- 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
-
Use the asset from:
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:
- Add the Iterate List block to your canvas.
- Connect the output of the Parse CSV Asset block to its input.
- Open the block configuration and set the following:
-
List to iterate: Click the
+
icon to insert the variableRows
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
-
-
List to iterate: Click the
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:
- Add the Upload Media block to your canvas.
- Connect the output of the Iterate List block to its input.
-
Open the block configuration and set the following:
-
Media URL: Click the
+
icon to insert the variableItem 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
andasset_folder
parameters of theUpload
call:
-
Media URL: Click the
asset_folder
with folder
in the JSON.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