Alchemy RecipeIntermediateautomation

Website copy optimisation and A/B testing workflow

Published

Writing website copy that converts is hard enough. Testing whether your copy actually works is harder still. Most teams choose between two bad options: either they manually swap out versions and wait weeks for statistical significance, or they skip A/B testing altogether and hope their gut instinct was right.

The real problem is that these tasks live in different tools. Copy gets written in AI tools like Copy.ai or Hyperwrite. Testing infrastructure lives in platforms like TruConversion. There's no connection between them. You write copy, export it, paste it into your testing tool, monitor results manually, then repeat. Each handoff is a chance for the process to break down or for you to lose focus on what actually matters: finding copy that drives revenue.

This workflow shows you how to close those gaps entirely. We'll wire Copy.ai for initial copy generation, Hyperwrite for rapid iteration, and TruConversion for A/B testing, all connected through an orchestration layer that requires zero manual intervention once you set it up.

The Automated Workflow

Which Orchestration Tool to Choose

For this particular workflow, we recommend n8n over Zapier or Make. Why? Because you need to handle JSON responses from multiple AI APIs, transform them conditionally, and trigger tests based on content length or quality thresholds. n8n's native support for these transformations and its transparent pricing model make it the best fit here. Zapier works too, but you'll spend more per month, and Make's interface gets cluttered when managing five or six sequential API calls.

If you want to keep everything inside Claude's ecosystem, Claude Code is also viable for smaller operations, though it's less suitable for continuous monitoring at scale.

The Five-Step Flow

Here's what happens from start to finish:

  1. A trigger fires (either on schedule or when you submit a new product description)
  2. Copy.ai generates three variations of marketing copy
  3. Hyperwrite refines the strongest version for readability and tone
  4. TruConversion creates a test with both the original and refined copy
  5. Results flow back to a spreadsheet, and if statistical significance is reached, the winning copy gets logged

Step 1: Set Up the Webhook Trigger in n8n

Start a new workflow in n8n. Use the Webhook node as your trigger. This lets you post new content to a URL, and n8n will kick off the entire process.


Webhook configuration:
- HTTP Method: POST
- URL: https://your-n8n-instance.com/webhook/copy-workflow
- Response: {"status": "processing"}

Your webhook will receive JSON like this:

{
  "product_id": "SKU123",
  "product_description": "Ergonomic office chair with lumbar support",
  "target_audience": "remote workers",
  "existing_copy": "Sit comfortably for hours."
}

Add a basic validation node after the webhook to check that product_id and product_description are present. If not, return a 400 error.

Step 2: Call Copy.ai to Generate Copy Variations

Copy.ai's API isn't as tightly integrated as some competitors, but it's workable. You'll use their HTTP node to call their REST API.

First, get your Copy.ai API key from your account settings. Then in n8n, add an HTTP Request node:


HTTP Request Node Config:
- Method: POST
- URL: https://api.copy.ai/api/v1/writeups
- Authentication: Bearer [YOUR_COPY_AI_API_KEY]
- Headers: Content-Type: application/json

Your request body should look like:

{
  "inputs": {
    "description": "{{ $node['Webhook'].json['product_description'] }}",
    "target_audience": "{{ $node['Webhook'].json['target_audience'] }}",
    "format": "product_marketing_copy"
  },
  "num_variations": 3
}

Copy.ai will return three variations. Store this response in n8n. The response format typically looks like:

{
  "outputs": [
    {
      "copy": "Transform your workspace. Our ergonomic chair keeps you supported through marathon work sessions.",
      "score": 0.87
    },
    {
      "copy": "Back pain ends here. Designed for remote workers who refuse to compromise on comfort.",
      "score": 0.84
    },
    {
      "copy": "Eight-hour comfort guarantee. Professional-grade lumbar support for professionals who work from home.",
      "score": 0.82
    }
  ]
}

Step 3: Filter and Pass the Best Copy to Hyperwrite

Add a Code node in n8n to sort these variations by score and grab the top one:

const variations = $node['Copy.ai'].json['outputs'];
const best = variations.sort((a, b) => b.score - a.score)[0];

return {
  copy: best.copy,
  original_score: best.score
};

Now pass this to Hyperwrite. Hyperwrite's API lets you refine and polish copy for tone, readability, and SEO:


HTTP Request Node Config:
- Method: POST
- URL: https://api.hyperwrite.com/v1/refine
- Authentication: Bearer [YOUR_HYPERWRITE_API_KEY]
- Headers: Content-Type: application/json

The request body:

{
  "text": "{{ $node['Code Filter'].json['copy'] }}",
  "instructions": "Refine this product marketing copy for clarity and persuasion. Keep it under 150 characters. Ensure it speaks directly to remote workers.",
  "preserve_meaning": true
}

Hyperwrite returns the refined copy. Store this in a variable called "refined_copy".

Step 4: Create and Launch the A/B Test in TruConversion

Now you have two versions: the original from your product data and the refined version from Hyperwrite. Time to test them.

TruConversion's API lets you create split tests programmatically:


HTTP Request Node Config:
- Method: POST
- URL: https://api.truconversion.com/v2/tests
- Authentication: Bearer [YOUR_TRUCONVERSION_API_KEY]
- Headers: Content-Type: application/json

The request:

