Ask AI
Skip to main content

Get media files

Function: Get media files

This action allows you to retrieve specific files from your platform's media library. You provide the unique identifiers for the files you need, and the action will make them available for further use in your application, such as displaying them, attaching them to emails, or processing them in other workflows.

Input,

  • Media IDs: A list of unique identifiers (text values) for the media files you want to retrieve from the media library. This input is required.

Output,

  • Result: The name of the variable where the retrieved files will be stored. By default, this variable is named MEDIA_FILE. The output will be a list of files.

Execution Flow,

Real-Life Examples,

Example 1: Displaying Product Images on a Website

Imagine you have an e-commerce application and you want to display specific product images on a product detail page.

  • Inputs:
    • Media IDs: ["product_image_001", "product_image_002", "product_image_003"]
  • Result: The action retrieves the three specified product images from your media library and stores them in a variable named MEDIA_FILE. You can then use this MEDIA_FILE variable to display these images on your product page.

Example 2: Attaching Documents to an Automated Email

Suppose you have a workflow that sends an automated email to a customer, and you need to attach a specific contract and an invoice document.

  • Inputs:
    • Media IDs: ["contract_agreement_v2", "invoice_2023_08_15"]
  • Result: The action fetches the "contract_agreement_v2" and "invoice_2023_08_15" files. These files are then available in the MEDIA_FILE variable, ready to be attached to the outgoing email.

Example 3: Processing User-Uploaded Profile Pictures

Consider a scenario where users upload multiple profile pictures, and an administrator needs to review them before they go live.

  • Inputs:
    • Media IDs: ["user_profile_pic_john_v1", "user_profile_pic_john_v2"]
  • Result: The action retrieves both profile pictures uploaded by the user. These files are stored in the MEDIA_FILE variable, allowing the administrator to view and process them within the application.