Directus Pro Tip: Copy/Paste Raw Value the Smart Way

Ever caught yourself typing the same complex JSON or permission rule over and over? Directus has a feature that can save you a ton of time and reduce mistakes: the Copy/Paste raw value buttons. Here’s how I’ve been using them.

Where to Find It

Next to most fields, you’ll see a small downward arrow icon; click on that and a dropdown will appear:

  • Copy raw value
  • Paste raw value

They look simple, but for anyone working with complex configurations, they’re incredibly powerful.

Example: Permissions

Imagine you’re building an employee management system where users should only update or delete documents they uploaded. Instead of recreating the same rule multiple times:

Step 1: Create your Read permission rule:

{
  "_and": [
    {
      "absences": {
        "absence_id": {
          "submitted_by": {
            "_eq": "$CURRENT_USER"
          }
        }
      }
    }
  ]
}

Step 2: Copy the raw value.

Step 3: Go to Update/Delete permissions and paste the raw value.

And that’s it — consistent permissions in seconds.

Other Great Uses

  1. Template fields
    Copy template structures between similar fields:

{{first_name}} {{last_name}} {{role.name}}

When to Use This

  • Permission rules across multiple actions
  • Similar field configurations in different collections
  • Complex validation rules
  • Interface option setups
  • Default value patterns
  • Translation objects
  • Conditional logic rules

This small feature has saved me countless hours of re-typing and prevented more mistakes than I can count. If you haven’t tried it yet, give it a shot the next time you’re working with complex permissions in Directus.

What about you? Have you found creative ways to use the copy/paste raw value feature? Share your tips, I’d love to learn more!

4 Likes