{
  "test_name": "Copy variation - {{ $node['Webhook'].json['product_id'] }}",
  "test_type": "split",
  "page_url": "https://yoursite.com/product/{{ $node['Webhook'].json['product_id'] }}",
  "duration_days": 14,
  "traffic_allocation": {
    "control": 50,
    "variant": 50
  },
  "variations": [
    {
      "name": "Control (Original Copy)",
      "description": "{{ $node['Webhook'].json['existing_copy'] }}",
      "css_selector": ".product-headline",
      "change_type": "text_replacement",
      "new_text": "{{ $node['Webhook'].json['existing_copy'] }}"
    },
    {
      "name": "Variant (AI Refined)",
      "description": "{{ $node['Code Filter'].json['copy'] }} (refined by Hyperwrite)",
      "css_selector": ".product-headline",
      "change_type": "text_replacement",
      "new_text": "{{ $node['Hyperwrite'].json['refined_text'] }}"
    }
  ],
  "goal_tracking": {
    "metric": "click_through_rate",
    "goal_type": "increase"
  }
}

TruConversion returns a test_id. Save this. You'll need it for monitoring.

Step 5: Store Results and Monitor Progress

Add a Google Sheets node to log the test details:


Google Sheets Node Config:
- Operation: Append
- Spreadsheet: [Your Copy Testing Log]
- Sheet: Test Results
- Columns:
  - Product ID: {{ $node['Webhook'].json['product_id'] }}
  - Original Copy: {{ $node['Webhook'].json['existing_copy'] }}
  - AI Generated Copy: {{ $node['Code Filter'].json['copy'] }}
  - Refined Copy: {{ $node['Hyperwrite'].json['refined_text'] }}
  - Test ID: {{ $node['TruConversion'].json['test_id'] }}
  - Status: "Running"
  - Started At: {{ new Date().toISOString() }}

Then, set up a separate n8n workflow that checks test results every 24 hours. Use the Interval node to trigger daily:


Interval Node Config:
- Interval Type: Days
- Interval: 1
- Start Time: 09:00

This workflow queries TruConversion for all active tests:


HTTP Request Node Config:
- Method: GET
- URL: https://api.truconversion.com/v2/tests?status=active
- Authentication: Bearer [YOUR_TRUCONVERSION_API_KEY]

For each test that's reached statistical significance (p-value < 0.05), update your Sheets:

const tests = $node['TruConversion Fetch'].json['tests'];
const significant = tests.filter(t => t.p_value < 0.05 && t.p_value !== null);

return significant.map(test => ({
  test_id: test.test_id,
  winning_variation: test.winning_variation,
  lift: test.lift_percentage,
  p_value: test.p_value,
  significance_achieved: true,
  timestamp: new Date().toISOString()
}));

Update your Sheets with these results, and send yourself a Slack notification when a winner is declared.

The Manual Alternative

If automation feels premature for your team, here's a reasonable middle ground. Use Copy.ai and Hyperwrite as standalone tools, generate three variations manually, pick your favourite, then create the test in TruConversion by hand. The payoff is less, but there's no setup friction.

The tradeoff is time. You're looking at 10-15 minutes per test cycle. At scale, when you're running tests on ten product descriptions a week, that time compounds. The automated workflow pays for itself in three weeks if you value your time at £50/hour.

Pro Tips

1. Handle API Rate Limits Gracefully

Copy.ai and Hyperwrite both have rate limits. Copy.ai allows 100 requests per minute on paid plans; Hyperwrite allows 50. If you're testing more than a few products per day, add retry logic to your n8n workflow.

Configure exponential backoff in your HTTP nodes:


HTTP Request Node Config:
- Continue on Error: Enabled
- Retry Settings:
  - Retry On Response: 429 (Too Many Requests)
  - Max Retries: 3
  - Backoff Type: Exponential
  - Initial Delay: 1000ms
  - Max Delay: 30000ms

2. Validate Copy Length Before Testing

TruConversion works best when your copy fits within realistic character counts. Add a validation check before creating the test. If refined copy exceeds your page's visible space, ask Hyperwrite to shorten it:

const refinedCopy = $node['Hyperwrite'].json['refined_text'];

if (refinedCopy.length > 120) {
  return {
    needs_shortening: true,
    current_length: refinedCopy.length,
    target_length: 120
  };
} else {
  return {
    needs_shortening: false,
    copy: refinedCopy
  };
}

If shortening is needed, call Hyperwrite again with tighter instructions.

3. Run Tests Long Enough for Reliability

The 14-day duration in the example is a starting point. If your product gets fewer than 100 clicks per day, extend to 21 or 28 days. TruConversion's built-in calculator will tell you the minimum traffic needed for statistical significance.

4. Cost Optimisation: Batch Your Requests

Rather than triggering a new workflow for each product, batch them. Collect five product descriptions, then run the entire pipeline once. This reduces orchestration overhead and spreads your API calls more evenly, reducing the risk of hitting rate limits.

5. Archive Losing Variations for Pattern Analysis

After a test concludes, don't discard the losing copy. Save it to a separate Sheets tab. After running ten tests, look for patterns. Do certain phrases or sentence structures consistently lose? This meta-analysis will improve your prompt instructions to Copy.ai and Hyperwrite over time.

Cost Breakdown

ToolPlan NeededMonthly CostNotes
Copy.aiPro£49100 API requests/min; supports batch generation
HyperwriteTeams£9950 API requests/min; includes advanced refining
TruConversionGrowth£199Up to 100 active tests; includes statistical analysis
n8nCloud Professional£30300,000 executions/month; sufficient for daily test cycles
Total£377Scales efficiently; adding more products doesn't increase cost significantly

This setup handles roughly 20 product A/B tests per month. The cost per test is approximately £19, plus incremental API usage. If you're running fewer tests, scale down to TruConversion's Starter plan (£79/month), reducing total cost to £257.

If you're running more than 50 tests monthly, consider self-hosting n8n on a small server (around £15-20/month) to avoid hitting execution limits, bringing total cost to just under £360 regardless of test volume.

More Recipes