Select to view content in your preferred language

Issues with generating token/reading data after update on Wednesday

232
2
Jump to solution
3 weeks ago
BigLouC
Frequent Contributor

Getting this error from PowerAutomate with web hooks

Unable to process template language expressions in action 'Generate_Server_Token' inputs at line '0' and column '0': 'The template language expression 'decodeUriComponent(first(triggerBody())['changesUrl'])' cannot be evaluated because property 'changesUrl' doesn't exist, available properties are 'name, orgId, serviceName, lastUpdatedTime, events'.

This was working fine Tuesday, Wednesday no more. 

I am using webhooks as per this example

https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/use-webhooks-to-automate-workflo...

It now states that its outdated.

So did the update made the above unusable to move us to the new format?

 

0 Kudos
1 Solution

Accepted Solutions
BigLouC
Frequent Contributor
Found the issue.
The update changed the structure if the json coming back after parsing edits
 
It used to be like this:
 "transportType""esriTransportTypeUrl",
        "responseType""esriDataChangesResponseTypeEdits",
        "edits": [
            {
                "id"0,
                "features": {
                    "adds": [],
                    "updates": [],
                    "deleteIds": []
                }
            },
            {
                "id"1,
                "features": {
                    "adds": [
                        {
 
Where the index for the data was in 1. Now they removed id:0 from the mix, so the index to get the data is no longer 1, but 0. Like below:
 
 
   "transportType""esriTransportTypeUrl",
        "responseType""esriDataChangesResponseTypeEdits",
        "edits": [
            {
                "id"1,
                "features": {
                    "adds": [
 
I updated the template line 'body('Parse_Edits')['edits'][1]['features']['adds']' to 0 instead of 1 and now it works.
 
I am not sure if this information was passed on what was updated, I did not see anything mentioned

View solution in original post

0 Kudos
2 Replies
BigLouC
Frequent Contributor

Now sometimes it dies on the gettoken part, now it dies after parsing edits 

InvalidTemplate. Unable to process template language expressions for action 'Apply_to_each' at line '0' and column '0': 'The template language expression 'body('Parse_Edits')['edits'][1]['features']['adds']' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.

 

did something change in the template after wednesday?

@JoshuaClifford1  

0 Kudos
BigLouC
Frequent Contributor
Found the issue.
The update changed the structure if the json coming back after parsing edits
 
It used to be like this:
 "transportType""esriTransportTypeUrl",
        "responseType""esriDataChangesResponseTypeEdits",
        "edits": [
            {
                "id"0,
                "features": {
                    "adds": [],
                    "updates": [],
                    "deleteIds": []
                }
            },
            {
                "id"1,
                "features": {
                    "adds": [
                        {
 
Where the index for the data was in 1. Now they removed id:0 from the mix, so the index to get the data is no longer 1, but 0. Like below:
 
 
   "transportType""esriTransportTypeUrl",
        "responseType""esriDataChangesResponseTypeEdits",
        "edits": [
            {
                "id"1,
                "features": {
                    "adds": [
 
I updated the template line 'body('Parse_Edits')['edits'][1]['features']['adds']' to 0 instead of 1 and now it works.
 
I am not sure if this information was passed on what was updated, I did not see anything mentioned
0 Kudos