Streamlines the process of creating an entry after creating a product asset. It helps reduce user click-through time and reduces the amount of busy work they need to do.
Here's the overview of the Automation that you need to create:

Choose the Transform Connector

{
"entry": {
"title": "{title}",
"description": "{description}",
"product_image": "{file}"
}
}
Here's the overview of the Automation that you need to create:


const apiKey = input.apiKey;
const deliveryToken = input.deliveryToken;
const environment = input.environment;
const contentType = input.contentType;
const uid = input.assetUID;
// Build the URL for the API request
const url = `https://cdn.contentstack.io/v3/content_types/${contentType}/entries?environment=${environment}&query={"product_image":"${uid}"}`;
// Set the headers required by Contentstack
const headers = {
'Content-Type': 'application/json',
'api_key': apiKey,
'access_token': deliveryToken
};
try {
const response = await fetch(url, {
headers });
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
} const data = await response.json();
return data;
} catch (error) {
return error.message }Below is what the transform statement looks like to update the entry with the new details. As you can see the input values take the title and description from the trigger event.

