Update Features through Power Automate - Token not recognized

362
3
03-04-2021 11:06 AM
KerryKang
Occasional Contributor II

Hello all,

 

I have a scenario that ran successfully in Integromat, and now I tried to make it work in Power Automate.

In my scenario, an http request is sent to the 3rd party geocoder API, and it retrieves the city and address information, and post it back to the feature layer.

 

I used 'pulldata('@property', 'token') to get the token information and used it in the update url (image below).

 

KerryKang_0-1614883197859.png

 

When I ran the scenario, it says it ran successfully, but two fields above (locality/ address) are still empty. If I check the output status in Power Automate module, it says  'invalid token'. The input area shows the values I expected to see.

KerryKang_2-1614884544565.png

 

 

I am aware that we can retrieve token through another http module by providing specific username and password, but I expect this survey is being shared with multiple users. So, I hope to keep using 'pulldata' within the survey to get the token information.

Could you someone advise me if I missed anything for this setup?

 

 

 

0 Kudos
3 Replies
IsmaelChivite
Esri Notable Contributor

Hi. The currently available version of the Power Automate connector makes working with tokens quite difficult. I suggest you wait a couple of weeks as we have a new release waiting to be approved by Microsoft. With the new update, you should be able to get the token from the payload, like you did with Integromat.

JamesWilson2
New Contributor III

I have a public survey which I am reading into Power Automate using the process described above. Once I have enriched the data, I would like to write back to the survey's feature service. As it is a public survey, I have to generate a token. I have followed some help texts and am generating a token, but I am still getting a 'token required' error when I post back to the feature service. If I copy and paste the serviceURL with the token I have raised into a browser it works. Any idea how to fix this?

0 Kudos
JamesWilson2
New Contributor III

Have you checked your token works by copying and pasting your URI and token into a web browser?
<pasteURI>?token=<pasteToken>

I have had this same problem, though I was working with a token that I raised. When I put it into a browser it worked, so I knew the token was valid. I was passing it as a bearer token and it did not work. I tried your syntax and it did not work. I tried the syntax in this article and it works for me Solved: Changing hosted Feature layers with Power automate... - Esri Community

 

0 Kudos