Copy-Pasting LeanIX Automations Without Losing Your Mind (or Your Logic)

Share

You've built the perfect automation. Twelve steps, three conditions, beautifully orchestrated. Now you need it on a different Fact Sheet type. How hard can it be? (Spoiler: Very.)

The Problem: Copy Doesn't Mean Copy

LeanIX automations are powerful. They're also surprisingly fragile when you try to move them around. We keep running into two scenarios that make us question our life choices:

Scenario 1: Changing the Fact Sheet Type

You copy an automation. You change the target from Application to ITComponent. And then you watch in horror as nearly every step resets itself. Field mappings? Gone. Conditions? Cleared. That beautiful logic you spent an hour crafting? Back to defaults.

The UI is essentially saying: "Oh, you wanted a different Fact Sheet type? Let me just forget everything you configured. You're welcome."

Scenario 2: Copying to Another Workspace

This one's even more fun. You export your automation via the API, duplicate it identically into the target workspace, and... nothing works. Why? Because IDs don't travel well.

  • That tag group you referenced? Different ID.
  • That script you called? Different ID.
  • That role you checked for? You guessed it – different ID.

Your automation is technically there. It's just pointing at ghosts.

The Solution: Smart Copying via API

We got tired of manually fixing broken automations. So we built tooling that actually understands what it's copying.

Here's how we transport automations elegantly:

1. Export with Context

Instead of just grabbing the automation JSON, we capture the meaning behind the references:

  • Tag Group "Status" with ID abc123 → remembered as "Status"
  • Script "Calculate Lifecycle" with ID def456 → remembered by name
  • Role "Application Owner" → stored as the role name, not the ID

2. Resolve in Target

Before importing, we query the target workspace:

  • "What's the ID of Tag Group 'Status' here?" → xyz789
  • "What's the ID of Script 'Calculate Lifecycle'?" → uvw012
  • "What's the Role ID for 'Application Owner'?" → resolved

3. Transform and Import

We rewrite the automation JSON with the correct target IDs, then push it via the API. The logic stays intact. Only the references change.

The Result

What used to be a 30-minute manual reconstruction job is now done in seconds:

  • ✅ All conditions preserved
  • ✅ All field mappings intact
  • ✅ All script/tag/role references resolved
  • ✅ Works across workspaces
  • ✅ Works across Fact Sheet types

Bonus: It's Scriptable

Because we're doing this via API, we can batch it. Need to deploy the same automation to 15 workspaces? Run the script 15 times. Need to copy it to 5 different Fact Sheet types? Same deal.

This turns automation deployment from "artisanal hand-crafting" into "infrastructure as code."

Conclusion

LeanIX automations are great – until you need to move them. The UI makes copying feel easy, but the reality is that references break, logic disappears, and you end up rebuilding from scratch.

With the right tooling, copying becomes what it should be: actual copying. Logic in, logic out, IDs resolved, done.


Struggling with automation portability? Talk to us – we've got the tools to make it painless.

Read more