Survey123 "Get current weather" in Microsoft Flow

1068
9
Jump to solution
07-19-2019 08:49 AM
EricShreve
Occasional Contributor II

I wanted to know if there is a solution that is available to grab the lat/long of a Survey123 submission and populate it as a location for "Get Current Weather"? I tried this and was unsuccessful in accomplishing the attempted output. I believe their is a workflow in Integromat but I wanted to see if there was a workflow in MS Flow.

 

0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Frequent Contributor

Hi. You got it, almost! The MSN Get Weather Flow app wants you to pass first the latitude (Y) and then the logitude (X) separated by a space. Other than that, you got it right!  Below you have the full process step by step.  You can click on the animation to make it bigger.

View solution in original post

9 Replies
IsmaelChivite
Esri Frequent Contributor

Hi. You got it, almost! The MSN Get Weather Flow app wants you to pass first the latitude (Y) and then the logitude (X) separated by a space. Other than that, you got it right!  Below you have the full process step by step.  You can click on the animation to make it bigger.

View solution in original post

EricShreve
Occasional Contributor II

Ismael,

Spot on for what I needed! Thank you very much.

-Eric Shreve

0 Kudos
CharlesGrant
New Contributor II

I can get this far in setting up the web hook to get the weather.  How do I get the weather attributes I need into the Survey123 table.  For example, I just want the temperature and conditions to auto populate when someone submits a survey.

Thanks,

Charles

JessicaFraver1
New Contributor II

Good question. Was just wondering that myself.  I understand how to set up the Get Current Weather action with this thread, but how can I see that information in the survey record?

JoseBarrios1
New Contributor II

Hi Charles,

I am trying to accomplish the same action that you posted about setting up the web hook to get the capture the current weather condition on a survey. Did you got it to work? Do you have any suggestions on how to accomplish this task?

Thanks,

JB

CharlesGrant
New Contributor II

JB -

Sorry for late response.  I wound up not going the webhook route.  We ended up using a Weather.json file.  In the Survey123, in the calculation field, we had to configure getting XY map location, then using the map coordinate to have the json pull the current weather and temperature.

You have to register with the weather service (it is free) to receive the .json file.  If you need specifics to the service we used, please let me know.

Thanks,

Charles

0 Kudos
SteveRoth
New Contributor II

Charles, I am interested in the specifics of how you were able to make this work.  Any help you could provide would be greatly appreciated.

-Steve

CharlesGrant
New Contributor II

We registered and received an API key through OpenWeather.  You will need to configure fields in Survey123 form.

If you could send me your contact information, I can walk you through it.

0 Kudos
IsmaelChivite
Esri Frequent Contributor

You can use the http action: Using the HTTP action to make requests with Microsoft Flow | Power Automate Blog  to hit the Update Features operation in the ArcGIS REST API: Update Features—ArcGIS REST API: Services Directory | ArcGIS for Developers 

Since you already know the feature layer and objectId of the feature created, you can use all that info to update the Survey123 record with the output from Get Weather.  Also remember that you can have the Microsoft Automate Webhook provide you with an ArcGIS token (needed if you plan to update a private feature layer). Simply add the User Info to the payload of the webhook from the Survey123 website.

0 Kudos