Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

AddProperty odata.etag

(1) ShareShare
ReportReport
Posted on by 186

Hi All,

 

I am building up a JSON object and need to add the odata.etag property like so:

 

addProperty(variables('payload'), '@odata.etag', body('Get_Item')?['odata.etag'])

 

but I get the following error message:

Unable to process template language expressions in action 'Compose_4' inputs at line '1' and column '2957': 'The provided property name '@odata.etag' has these invalid characters '.'. The name cannot contain any of the following symbols: '[, ], .'.'.

 

I've tried stringifying it, puting it in a compose, setting the property rather than adding it, but it's all the same.

 

Anyone know of a workaround?

 

Thanks

 

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: AddProperty odata.etag

    Hi @LKS,

     

    Since the "." is an invalid character to be added as a property name, so it is impossible to approach that directly.

    As a workaround, you could add the "@odataetag" into it firstly, then use string() function convert the object to string, then use replace() function replace "@odataetag" to "@odata.etag", then use json() function convert it back to object:

    addProperty(variables('payload'), '@odataetag', body('Get_Item')?['odata.etag'])
    json(replace(string(outputs('Compose')),'@odataetag','@odata.etag'))

    Screenshot 2021-03-11 155409.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492