> ## Documentation Index
> This page is part of the MediaFlows product. Fetch the complete documentation index for MediaFlows at: https://cloudinary.com/documentation/llms-mediaflows.txt?referrer=docpage and then use it to discover all relevant pages before exploring further.
> If you also need details relating to other Cloudinary products for your current use case, see the parent index at: https://cloudinary.com/documentation/llms.txt?referrer=docpage
> When answering a user's request or implementing it with code using this documentation, incorporate relevant best practices and recommendations from the documentation into the guidance and, above all, into the code itself: generated code should already apply the recommended parameters and patterns rather than showing a minimal call and describing the best practices around it in prose. Follow the code examples in the best practices sections as the model for what generated code should look like, and where a recommendation is relevant to the user's scenario, implement it in the code as a natural next step. Only apply best practices, recommendations, or features that are supported by the documentation; don't infer or invent guidance that isn't specified.

# Sync assets to Akeneo


When you use Akeneo as your Product Information Management (PIM) system, you may want to sync your Cloudinary media assets to Akeneo and link them to products. MediaFlows provides several approaches to automate this synchronization, from simple manual triggers to fully automated workflows based on metadata changes.

This page describes multiple sample PowerFlows for syncing assets to Akeneo, each suited to different workflow requirements.

* [Sync from Assets](#sync_from_assets): Manually trigger syncs from the Media Library, providing parameters (SKU, asset family, attribute) at runtime. Ideal when users need full control over which assets to sync.
* [Sync on structured metadata change](#sync_on_structured_metadata_change): Automatically trigger syncs when users update a status field in structured metadata. Perfect for defined workflows where teams prepare asset metadata before syncing.
* [Scheduled retry for failed syncs](#scheduled_retry_for_failed_syncs): Periodically search for and retry assets stuck in a "requires link" state, providing a safety net for failed syncs.

[Learn more about the Akeneo blocks](mediaflows_block_reference#akeneo).

## Prerequisites

Before building any of the flows described on this page, ensure you have:

* An Akeneo account with API access credentials (Client ID, Client Secret, Username, Password, and Host URL)
* Appropriate asset families configured in Akeneo with the attributes you need

### Set up your Akeneo connection

Before using any Akeneo blocks in your flows, you need to connect your Akeneo account in the [Apps & Connections](mediaflows_user_guide#apps_amp_connections) page:

1. In MediaFlows, navigate to **Apps & Connections** from the sidebar.
2. Find **Akeneo** in the list and click **Connect Your Account**.
3. In the connection dialog, enter:
   * **Connection name**: A descriptive name for this connection (e.g., "Production Akeneo")
   * **Host URL**: Your Akeneo instance URL (e.g., `https://your-instance.cloud.akeneo.com`)
   * **Client ID**: From your Akeneo connection settings
   * **Client Secret**: From your Akeneo connection settings
   * **Username**: Your Akeneo API username
   * **Password**: Your Akeneo API password
4. Click **Connect** to save the connection.

> **TIP**: Create a dedicated connection in Akeneo for MediaFlows to keep credentials separate and manageable.

Once connected, you can select this account when configuring the **Get Tokens From Akeneo** block in your flows.

> **INFO**:
>
> All flows that interact with Akeneo require a **Get Tokens From Akeneo** block at the start. This block authenticates with Akeneo and provides an access token that all subsequent Akeneo blocks use.

## Sync from Assets

The simplest approach lets users manually trigger a sync from the Media Library. Users select an asset, right-click, and run the automation, providing the required Akeneo parameters at that time.

This approach is ideal when:

* Users need full control over which assets to sync
* The sync parameters (asset family, attribute, SKU) vary per asset
* You don't want to pre-configure metadata on assets

### Overview

![Sync to Akeneo from Assets PowerFlow on the canvas, from the On Manual Run From Media Library trigger through Get Tokens From Akeneo, Join Strings, Update Akeneo Metadata, and Create Asset In Akeneo](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1794399854/docs/mediaflows/sync_to_akeneo_from_assets_single_smd_canvas.png "thumb:c_scale,w_260/dpr_2.0, width: 260")

The PowerFlow uses the following blocks:

* [On Manual Run From Media Library](#on_manual_run_from_media_library): Triggers the flow from the Media Library context menu, collecting user input.
* [Get Tokens From Akeneo](#get_tokens_from_akeneo): Authenticates with Akeneo to get an access token.
* [Join Strings](#join_strings): Creates a unique Akeneo asset code by combining the SKU and Cloudinary asset ID.
* [Update Structured Metadata](#update_structured_metadata): Stores the sync parameters (SKU, family, attribute) on the Cloudinary asset for future reference, all in one step.
* [Create Asset In Akeneo](#create_asset_in_akeneo): Creates the asset in Akeneo's Asset Manager.

### Metadata setup

Before building this flow, create the following [structured metadata](dam_admin_structured_metadata) fields in your Cloudinary product environment:

| Field Name | Type | Description |
|------------|------|-------------|
| Akeneo SKU | Text | The product SKU |
| Akeneo Family | Text | The Akeneo asset family |
| Akeneo Attribute | Text | The attribute where the Cloudinary URL will be stored |

![Metadata for Akeneo sync from Assets](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/docs/mediaflows/akeneo_smd.png "thumb: c_scale,w_700/dpr_2.0, width:700")


### On Manual Run From Media Library

The **On Manual Run From Media Library** block creates a context menu option in the Media Library, allowing users to trigger the sync and provide the required parameters.

Steps:

1. Add the **On Manual Run From Media Library** block to your canvas.
1. Open the block configuration and set:
   * **Description**: `Sync to Akeneo`
1. Expand **More Options** and, under **Input parameters**, click **Add new input variable** to add each of the following **Text** variables, selecting **Mandatory field** for each:
   * **SKU**: The product SKU to link the asset to
   * **Asset_Family**: The Akeneo asset family (for example, `atmosphere` or `packshots`)
   * **Asset_Attribute**: The attribute where the Cloudinary URL will be stored (for example, `link_atmosphere`)
  
      Later, the flow will save the values of these parameters as metadata on the asset.

![On Manual Run From Media Library settings with SKU, Asset_Family, and Asset_Attribute input parameters](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793533631/docs/mediaflows/sync_akeneo_trigger_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Get Tokens From Akeneo

The **Get Tokens From Akeneo** block authenticates with Akeneo and provides an access token for subsequent blocks.

Steps:

1. Add the **Get Tokens From Akeneo** block to your canvas and ensure it's connected to the **On Manual Run From Media Library** block.
1. Open the block configuration and select your Akeneo connection:
   * **Akeneo connection**: Click **Connect** and select the Akeneo account you configured in [Apps & Connections](#set_up_your_akeneo_connection).

![Get Tokens From Akeneo settings with an Akeneo connection selected](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793533788/docs/mediaflows/sync_akeneo_get_tokens_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Join Strings

The **Join Strings** block creates a unique Akeneo asset code by combining the SKU and Cloudinary asset ID. This ensures uniqueness even when linking multiple images to the same product, or the same image to multiple products.

> **NOTE**: The asset code may contain only letters, numbers, and underscores.

Steps:

1. Add the **Join Strings** block to your canvas and ensure it's connected to the **Get Tokens From Akeneo** block.
1. Open the block configuration and set:
   * **First string**: Click the **Insert Value** icon to add the **Sku** variable from the **On Manual Run From Media Library** block.
   * **Second string**: Click the **Insert Value** icon, select the **On Manual Run From Media Library** block, then click **Enter a path**, type `asset_id`, and click **Insert**. The field then shows **On Manual Run From Media Library > Asset ID**.
   * **Separator**: Add the separator `__` (double underscore).
    
The resulting asset code format is: `{SKU}__{asset_id}` (for example, `PROD001__abc123def456`).

![Join Strings settings combining the SKU and asset ID with a double underscore separator](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793533790/docs/mediaflows/sync_akeneo_join_strings_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

> **NOTE**: The asset code must be unique in Akeneo. By combining the SKU with the Cloudinary asset ID, you can link multiple images to the same product while ensuring each asset code is unique.

### Update Structured Metadata

Store the sync parameters on the Cloudinary asset using one **Update Structured Metadata** block. This is important for:

* Enabling future searches to find synced assets
* Providing a reference for deletion workflows
* Allowing users to see sync status in the Media Library

> **INFO**: Make sure you've created the structured metadata fields described in [Metadata setup](#metadata_setup) before adding this block.

Steps:

1. Add an **Update Structured Metadata** block to your canvas and ensure it's connected to the **Join Strings** block.
1. Rename the block to `Update Akeneo Metadata` by clicking the title.
1. Set **Use the asset from** to **On Manual Run From Media Library**.
1. In **Metadata fields**, set the first field and its value, then click **Add more** for each additional field:
   * **Akeneo SKU**: Select the **Sku** from **On Manual Run From Media Library**.
   * **Akeneo Family**: Select the **Asset family** from **On Manual Run From Media Library**.
   * **Akeneo Attribute**: Select the **Asset attribute** from **On Manual Run From Media Library**.

![Update Akeneo Metadata settings with On Manual Run From Media Library as the asset and Akeneo SKU, Akeneo Family, and Akeneo Attribute metadata fields set from the trigger values](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1794399814/docs/mediaflows/sync_akeneo_assets_update_smd_fields.png "thumb:c_scale,w_700/dpr_2.0, width: 700")

### Create Asset In Akeneo

The **Create Asset In Akeneo** block creates the asset in Akeneo's Asset Manager and optionally links it to a product.

Steps:

1. Add the **Create Asset In Akeneo** block to your canvas and ensure it's connected to the **Update Akeneo Metadata** block.
1. Open the block configuration and set:
   * **Host URL**: Your Akeneo instance URL.
   * **Access token**: Select the **Access token** from the **Get Tokens From Akeneo** block.
   * **Media URL**: Select the **Secure URL** from the **On Manual Run From Media Library** block.
   * **Asset code**: Select **Entire output** from the **Join Strings** block.
   * **Asset family**: Select the **Asset family** from **On Manual Run From Media Library**.
   * **Asset attribute**: Select the **Asset attribute** from **On Manual Run From Media Library**.

![Create Asset In Akeneo settings after the Update Akeneo Metadata block, with the host URL, access token, media URL, asset code, family, and attribute set](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1794401105/docs/mediaflows/sync_akeneo_create_asset_in_akeneo_after_smd.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

> **TIP**: To automatically link assets to products, configure [Product Link Rules](https://help.akeneo.com/pim/v4/articles/assets-product-link-rules.html) in Akeneo to parse your asset code format and extract the SKU.

## Sync on structured metadata change

For a more automated approach, trigger the sync when users update structured metadata on an asset. This workflow lets users prepare asset metadata in the Media Library and then trigger the sync by changing a status field.

This approach is ideal when:

* You have a defined workflow for asset preparation
* Multiple team members need to tag assets before syncing
* You want to separate metadata preparation from the sync action

### Overview

![Sync to Akeneo on metadata change PowerFlow on the canvas, from the On Structured Metadata Change trigger through to Update Structured Metadata](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793535650/docs/mediaflows/sync_akeneo_smd_new_canvas.png "thumb:c_scale,w_220/dpr_2.0, width: 220")

The PowerFlow uses the following blocks:

* [On Structured Metadata Change](#on_structured_metadata_change): Triggers when the sync status changes to "Requires link".
* [Get Tokens From Akeneo](#get_tokens_from_akeneo-1): Authenticates with Akeneo.
* [Get Structured Metadata](#get_structured_metadata) (x3): Retrieves the metadata values (SKU, family, attribute) needed for the sync.
* [Get Asset Information](#get_asset_information): Retrieves the asset's secure URL needed for syncing to Akeneo.
* [Join Strings](#join_strings-1): Creates the unique Akeneo asset code.
* [Create Asset In Akeneo](#create_asset_in_akeneo-1): Creates the asset in Akeneo.
* [Update Structured Metadata](#update_status_on_completion): Updates the status to "Linked" on success.

### Metadata setup

Before building this flow, create the following [structured metadata](dam_admin_structured_metadata) fields in your Cloudinary product environment:

| Field Name | Type | Values | Description |
|------------|------|--------|-------------|
| Akeneo Status | Single-selection list | `Requires Link`, `Linked`, `Requires Unlink` | Controls the sync action |
| Akeneo Sku | Text | - | The product SKU |
| Akeneo Family | Text | - | The Akeneo asset family |
| Akeneo Attribute | Text | - | The attribute where the Cloudinary URL will be stored |

![Metadata for Akeneo sync from structured metadata](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/docs/mediaflows/sync_akeneo_smd_smd.png "thumb: c_scale,w_700/dpr_2.0, width:700")

### On Structured Metadata Change

The **On Structured Metadata Change** block triggers the flow when the `Akeneo Status` field of an image changes. The flow syncs images only, so the trigger ignores other asset types.

Steps:

1. Add the **On Structured Metadata Change** block to your canvas.
1. Open the block configuration and, under **When to trigger**, clear **Trigger for any structured metadata change**.
1. Under **Trigger whenever the new value for**, select `Akeneo Status`, **is**, and `Requires link`.
1. Clear **Trigger for any asset** and, under **Trigger only when the asset's**, select **Asset type** and **Image**, so that only images trigger the flow.

![On Structured Metadata Change settings triggering when Akeneo Status is Requires link, for images only](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793535652/docs/mediaflows/sync_akeneo_smd_on_structured_metadata_change_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Get Tokens From Akeneo

The **Get Tokens From Akeneo** block authenticates with Akeneo and provides an access token for subsequent blocks.

Steps:

1. Add the **Get Tokens From Akeneo** block to your canvas and ensure it's connected to the **On Structured Metadata Change** block.
1. Open the block configuration and select your Akeneo connection:
   * **Akeneo connection**: Click **Connect** and select the Akeneo account you configured in [Apps & Connections](#set_up_your_akeneo_connection).

![Get Tokens From Akeneo settings with an Akeneo connection selected](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793535653/docs/mediaflows/sync_akeneo_smd_get_tokens_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Get Structured Metadata

Retrieve the metadata values needed for the sync using three **Get Structured Metadata** blocks, since the trigger only provides information about what changed.

Steps:

1. Add a **Get Structured Metadata** block to your canvas and ensure it's connected to the **Get Tokens From Akeneo** block.
1. Rename the block to `Get Akeneo SKU`.
1. Configure the block:
   * **Use the asset from**: Select **On Structured Metadata Change** from the list.
   * **Structured metadata field**: `Akeneo SKU`
1. Add a second **Get Structured Metadata** block and ensure it's connected to the first.
1. Rename the block to `Get Akeneo Family`.
1. Configure the block in the same way, but set:
   * **Structured metadata field**: `Akeneo Family`
1. Add a third **Get Structured Metadata** block and ensure it's connected to the second.
1. Rename the block to `Get Akeneo Attribute`.
1. Configure the block in the same way, but set:
   * **Structured metadata field**: `Akeneo Attribute`

![Get Akeneo SKU settings reading the Akeneo SKU structured metadata field from the triggering asset](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793535655/docs/mediaflows/sync_akeneo_smd_get_smd_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Get Asset Information

The **Get Asset Information** block retrieves asset details including the secure URL, which is needed for the **Create Asset In Akeneo** block. The trigger doesn't provide the secure URL, so this block is required.

Steps:

1. Add a **Get Asset Information** block to your canvas and ensure it's connected to the third **Get Structured Metadata** block.
1. Ensure **Use the asset from** is set to **On Structured Metadata Change**.

![Get Asset Information settings using the asset from On Structured Metadata Change](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793535657/docs/mediaflows/sync_akeneo_smd_get_asset_information_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Join Strings

The **Join Strings** block creates a unique Akeneo asset code by combining the SKU and Cloudinary asset ID.

Steps:

1. Add the **Join Strings** block to your canvas and ensure it's connected to the **Get Asset Information** block.
1. Open the block configuration and set:
   * **First string**: Click the **Insert Value** icon to add **Entire output** from the **Get Akeneo SKU** block.
   * **Second string**: Click the **Insert Value** icon, select the **On Structured Metadata Change** block, then click **Enter a path**, type `resources[0].asset_id`, and click **Insert**. The field then shows **On Structured Metadata Change > Resources > First item > Asset ID**.
   * **Separator**: Add the separator `__` (double underscore).

![Join Strings settings combining the Get Akeneo SKU output and the asset ID of the first resource](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793535658/docs/mediaflows/sync_akeneo_smd_join_strings_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Create Asset In Akeneo

The **Create Asset In Akeneo** block creates the asset in Akeneo's Asset Manager.

Steps:

1. Add the **Create Asset In Akeneo** block to your canvas and ensure it's connected to the **Join Strings** block.
1. Open the block configuration and set:
   * **Host URL**: Your Akeneo instance URL.
   * **Access token**: Select the **Access token** from the **Get Tokens From Akeneo** block.
   * **Media URL**: Select the **Secure URL** from the **Get Asset Information** block.
   * **Asset code**: Select **Entire output** from the **Join Strings** block.
   * **Asset family**: Select **Entire output** from the **Get Akeneo Family** block.
   * **Asset attribute**: Select **Entire output** from the **Get Akeneo Attribute** block.

![Create Asset In Akeneo settings using the Get Asset Information secure URL and the Get Akeneo Family and Attribute outputs](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793535660/docs/mediaflows/sync_akeneo_smd_create_asset_in_akeneo_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Update status on completion

After successfully creating the asset in Akeneo, update the status to indicate completion:

1. Add an **Update Structured Metadata** block after the **Create Asset In Akeneo** block.
1. Set **Use the asset from** to **On Structured Metadata Change**.
1. In **Metadata fields**, select `Akeneo Status` as the **Metadata field** and select `Linked` as the **Value**.

![Update Structured Metadata settings with On Structured Metadata Change as the asset and the Akeneo Status metadata field set to Linked](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1794399262/docs/mediaflows/sync_akeneo_smd_update_smd_fields.png "thumb:c_scale,w_700/dpr_2.0, width: 700")

This status update serves multiple purposes:

* Indicates successful sync to users viewing the asset
* Prevents the flow from re-triggering on the same asset
* Enables searching for synced vs. unsynced assets

### Delete on status change

To handle asset removal, create a separate flow (or branch in the same flow) that triggers when the status changes to `Requires unlink`:

1. Trigger the flow when `Akeneo Status` changes to `Requires unlink`, using an **On Structured Metadata Change** block.
1. Authenticate with Akeneo using a **Get Tokens From Akeneo** block.
1. Retrieve the asset family and asset code from the asset's structured metadata using **Get Structured Metadata** blocks.
1. Delete the asset from Akeneo using a **Delete Asset In Akeneo** block.
1. Clear the linked state using an **Update Structured Metadata** block that sets `Akeneo Status` to an empty value.

> **INFO**: To delete an asset from Akeneo, you need the Asset Family and Asset Code. This is why it's important to store these values in Cloudinary metadata when you create the asset.

## Scheduled retry for failed syncs

Syncs can fail for various reasons: invalid metadata, network issues, or Akeneo being temporarily unavailable. A scheduled retry flow provides a safety net by periodically attempting to sync assets that are stuck in a "requires link" state.

This approach complements the [metadata-triggered](#sync_on_structured_metadata_change) flow by:

* Retrying failed syncs automatically
* Catching any assets that were missed
* Providing a backup mechanism for reliability

### Overview

![Scheduled retry PowerFlow on the canvas, from the On Scheduled Search trigger through to Update Structured Metadata](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542802/docs/mediaflows/sync_akeneo_scheduled_retry_new_canvas.png "thumb:c_scale,w_200/dpr_2.0, width: 200")

The PowerFlow uses the following blocks:

* [On Scheduled Search](#on_scheduled_search): Runs periodically to find assets needing sync.
* [Repeat For Each Asset](#repeat_for_each_asset): Processes each asset found by the search individually.
* [Schedule Email Report](#schedule_email_report): Sends a daily email report summarizing the assets processed by the flow.
* [Get Tokens From Akeneo](#get_tokens_from_akeneo-2): Authenticates with Akeneo.
* [Get Structured Metadata](#get_structured_metadata-1) (x3): Retrieves the sync parameters (SKU, family, and attribute) for each asset.
* [Get Asset Information](#get_asset_information-1): Retrieves the asset's ID and secure URL needed for syncing to Akeneo.
* [Join Strings](#join_strings-2): Creates the unique Akeneo asset code.
* [Create Asset In Akeneo](#create_asset_in_akeneo-2): Attempts to create the asset.
* [Update Structured Metadata](#update_structured_metadata-1): Updates the status to "Linked" on success.

### On Scheduled Search

The **On Scheduled Search** block runs a search query at specified intervals to find assets that need syncing.

Steps:

1. Add the **On Scheduled Search** block to your canvas.
1. Open the block configuration and set:
   * **Recurring schedule**: Set **Repeat** to **Daily** (or more often, as needed). For example, every **1** days at **10**:**00** runs the flow once a day at 10am. You can also turn on **Advanced** to enter an AWS cron expression instead, such as `0 10 * * ? *`.
   * **Assets to search for**: `metadata.akeneo_status="requires_link"`
1. Expand **Advanced Options** and set **Maximum assets to process** to an appropriate limit.

![On Scheduled Search settings running daily at 10:00 and searching for assets with an Akeneo status of requires_link](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542804/docs/mediaflows/sync_akeneo_scheduled_retry_trigger_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")


### Repeat For Each Asset

The **Repeat For Each Asset** block processes each asset found by the search individually, allowing the subsequent blocks to run once per asset.

Steps:

1. Add a **Repeat For Each Asset** block to your canvas and ensure it's connected to the **On Scheduled Search** block.
1. Open the block configuration and set:
   * **Source of asset list**: Click the **Insert Value** icon to add **Resources** from the **On Scheduled Search** block.
   * **Run in parallel**: Turn on to run the flow for all assets simultaneously.

![Repeat For Each Asset settings using the Resources from On Scheduled Search, with Run in parallel turned on](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542806/docs/mediaflows/sync_akeneo_scheduled_retry_repeat_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")


### Schedule Email Report

The **Schedule Email Report** block sends a daily email summary of the assets processed by the flow. The email is sent at the configured time and includes details of all the assets that reach this block in a 24-hour period.

Steps:

1. Add a **Schedule Email Report** block to your canvas and ensure it's connected to the **Repeat For Each Asset** block.
1. Open the block configuration and set:
   * **Use the asset from**: Select **Repeat For Each Asset** from the list.
   * **Recipients**: A comma-separated list of email addresses to receive the report.
   * **Time**: The UTC time that you want MediaFlows to send the email (for example, `10:00`).
   * **Report name**: The subject of the email, for example, `Retries for failed Akeneo syncs from metadata`.
   * **Description**: Text for the body of the email, for example, `These assets were scheduled for retry syncing to Akeneo.`

![Schedule Email Report settings with a recipient, a 10:00 send time, a report name, and a description](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542808/docs/mediaflows/sync_akeneo_scheduled_retry_email_report_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

Here's an example of how the email may look:

![Email Report example](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/docs/mediaflows/mf_retries_email.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Get Tokens From Akeneo

The **Get Tokens From Akeneo** block authenticates with Akeneo and provides an access token for subsequent blocks.

Steps:

1. Add the **Get Tokens From Akeneo** block to your canvas and ensure it's connected to the **Schedule Email Report** block.
1. Open the block configuration and select your Akeneo connection:
   * **Akeneo connection**: Click **Connect** and select the Akeneo account you configured in [Apps & Connections](#set_up_your_akeneo_connection).

![Get Tokens From Akeneo settings with an Akeneo connection selected](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542810/docs/mediaflows/sync_akeneo_scheduled_retry_get_tokens_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Get Structured Metadata

Retrieve the sync parameters for each asset found by the search using three **Get Structured Metadata** blocks.

Steps:

1. Add a **Get Structured Metadata** block to your canvas and ensure it's connected to the **Get Tokens From Akeneo** block.
1. Rename the block to `Get Akeneo SKU`.
1. Configure the block:
   * **Use the asset from**: Select **Repeat For Each Asset** from the list.
   * **Structured metadata field**: `Akeneo SKU`
1. Add a second **Get Structured Metadata** block and ensure it's connected to the first.
1. Rename the block to `Get Akeneo Family`.
1. Configure the block in the same way, but set:
   * **Structured metadata field**: `Akeneo Family`
1. Add a third **Get Structured Metadata** block and ensure it's connected to the second.
1. Rename the block to `Get Akeneo Attribute`.
1. Configure the block in the same way, but set:
   * **Structured metadata field**: `Akeneo Attribute`

![Get Akeneo SKU settings reading the Akeneo SKU structured metadata field from the current asset in Repeat For Each Asset](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542812/docs/mediaflows/sync_akeneo_scheduled_retry_get_smd_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Get Asset Information

The **Get Asset Information** block retrieves asset details, including the asset ID and the secure URL. The **Join Strings** block uses the asset ID, and the **Create Asset In Akeneo** block uses the secure URL.

Steps:

1. Add a **Get Asset Information** block to your canvas and ensure it's connected to the third **Get Structured Metadata** block.
1. Ensure **Use the asset from** is set to **Repeat For Each Asset**.

![Get Asset Information settings using the asset from Repeat For Each Asset](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542814/docs/mediaflows/sync_akeneo_scheduled_retry_get_asset_information_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Join Strings

The **Join Strings** block creates a unique Akeneo asset code by combining the SKU and Cloudinary asset ID.

Steps:

1. Add the **Join Strings** block to your canvas and ensure it's connected to the **Get Asset Information** block.
1. Open the block configuration and set:
   * **First string**: Click the **Insert Value** icon to add **Entire output** from the **Get Akeneo SKU** block.
   * **Second string**: Click the **Insert Value** icon, select the **Get Asset Information** block, then click **Enter a path**, type `asset_id`, and click **Insert**. The field then shows **Get Asset Information > Asset ID**.
     ![The Insert Value picker for the Second string field, showing the Get Asset Information fields with Enter a path open under Advanced and asset_id typed in the path field](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542817/docs/mediaflows/sync_akeneo_scheduled_retry_join_strings_asset_id_path.png "thumb:c_scale,w_400/dpr_2.0, width: 400")
   * **Separator**: Add the separator `__` (double underscore).

![Join Strings settings combining the Get Akeneo SKU output and the Get Asset Information asset ID](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542816/docs/mediaflows/sync_akeneo_scheduled_retry_join_strings_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")


### Create Asset In Akeneo

The **Create Asset In Akeneo** block attempts to create the asset in Akeneo's Asset Manager.

Steps:

1. Add the **Create Asset In Akeneo** block to your canvas and ensure it's connected to the **Join Strings** block.
1. Open the block configuration and set:
   * **Host URL**: Your Akeneo instance URL.
   * **Access token**: Select the **Access token** from the **Get Tokens From Akeneo** block.
   * **Media URL**: Select the **Secure URL** from the **Get Asset Information** block.
   * **Asset code**: Select **Entire output** from the **Join Strings** block.
   * **Asset family**: Select **Entire output** from the **Get Akeneo Family** block.
   * **Asset attribute**: Select **Entire output** from the **Get Akeneo Attribute** block.

![Create Asset In Akeneo settings using the Get Asset Information secure URL, the Join Strings output, and the Get Akeneo Family and Attribute outputs](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1793542819/docs/mediaflows/sync_akeneo_scheduled_retry_create_asset_in_akeneo_new_canvas.png "thumb:c_scale,w_600/dpr_2.0, width: 600")

### Update Structured Metadata

After successfully creating the asset in Akeneo, update the status to indicate completion.

Steps:

1. Add an **Update Structured Metadata** block to your canvas and ensure it's connected to the **Create Asset In Akeneo** block.
1. Configure the block:
   * **Use the asset from**: Select **Repeat For Each Asset** from the list.
   * **Metadata fields**: Select `Akeneo Status` as the **Metadata field** and select `Linked` as the **Value**.

![Update Structured Metadata settings with Repeat For Each Asset as the asset and the Akeneo Status metadata field set to Linked](https://cloudinary-res.cloudinary.com/image/upload/bo_2px_solid_gray/f_auto/q_auto/v1794398919/docs/mediaflows/sync_akeneo_scheduled_retry_update_smd_fields.png "thumb:c_scale,w_700/dpr_2.0, width: 700")

## Sync product information to Cloudinary

After syncing an asset to Akeneo and linking it to a product, you may want to pull product information back to Cloudinary. This enriches your Cloudinary assets with product data like name, description, or category.

Add the following blocks after creating an asset in Akeneo:

1. **Get Product Information From Akeneo**: Retrieves product details using the SKU.
1. **Update Structured Metadata**: Stores selected product attributes as Cloudinary metadata. Click **Add more** to store several attributes in one block.

This enables:

* Searching for assets by product attributes in Cloudinary
* Displaying product context in the Media Library
* Using product data in transformations or delivery URLs

> **READING**:
>
> * [Akeneo block reference](mediaflows_block_reference#akeneo)

> * [Structured metadata](structured_metadata)

> * [Build a flow](mediaflows_build_flow)

> * [Sample PowerFlows](mediaflows_sample_powerflows)
