Select to view content in your preferred language

Survey123 Create Report action in Microsoft Power Automate (Preview)

23902
67
01-30-2023 12:43 PM
IsmaelChivite
Esri Notable Contributor

[Updated July 2023: Added new note with link to a more recent and complete video]

 

Note: You may want to watch this video instead for a more recent take at this functionality

 

Just a few days a new Create Report action was added to the ArcGIS Survey123 connector for Microsoft Power Automate. While this action will not be officially documented or supported until the upcoming February 2023 release (currently planned for February 22), you can start playing with it now.

The video below will give you a quick tour to get you going. Enjoy!

If you have any feedback, please let us know by posting a comment below or adding your comments to the Survey123 Early Adopter Community website.

Note:  Since this action was added to the connector, some of you have reported that any flow previously authored from a Microsoft Power Automate template, stops working when you edit it. To resolve this issue, the Survey123 connector needs to be deleted from your flow and added again.  We are working to understand if this problem can be prevented or not. 

67 Replies
Tiff
by
Frequent Contributor

Hi @BenCunningham Have you figured out if it's possible to save the file in SharePoint rather than OneDrive?

0 Kudos
RobertAnderson3
MVP Regular Contributor
0 Kudos
SayedWali
Regular Contributor

However, I found the solution, what I did is to grab the file through the URL, create the file into OneDrive, send it as an email attachment, and finally delete the file from OnDrive using "Delete file" action.

0 Kudos
Thaiwoolawal
Emerging Contributor

@SayedWali pls kindly explain the process. Because am planning to the same flow for my Transformer Inspection Reports

 

Thanks

Thaiwoolawal
Emerging Contributor

How do I differentiate between all the listed attachments

Example. Feature attachment globalID

Feature attachment Name

Feature attachment url etc

 

 

 

 

 

0 Kudos
AJ_devaccount
Frequent Contributor

This is amazing, thank you! Is there a way to send the report (and any survey attachments) as an email every time a new response is created?

0 Kudos
Ursu_Lacramioara
Occasional Contributor

Thank you Ismael for this great improvement! Can we also generate an email using the summary report? We prefer that instead of sending an email for every record entered in the survey. Also, is there an option to adjust the time to EST Daylight Savings? 

Thank you,

Lacri

RobertAnderson3
MVP Regular Contributor

This functionality has now been added! You can create a WHERE clause now to do summary reports! I scheduled some to run weekly with a clause for which assets require maintenance from the week.

For the time zone, there is under the advanced options for the create report action a UTC Offset, what I've done is in my survey I've added a hidden utcOffset field with:

if(pulldata("@property", 'utcOffset')='-3','-03',if(pulldata("@property", 'utcOffset')='-4','-04',pulldata("@property", 'utcOffset')))

I have the if adding the padded zero because the property pulls it without, but the item in Automate requires -04 or -04:00 style to work.

I'm not sure if they'll add the ability to use other standard naming conventions to include the daylight savings changes or not (Or if they have and I've just missed it somehow).

0 Kudos
KristenPonak
New Contributor

Is this also able to connect and generate a feature report from Portal?  

0 Kudos
RalphPlummer
Occasional Contributor

This is awesome!  Thank you @IsmaelChivite for posting.  I did run into a problem.  When I run the trigger, everything works great for me.  When a user submits a survey, the process doesn't create the report and fails since there isn't anything to upload to OneDrive.  It appears the token isn't being passed? 
Here is the Raw output from Create Report:
{

    "statusCode"200,
    "headers": {
        "Vary""Origin,Accept-Encoding",
        "X-Frame-Options""SAMEORIGIN",
        "Strict-Transport-Security""max-age=63072000; includeSubdomains; preload",
        "X-Cache""Miss from cloudfront",
        "X-Amz-Cf-Pop""IAH50-C2",
        "X-Amz-Cf-Id""oNnwc1YnZMG-Y6K9ujPRdY1fmryOjk5u4NxazeqXViwIDtlYtLgDtA==",
        "Timing-Allow-Origin""*",
        "x-ms-apihub-cached-response""true",
        "x-ms-apihub-obo""false",
        "Date""Wed, 22 Feb 2023 18:21:41 GMT",
        "ETag""W/\"5b-Mp2PQ3TXpicAGnrU8UOXH5yC4vQ\"",
        "Via""1.1 84bf46c54ab0942112fb280e02482cde.cloudfront.net (CloudFront)",
        "Content-Length""91",
        "Content-Type""application/json"
    },
    "body": {
        "error": {
            "message""Missing required parameters: \"token\"",
            "code""001"
        },
        "success"false
    }
}
 
Edit:  I went back into the flow and added a timeout and retry policy of 1 hour under the Create Report settings.  The flow worked this go around, but not sure if that was the fix.
0 Kudos