I am trying to get users attachments and send them to email via power automate. We don't have premium features for power automate. We can't use HTTP to be able to send the attachments the correct way. We are able to get the attachment to be sent but we cannot open it because of the missing token. We bypassed this temporarily by setting a static token, but this only works for a day. So my question is, can I pull the token URL from the form and set it as an attribute that way I can access it using the web hooks?
I used a type calculate and in the calculation field, I tried settings pulldata(‘@property’,’token’), but this doesn't seem to work. If you can point me to the right direction it would be appreciated
Tokens can be included as part of the webhook payload information under portalInfo.
Go to the Survey123 website, manage the survey, and check portalInfo. A token should become part of the webhook payload. You will need to redownload the survey and maybe refresh the webhook connection in automate.
Hey magisian,
That box is checked, and the connection prior to it was refreshed. It seems when I test my flow the portalinfo is not being sent. I believe if its done internally where our portal is setup it sends the token. If someone outside the network no token is being sent.
If it works for some users but not others it suggests it's tied to your environment or the user.
Are these users outside the network logged in or public? Public users won't have a token.
You could also add a http request to your webhook to generate a token. Set a flow of token = pass, no token = http request to generate a token. Then set the token.
Hi @ChristopherCounsell ,
Does this mean public facing survey123 is not going to be able to extract attachment using Power Automate since the token is going to be empty/null.
I built a public facing Survey123 form, and now I found that my Power Automate workflow only work for organizational users with credentials.
Is there a work around of this?
Thanks tons!
Reno
If your layer is publicly accessible (for queries), you should not need a token:
https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-working-with/ba-p/...
If your survey is from the public, so no token is passed, but the layer you are querying is private (token required), you won't be able to use a token that doesn't exist to request the photo. You could consider embedding a user/password in the power automate webhook to request a token that can be used to request the image. Personally, not a fan of doing this.