Skip to main content
Question

Data Options in Content Activity

  • September 30, 2025
  • 6 replies
  • 56 views

Is it possible to reference and manipulate a user attribute within a Content Activity? 

For example: grab a user’s email username@email.com and remove the @email.com so that it returns only username

6 replies

Ajay Merchia
Forum|alt.badge.img+2
  • Community Manager
  • January 23, 2026

Thanks for the question - and apologies for the delayed response!

Direct Answer: No, Content Activities cannot perform string manipulation directly. Content Activities use Mustache syntax (e.g., {{variable}}) to reference data, which supports simple variable substitution but does not support Moveworks DSL functions like $SPLIT, $REPLACE, or $TRUNCATE.

The Solution:

To achieve this, you must transform the data before it reaches the Content Activity. You can do this by adding an Action Activity that runs a Script Action to manipulate the string and save the result to an output key. Then you can reference that output key in your Content Activity.

Here's an example Script Action that extracts the username from an email:

script:
  output_key: extracted_username
  input_args:
    email: meta_info.user.email_addr
  code: |
    # Split the email at '@' and take the first part
    return email.split('@')[0]

Then in your Content Activity, you can reference it like: {{data.extracted_username}}

That said, we'd love to better understand your use case:

  • Are you using it to personalize content shown to the user?
  • Do you need to pass it to an external system or API?
  • Is this for display purposes in the conversation?
  • Something else?

Understanding the actual use case will help us figure out if there are other approaches or if this is a pattern we should make easier in the future.


Derrick
Forum|alt.badge.img+3
  • Inspiring
  • March 4, 2026

can i reference the meta_info from within the content activity?
meta_info.user.external_system_identities.snow.user_id for example?


varockiasamy

Yes, you can reference attributes or variables stored in the data and meta_info objects from within the content activity as long as it is mapped.


Derrick
Forum|alt.badge.img+3
  • Inspiring
  • March 4, 2026

what do you mean as long as it is mapped? i have a content activity sitting in front of my compound action, so im not sure anything is mapped yet at that point. 


Derrick
Forum|alt.badge.img+3
  • Inspiring
  • March 4, 2026

I think I got it sorted, I just did a script action before it that output the meta_info I wanted. Then the mustache syntax in the content activity worked. 


varockiasamy

Glad it worked!

I meant as long as user_id field is mapped in user identity it should work in content activity. The user_id field in meta_info object gets the value from snow user_id_info.user_itsm_id_info.itsm_user_id field in user identity.