Skip to main content

Generate Image

Jake Rosenthal avatar
Written by Jake Rosenthal
Updated this week

How to set up and use the Generate Image action

The Generate Image action allows you to create AI-generated images based on text descriptions. The action helps you create visual content, mockups, or illustrations directly within your Workflow automation.

In this article, we'll walk through a complete example that demonstrates how you can upload and analyze an existing image, generate an improved prompt, and then create a new image—but you can also use the Generate Image action on its own with a direct prompt or by referencing variables from previous steps.

Follow these steps:

  1. Add a Generate Image action: In a Workflow, click the plus button between existing blocks. It will open a modal where you can select from Cassidy's pre-configured actions. Select the Generate Image action to add it to your Workflow.

  2. Rename the action (if needed): If you want to make the action more descriptive or easier to reference as a variable later, enter a new name.

  3. Set up the preceding actions (optional for this example): The following steps show how you can set up actions to analyze an existing image and generate an improved prompt, but you can skip this if you want to use the Generate Image action directly:

    • Add a Manual Trigger with a “File” input field to accept an image upload.

    • Add a Generate Text with Cassidy Agent action to analyze the uploaded image. Configure this action by selecting an Agent, writing a prompt that asks for feedback on the image, and requesting an AI-generated version prompt.

    • Reference the "Image to Analyze" variable from the trigger. Enable "Include Citations", and set up Structured Output Fields with fields for "AI Prompt for Image Generation", "Critique", and "User Resonance" to capture the AI-generated prompt.

  4. Add an image prompt: In the "Prompt" field, describe the image you want to generate. Be specific about key elements, composition, lighting, mood, style, and colors. You can reference variables from previous steps or the trigger to create dynamic image prompts by pressing "#" to insert a variable.

    *In this example, reference the "AI Prompt for Image Generation" output from the previous Generate Text with Cassidy Agent action.

  5. Enter a file name: In the "File Name" field, specify the name for the generated image file. You can reference variables from previous steps.

  6. Choose image size (optional): In the "Size" dropdown, select the aspect ratio for the generated image. The default setting is "Auto", which automatically determines the best aspect ratio based on your prompt. You can also select from “Square”, “Portrait”, or “Landscape”.

  7. Select background type (optional): In the "Background" dropdown, select the background type for the generated image. You can choose from "Auto", “Transparent”, or “Opaque”.

  8. Test the action: Run a test of your Workflow to preview the generated image and ensure that it meets your expectations. You can refine your prompt based on the results to achieve the desired output.

The Generate Image action will output a file reference to the generated image, which can be used in subsequent Workflow actions, saved to your Knowledge Base or device, or sent via email or other integrations.

Did this answer your question?