Automatic Product Description Updates with Automate, Aprimo, and ChatGPT

View as Markdown

This automation workflow integrates Aprimo, ChatGPT, and Contentstack to streamline the process of updating product descriptions. It uses Automate for managing and retrieving image metadata from Aprimo, followed by employing ChatGPT to create fresh content leveraging that data.

Prerequisite

  • Access to Aprimo DAM Instance
  • Access to Automate
  • Access to ChatGPT/OpenAI API

Flow of the Automation

  1. Trigger:
    1. The user updates the "image description" field of an image in a Contentstack entry and saves the entry.
  2. Contentstack Update Notification:
    1. Contentstack detects the update and sends an update notification to Automate, signifying the changes made to the "image description" field.
  3. Aprimo Integration:
    1. Automate receives the update notification from Contentstack and communicates with Aprimo through API access.
      1. Update Aprimo Description:
        1. Automate updates the corresponding description for the selected Aprimo image with the new "image description" data received from Contentstack.
      2. Retrieve Relevant Data from Aprimo:
        1. The automation retrieves additional relevant data regarding the updated image from Aprimo. This data could include product details, metadata, images, or any other pertinent information available via the connector that can be used to enrich the product description.
      3. Pass Data to ChatGPT:
        1. The retrieved data from Aprimo is then passed to ChatGPT via API access, requesting ChatGPT to generate a detailed product description based on the gathered information.
      4. ChatGPT Description Generation:
        1. ChatGPT processes the received data and utilizes its natural language generation capabilities to create a comprehensive and engaging product description.
      5. Receive ChatGPT Output:
        1. Automate receives the generated product description from ChatGPT.
      6. Update Contentstack Entry:
        1. Finally, Automate updates the Contentstack Entry's "product description" field with the output received from ChatGPT.

End of Automation:

At this stage, the automation process is complete. The product description for the updated image in the Contentstack entry has been enriched using data from Aprimo, including images, and the AI-powered insights from ChatGPT.

Initial Setup

Configure the Aprimo Marketplace App

You will need access to your instance of the Aprimo DAM so that users can select images. Connect the instance via the Marketplace App and the Automation Hub connector.

Follow steps 1-3 in this documentation to configure the Aprimo marketplace app.

Create or Amend your Content Model

You will need to have the following 3 fields available for your editors to utilize:

  1. Aprimo Image - A Custom Field configured to utilize the Marketplace App Integration with Aprimo.
  2. Image Description - A Single Line Textbox Field to store the description of the image.
  3. Product Description - A multi-line textbox Field to store the AI-generated content.

Create an Entry

  1. Using this new Content Type, create a new Entry.
  2. Be sure to fill out some placeholder content in the text fields and you will be able to access the Aprimo DAM to select an image.
  3. Save the Entry with data.

Click to enlarge

Building the Automation

Configure the Update Entry Trigger

  1. Create a new Automation and give it a name.
  2. Choose the Contentstack Connecter for the trigger event.
  3. Select Entry Trigger.
  4. Select an Authorized Account or Authorize a new one.
  5. Select when the event Entry is Updated.
  6. Select the Stack.
  7. The default branch is Main.
  8. Click the toggle to Show optional fields.
  9. Specify the content type and/or environment if necessary.

Click to enlarge
Click to enlarge

  1. Test the trigger.
  2. In a new tab or window, navigate to the entry you created.
  3. Save the entry.
  4. Navigate back to the automation.
  5. Test or retest the entry.
  6. Verify the output that is returned with necessary data JSON (aprimo_image id, image_description, product_descirption).

    Click to enlarge

  7. 7. Save and Exit

Updating an Aprimo Record

Click to enlarge

  1. Search for or choose the Aprimo Connecter.

    Click to enlarge

  2. Select edit a record.

    Click to enlarge

    1. Follow this documentation to configure your Aprimo Connector by adding your account. Note that credentials are activated after 15 minutes.
  3. Select the aprimo_image id from the body payload Output from Previous Steps.

    Click to enlarge

    1. Set the key to Description and the value to the data from the image_description field.

      Click to enlarge

      1. Click Proceed and Test Action
      2. You should see a successful response message.

        Click to enlarge

        1. Save and Exit

Getting an Aprimo Record

  1. Create a new action step.
  2. Select the Aprimo Connector.

    Click to enlarge

    1. Select Get a single Record.
    2. From the previous output select the aprimo_image id.
  3. In a new tab, log in to your Aprimo environment and double-check that the description you provided in your entry has been updated in the description area of your image. You can also check this data in the Automation payload.

    Click to enlarge

    Click to enlarge

  1. Click proceed.
  2. Test the action and verify the output.

Click to enlarge

  1. Save and Exit

Passing Data to ChatGPT

  1. Create a new Step.
  2. Select the ChatGPT connector.
  3. Select Chat.

    Click to enlarge

4. Add your ChatGPT account credentials and authorize.

5. Select the ChatGPT model you wish to use to generate the content.

6. Add the following to the Prompt Text. Be sure to select the data from the output of “Get Single Record”.
    “Based on the following information write me a 60-word summary of this product {{3.items.2.localizedValues.0.value}}. Make sure to include the full response.”

Click to enlarge

7. Select your desired GPT role and any optional configurations.

8. Click proceed.

9. Test the Action and verify the response.

10. Save and Exit.

Click to enlarge

Updating the Product Description Field

  1. Add a new step
  2. Select Contentstack as the connector.

    Click to enlarge

    1. Select Update Entry.

3. Fill in the corresponding values and select a message.

Click to enlarge

4. Insert message.content data from the ChatGPT response into the product_description field in JSON format.

Click to enlarge

    Click Proceed.
      Test the Action and verify the response to show that the Entry was saved and updated.
        Save and Exit.

Activate the Automation and Test

Now that you have configured the necessary connectors and steps it’s time to fully test the automation.

  1. Be sure to activate the automation.
  2. Create a new entry using the content model you built.
  3. Add an image and description.
  4. Save the entry.
  5. Refresh the entry page.

Congratulations! You have successfully implemented the automation