web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / AddProperty odata.etag
Power Automate
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

 

Categories:
  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    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.

     

  • Suggested answer
    WhiteHat Profile Picture
    25 on at
    Another method would be to create a stand-alone object with the etag property (including the period) using the Compose action.
     
    Then use the Union function to combine the stand-alone object with the target object (payload).
    The union will result in a new object with all properties from both objects.
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 211 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 190

Last 30 days Overall leaderboard