webhook with links to survey attachments

03-04-2022 01:34 PM
New Contributor

Hi all,

I'm trying to develop a webhook that sends an automated email with links to survey attachments.  In particular, the survey is set up to take up to 5 photos, and I'm working with non-premium features of Microsoft Power Automate.

I was able to follow Working with Survey123 attachments in Integromat successfully.  Props @IsmaelChivite for a good article!  That said, I suspect my organization would prefer sticking with Microsoft to match existing emails, user profiles, security, etc.  Unfortunately, I don't have access to premium actions that are required to replicate the same process with Power Automate as detailed in this Esri support article.

My thought was to combine ideas from both articles, namely the URL/token tidbit of the Integromat article: <attachment URL>?token=<survey token>.  In Power Automate, I made a flow that takes a S123 response, iterates through photo attachments to add the URL/token to an array, and then emails the array of links.  The emailed links work - at least initially - but trying to revisit links the next day (or even an hour later) leads to the "invalid token" error from the ArcGIS REST Services Directory.

My suspicion is that the token is only valid for a certain amount of time, which really cuts into the utility of the webhook if the email recipients don't receive, open, and save the images quickly enough.  I feel like I barely have a grasp of what's happening behind the scenes or even all this terminology, but wondering if there's any insight out there? 

0 Kudos
0 Replies