Send a prompt to Claude by Anthropic

The Send a prompt to Claude by Anthropic Action allows you to send data to any Claude model for AI-powered processing. This can be useful for generating product descriptions, summarizing customer inquiries, or performing advanced AI-driven tasks within your workflow.

Configuring the Action

To set up the Send to Claude by Anthropic action, follow these steps:

  1. Set up the integration following the integration guide.
  2. In your workflow, add a new action and select Send to Claude by Anthropic.
  3. Choose the AI model to use. All Claude 2 and 3 models are available and others will appear as they are released.
  4. Enter the Prompt field, which serves as the instruction to Claude. You can include tokens to pass in dynamic data.
  5. (Optional) Click on Advanced Anthropic Settings to fine-tune AI behavior.
  6. (Optional) Check the Include Context box to automatically send current product data along with the prompt.
  7. Under What do you want to do with the response?, choose how to handle the AI’s output.
  8. Click Save to apply the action.

Handling the AI Response

The action provides multiple ways to process the AI-generated response:

Response Handling Option Description
Handle the response with Custom Action code Allows advanced users to process the AI response using custom code. The response is available as {{ response }}.
Run the response through a workflow Passes the AI response to a subworkflow for further automation. Additional data can be formatted as JSON.
Use response in other actions and conditions Generates a token (e.g., {{ exec["id"].response }}) that can be used in subsequent actions or conditions.

Example Configuration

Here’s an example of setting up an AI-generated product description:

  1. Set the Prompt as: Generate a short, engaging product description for {{ product.title }}.
  2. Enable Include Context to provide all product details.
  3. Choose Use response in other actions and conditions to store the AI output.
  4. Use the generated token in an email or product update action.

Troubleshooting & Usage Tips

Claude’s response is too long or too short.
Try adjusting your prompt by specifying a desired word count. Example: Write a product description for {{ product.title }} in 50 words or less.

The AI response contains unexpected data.
Ensure that your prompt is clear and structured. Using explicit instructions like “List three benefits of this product” can improve accuracy.

Response token is not working in later actions or conditions.
Make sure that you are using the correct token format, such as {{ exec["id"].response }}, and that the action has executed successfully before it is referenced.

The token relies on data from the AI action. If the AI action does not run in your test, then it will not have any data to show. Ensure that the AI action runs sequentially before wherever the token is being used. Generally this means live-testing the workflow to ensure the proper result. 

Credit Cost

The Send to Claude by Anthropic action incurs a cost of one Action Credit on Lite plans and is unlimited on Unlimited plans.

Custom Actions

This Action can be implemented within Custom Actions using the ai twig filter. See below.

AI Twig Filter Alternative

The ai Twig filter may be used directly in any text box without the need for this Action at all. This is an excellent option for inline usage of AI capabilities. See documentation for more information.