I am building a flow with an UpdateItem step and want to use a variable as the SiteAddress - this is so we can easily transfer flows between different environments such as DEV > TEST > Pre-Live > Live just by querying the Environment information
We have done this inn the past with no issues - here is an example: from a flow we did a couple of years ago, and works in live every day:
As you can see, the Designer has allowed us to enter the JSON data
But in the flow I am building today, when I try to set the field values (using the hardcoded address) then change it to the variable this is what Power Automate is showing me in the Designer:
So is it me?
Or has Microsoft changed something?
Is there a workaround to be able to enter the JSON Body in the Body field of the step?
thanks
.
you can see in this image that we are able to use a variable as the SharePoint Site Address:
Please also note that there is a BODY field, and NO ITEM field:
here is the JSON in the Body field:
{
"Title": @{triggerBody()?['Title']},
"ImplementationDateTime": @{triggerBody()?['ImplementationDateTime']},
"CABImplementor": @{triggerBody()?['CABImplementor']},
"ServiceType": @{triggerBody()?['ServiceType']},
"RollbackDateTime": @{triggerBody()?['RollbackDateTime']},
"ImplementationComplete": @{triggerBody()?['ImplementationComplete']},
"CABNumber": @{triggerBody()?['ID']},
"CABStatus": {
"Value": @{triggerBody()?['CABStatus']?['Value']}
},
"CABOwner": {
"Claims": @{triggerBody()?['CABOwner']?['Claims']}
},
"SubmittedBy": {
"Claims": @{triggerBody()?['SubmittedBy']?['Claims']}
},
"CABType": {
"Value": @{triggerBody()?['CABType']?['Value']}
},
"TestingSignedOffBy": @{triggerBody()?['TestingSignedOffBy']},
"BusinessApprovals": @{triggerBody()?['BusinessApprovals']},
"CABImplementingTeam": {
"Value": @{triggerBody()?['CABImplementingTeam']?['Value']}
},
"ServiceImpact": @{triggerBody()?['ServiceImpact']},
"CABLocation": {
"Value": @{triggerBody()?['CABLocation']?['Value']}
},
"ImpactCategory": {
"Value": @{triggerBody()?['ImpactCategory']?['Value']}
},
"BusinessRisk": {
"Value": @{triggerBody()?['BusinessRisk']?['Value']}
},
"CherwellTicket": @{triggerBody()?['CherwellTicket']},
"ReasonForChange": @{triggerBody()?['ReasonForChange']},
"TechnicalDetail": @{triggerBody()?['TechnicalDetail']},
"PrechangeTesting": @{triggerBody()?['PrechangeTesting']},
"PostChangeTesting": @{triggerBody()?['PostChangeTesting']},
"SuccessCriteria": @{triggerBody()?['SuccessCriteria']},
"RollbackPlan": @{triggerBody()?['RollbackPlan']},
"CommunicationPlan": "comm@{triggerBody()?['CommunicationPlan']}",
"CABRisk": @{triggerBody()?['CABRisk']},
"PCIImpact": @{triggerBody()?['PCIImpact']},
"ImpactToSecurity": @{triggerBody()?['ImpactToSecurity']},
"ThirdPartyDataSharing": @{triggerBody()?['ThirdPartyDataSharing']},
"ActiveDirectoryIntegration": @{triggerBody()?['ActiveDirectoryIntegration']},
"ImpactDisasterRecovery": @{triggerBody()?['ImpactDisasterRecovery']},
"ImpactOtherDocumentation": @{triggerBody()?['ImpactOtherDocumentation']},
"SendNotificationEmail": @{true},
"DPIACompleted": {
"Value": @{triggerBody()?['DPIACompleted']?['Value']}
},
"DPIAApproved": {
"Value": @{triggerBody()?['DPIAApproved']?['Value']}
},
"SARBApproval": {
"Value": @{triggerBody()?['SARBApproval']?['Value']}
},
"NotificationSent": @{true}
}
That is all working fine, no problems in over 3 years of live use.
But in my new flow, I want to do the same, use a variable for the Site Address:
Unfortunately, as you can see below, it is not offering the Body field - only an Item:
and that is my problem
Firstly, no i don't see that it allowed you to put in JSON, all I see is a pink bubble, please share the Expression, which would be the JSON.
As for the second screenshot, I don't understand whats wrong. You haven't populated the item and its required, so thats the error, not the Site.
If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others
Cheers
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1