Survey123 Tricks of the Trade: Make (previously known as Integromat)

52038
123
06-04-2019 03:41 AM
IsmaelChivite
Esri Notable Contributor
18 123 52K

 

In this blog post I will explore a few techniques to take your use of Survey123 within Make to the next level.  I am going to assume that you already know the basics of working with Survey123 and Make. If not, you may want to start with https://community.esri.com/groups/survey123/blog/2019/06/02/getting-started-with-survey123-and-integ...

 

Many more posts like this could be written, because what you can do with Survey123 and Make deserves an entire book, but we need to start somewhere. So here are a handful of ideas. I hope you discover some new things:

 

Working with Survey123 attachments

 

I will start with this one because the topic of working with photo attachments from Survey123 in Make has come up many times before, and it is not entirely obvious how to deal with them.  Say your Survey123 smart form includes a photo and a signature question. Can you work with them in Make? Can you include the photo and signature images as attachments in an e-mail? Can you back-up the images in OneDrive or Box? Yes to all of that and here is how.

 

The trick is using the Make HTTP module, which includes an action called 'Get a file'.  This action takes the URL of an image as an input, which you can get from the payload of a Survey123 record.

 

  1. Feed the Survey123 'watch survey' module with a smart form that includes one or more photo/signature questions.
  2. Use the Get a file action in the HTTP module to download your attachment.

 

 

The payload of 'Watch a survey' includes a collection of attachmentInfo objects. They are uniquely identified with the name of the question generating the attachment and include a url property that can you use to invoke 'Get a file'.

 

Once you have the file, you can do a handful of things with it. Of course, you can now include it as an attachment to an email.... That is a classic one! 

 

 

But you can do more interesting things too. For example:

 

  • Back-up your photos and attachments in Google Drive, Microsoft OneDrive, DropBox.
  • Upload images to Flickr, Instagram, Twitter or other social media.
  • Reduce the size of an image before storing it.
  • Extract metadata from the photo, including its name, size or format.
  • Process the photo with Google Cloud Vision to identify elements within the photo or simply extract text from it.

 

 

 

Automating Survey123 custom reports

 

The Survey123 module includes an action to help you automate Survey123 feature reports. Not familiar with reports in Survey123? We have a video for that here and an introductory blog post too. The Create Feature Report action is pretty much self-explanatory: it takes an input survey, a report template and the objectId of the survey record you want to include in the report.  If the trigger of your scenario is a 'Watch a survey' trigger, then you can use again the payload of your Survey123 web hook to extract the objectId. In this case, it is within the Feature-Result object as shown in the next animation.

 

 

The use of the HTTP module to download files as described above also applies to the outputs of the Survey123 report action. That is, after you create a custom report file, you can download it and include it as an attachment in an email, or upload it to cloud storage or FTP site.   Since many cloud storage solutions include options to automatically synchronize the contents of local and cloud folders, I like to upload the Survey123 report files I create to the cloud so they show up in my computer right away. I know, I am old fashioned, but that feels like magic.

 

When configuring the Create Feature Report action you will notice that at the bottom of the dialog you can expand a window with advanced settings. In there, you will be able to configure the UTC-Offset. This setting will be your friend if you plan to include dates and times in your reports.  Keep in mind that all data within Survey123 -and ArcGIS- is stored in UTC time. Since Make has no real context as from where in the world the report is being invoked, you will need to adjust the UTC offset yourself.

Back to the HTTP module

 

Earlier, we looked at the 'Get File' action in the HTTP module. This time we will revisit the HTTP module but this time to describe its 'Make a request' action. I personally find this action extremely useful, because it allows your scenarios to interact with pretty much any external web service you want. Using the 'Make a request' action you can for example invoke the ArcGIS REST API to update an attribute in an existing feature, or to simply query a feature service. Lets get down to very specific scenarios:

 

  • Make a point- in-polygon query to an ArcGIS feature service to get the postal code of the submitted Survey123 record location. Then make another request to add the postal code value as an attribute of the submitted feature.
  • Use information from a submitted Survey123 record to automatically create a new assignment in a Workforce for ArcGIS project (make a request to add a new feature into the Workforce assignments feature layer).
  • After having invoked Google Cloud Vision to categorize the contents of a photo submitted via Survey123, update the attributes of the Survey123 feature accordingly.
  • Update an image_url attribute in the submitted survey so you can later create a popup in ArcGIS that shows your image directly when the popup is open.

 

 

The mechanics for using the 'Make a request' action imply good knowledge of the target web service your are invoking. I will use next a simple scenario to illustrate the essence of this technique. Say for example we want first to get the location of a submitted survey record, get the current temperature at that location using a weather service and store that temperature value as a GIS attribute of the feature that was originally submitted.

 

Here is how you get the current temperature. OK: so far we are not using 'Make a request' anywhere. We are just setting this up.

 

 

Next, we are going to 'Make a request' to the survey feature layer using the ArcGIS REST API to add the temperature to the temperature field of the submitted record. Specifically, we are going to make a request to the Update Features REST API operation. This operation, as described in the Updates Features ArcGIS REST API Developer documentation, is located at:

https://<featurelayer-url>/updateFeatures

All information needed to construct the URL above is included in the survey web hook payload. It is a matter of combining the surveyInfo.serviceUrl and the feature.layerInfo.id properties, followed by updateFeatures.

 

HTTP_1.gif

 

Again according to the doc, this operation only supports POST requests and the encoded parameters include:

 

  • f to define the output format as json or html. This is optional but handy so we can debug, if needed, the output within Make.
  • token to specify a valid token we can use to securely access the feature layer. This parameter is not needed if the feature layer is shared publicly.
  • features to define the actual updates we want to make in the layer. The content of this parameter is a json object with information about the records and fields we want to change.

Lets do f and token first:

jtoken.gif

 

The most error prone step is adding the exact JSON value for the features parameter. I like to copy the sample JSON that comes in the developer documentation, and then modify it for my own purposes.  It is very important to note that the sample JSON in the documentation must be enclosed with extra brackets as shown in the example below.

IsmaelChivite_0-1667260895343.png

Note that the objectId in green, and the temperature in orange are dynamically populated using outputs from other modules in the scenario. Also note the square [] and curly brackets {} I added

[
  {
    "attributes": {
    "OBJECTID": 14,
    "temperature_c": If a number do not use quotes,
    "city": "If text, use quotes"
    }
  }
]

 

You will see yourself going through some trial and error until you get it right, but since you can easily look at the output of the 'Make a request' operation, it typically does not take very long before you figure things out.

 

Using the 'Make a request' action you can do a lot of things. Updating attributes is one of them, but you can really do many others.

 

A nice complement to the 'Make a request' action in the HTTP app are the many out of the box tools included in Make to parse XML, JSON, HTML and the many functions to handle text, dates, arrays and much more. They will help tremendously when you need parse responses from the web services you are invoking.

 

Handling Errors

 

This is all getting very interesting, but as you create more sophisticated scenarios you will face situations where you need to handle run-time errors.  If you are dealing with attachments, what happens if the end-user does not submit one? Or what happens if you hit an external web service and you get a bad output, or a time-out?

 

By default, when an unexpected error occurs, the execution of the Make scenario is stopped at that point but you can handle errors in other ways. You can for example ignore the error and continue executing, or you can choose to branch off the execution to do different things. This is all described in the Introduction to error handling tutorial in the Integromat Help Center.

 

The following animation shows how you can add an error handler in case the 'Get file' action fails downloading a non-existing ArcGIS attachment. In this case I chose to simply invoke the Gmail connector to send an e-mail without attachments. If an ArcGIS attachment is found, it gets added to an e-mail, otherwise the email is sent without attachment.

 

 

To learn more about error handling in Make, I recommend reading the Advanced error handling help topic.

 

Connecting Make to an ArcGIS Enterprise instance

 

By default, the Survey123 modules in Make will connect to ArcGIS Online, but you can actually make Make work against your own instance of ArcGIS Enterprise.

 

Before we start, it is important to highlight that Make needs to communicate with your own ArcGIS Enterprise instance, and this will not be possible if ArcGIS Enterprise is running completely behind your firewall.  You need to make your ArcGIS Enterprise instance is available to Make over the internet. ArcGIS Enterprise administrators are familiar with this concept, which is often resolved by exposing ArcGIS Enterprise through a reverse proxy in the DMZ, although there are other options.

 

A second step, involves explicitly registering Make as an app in your ArcGIS Enterprise instance. This step is necessary for Make to be able to securely authenticate against your ArcGIS Enterprise. Follow these steps:

 

  • Log into your portal and go to Content.
  • Add a new Item of type Application.
    • Type: Application
    • Title: Make (or any other name you like)
    • Tags: Survey123 (Same here, any tag you want)

 

 

 

 

All the above is necessary for Make to be trusted before you can initiate a secure connection to your Enterprise instance.

 

Now, it is time to create a new Connection within Make to your ArcGIS Enterprise instance.  While adding a new web hook in the Watch a survey or Create a report modules, choose to create a New Connection:

 

  1. In the Create a New Connection dialog, expand the advanced settings.
  2. Add the https URL of your ArcGIS Enterprise instance, including the web adaptor name.
  3. Populate the AppID and AppSecret properties using the App Registration information from the Application item you created before in your portal.
  4. Click on continue to authenticate against your ArcGIS Enterprise instance.

 

 

You will be able to re-use this connection again and again when creating new web hooks.

 

Add and Edit Trigger Events

 

Initially, we added support for Add trigger events, meaning that the Survey123 web and field apps would be able to trigger a web hook when a new record was submitted from a smart form.  We are progressively adding support for edit trigger events as well, so you can launch your Make scenarios when a record is updated too.

 

Support for edit trigger events was added in the Survey123 web app in our https://community.esri.com/groups/survey123/blog/2019/05/24/comet-halley-update-may-23-2019. The Survey123 field app will catch up starting with version 3.5 (scheduled  to be released on June 27, 2019).

 

If you do not now how to update records using the Survey123 web app, check the https://community.esri.com/groups/survey123/blog/2019/05/24/survey123-tricks-of-the-trade-editing-re... blog post.

 

While you can configure your Make scenarios to be triggered by Add and Edit events, please be aware that the Survey123 field app will not honor this setting until version 3.5. As of 3.4, only the Survey123 web app supports web hook edit triggers.

 

Below, you can see how you can configure Make to define which triggers you want to activate in your web hook.

 

 

If you happen to activate both of them, you can use the output of the Watch survey module output to tell which event triggered your scenario. This is handy in case you want to build a single scenario and add branching logic to handle adds and edits differently.

 

The trick here is that the eventType property is only included in the payload once there is an actual submission of data. You will actually not see the eventType property pre-populated in the output, until you send data.  When working with eventType, I typically put the scenario in listening mode (Run once) and submit data to populate the property. This helps me build the rest of the scenario more easily. Once the scenario is running for good, this property will change accordingly.

 

 

 

Blueprints

 

Did you know you can export your scenarios as a JSON file and import them later? You can, but only if using a paid subscription to Make.

 

 

I included a blueprint of the weather sample as an attachment to this blog so you can play with it. All you need to make it work is a survey with a geopoint question and an additional field where you can store the temperature. Make sure you adjust the name of your temperature field in the features parameter of the 'Make a request' module. By now I am guessing you do not need that I create another gif. I am completely "giffed-out" for today.

 

As I said at the very beginning, there is so much to write about Survey123 and Make, so this is just a starting point. If you feel there is a particular topic of your interest that should be covered in more detail, do not hesitate asking.

I hope this blog post will give you some ideas to have more fun with Survey123 and Make. I also wish some of you will share some of your creations. Share a screenshot of your scenario and a brief description of what you accomplished with it, or even better the blueprint.  Add them as comments below to inspire others!

123 Comments
DerrickWestoby1
New Contributor III

Thanks Ismael - I'm loving Survey123 & Integromat so far. 

Are you aware of any attachment/file size limitations with the HTTP Get a file module, or the Outlook 365 module?   It looks like reports that are over 4mb are failing at the Office 365 module, but I haven't tried using Gmail.  Our exchange server is set at 20mb, I believe. 

FFSL_-_JustinJohnson
New Contributor III

You mentioned in your intro that there is a way to extract a photo attachment and the signature image from a Survey123 payload, but I'm not seeing exactly how you do that.  I have used the "HTTP Get a File" module to input the URL of the attachments from the form, and send them in an email message, but it seems to only work with one attachment URL; the photo or the signature. 

Do you need both URLs in that HTTP Module?  And if so, how do you include both? Here is what it looks like:  

Integromat Survey123 HTTP Module URL field

Thanks!

JamesTedrick
Esri Esteemed Contributor

Hi Justin,

You would need 2 'Download a File' operations - one for each attachment.

FFSL_-_JustinJohnson
New Contributor III

I was able to embed and send both the photo attachment and signature in a Gmail message without using the HTTP "Get a File" action.  This does what I originally wanted to:

This is part of the HTML Content box in the Gmail "Send an Image" action. The signature and attached image are included in the email message sent to the recipient.

by Anonymous User
Not applicable

I have been receiving an error when attempting to use the "Get Feature Report" workflow and I was wondering if you have any insight on how to fix this?

I have also noticed that my scenario's that contain the Excel module have not been working either and I have been told that the Integromat development team is working on it. This started occurring after I posted my blog on how to dynamically direct data; hopefully no coincidence between the two.

JamesTedrick
Esri Esteemed Contributor

Hi Mike,

I would say the two issues are unrelated, as they involve different modules.  The error in the Survey123 module involves parsing and analysis step needed to determine the information about the form so that it can be used in Integromat.  Could you share the form files (the XML file in particular)?

JamesTedrick
Esri Esteemed Contributor

Hi Mike,

We identified the issue and updated the Integromat connector - you should see it working now.

CindyKamigaki
New Contributor

Hi, I was able to get the Survey123 Weather Integromat scenario to work.  However, it populates the field on the back end and I was hoping to have it populate the temperature in the survey for the fieldworker to see, so he/she can determine if work can be performed.  Is this possible?

IsmaelChivite
Esri Notable Contributor

Hi Cindy. If you would like to dynamically show the temperature in the survey I suggest you research the use of custom JS functions with the puldlata function as described in our Early Adopter Program

CindyKamigaki
New Contributor

Hi Ismael,

I’m getting closer to getting the app launched. I found this documentation on custom pulldata https://earlyadopter.esri.com/project/article/item.html?cap=e69ef91f45744b98882c651f7b518eb7&arttypeid=%7B5a8e51ed-4a87-43fe-a67d-2b7829af130f%7D&artid=%7BD2F0ED6D-1ADC-43EF-8A87-FCCF09381DB3%7D. I downloaded the zip file and I’m still having issue with the current temperature showing up in the app. I received a key from Open Weather and inserted into the CVS file and still no luck.

I’m not fluent in Javascript, so I’m think that might be where I’m missing something? Do I need to insert the key into the Javascript code?

Thanks for any clarification you can provide.

Cindy Kamigaki| IT/GIS Manager

Town of Frederick | 720-382-5653

ckamigaki@frederickco.gov<mailto:ckamigaki@frederickco.gov> | www.frederickco.gov

<http://www.facebook.com/townoffrederick> <http://www.twitter.com/townoffrederick>

Click here<https://www.youtube.com/watch?v=9iueYJOGlk0> to see what matters to us!

This electronic mail message and any attached files contain information intended for the exclusive use of the individual or entity to which it is addressed and may contain information that is proprietary, privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any viewing, copying, disclosure or distribution of this information is strictly prohibited. If you have received this message in error, please notify the sender, by electronic mail or otherwise and delete the original message from your computer.

RustyCook
New Contributor II

Thank you so much for the information. I had a question in regards to updating an existing feature layer.  In the example above you used the survey feature layer to add new information (temp); is there anyway to update a different feature layer based on certain fields that are filled out in S123?

Example:  I have a feature layer (hosted) of critical infrastructure, and within that layer I have an attribute with the location's name and then another one showing their status (i.e. damaged, not damaged, etc.). So if I created a survey that allowed someone to go in and choose their location by name (i.e. drop down menu), then choose a status (radio button) and then on the back end of survey create a hidden question that autofills a number field that matches to the critical infrastructure's feature layer ObjectID based on the name selected, would it have the capability to update the existing Critical Infrastructure feature layer's "Status" attribute using the status question filled out within the survey by matching my hidden question/number to the ObjectId using the "Make a Request" HTTP tool (see below), or is there a different way to achieving this?  Hope that makes sense and thank you in advance!

URL: https://<criticalinfrastructurefeaturelayer-url>/updateFeatures

Method: POST

Key: features

 

Value:

{

    "attributes" : {
      "OBJECTID" : hiddenquestion,
      "Status" : "status"
    }

}

LucianoCampagnolo1
New Contributor II

Now,  let me anticipate that we still have not figured out just yet how to work comfortably with repeat data within Integromat.

Hi! regarding repeat data: Is this functionality covered with other automation tools? ie: Microsoft Flow?

Best regards,

Luc

FFSL_-_JustinJohnson
New Contributor III

On further testing, this doesn't appear to work.  When I submit a survey, the attachments will be sent to me, but not included in the email sent to anyone else on the list.  They appear as broken links.  

KenMorefield
Occasional Contributor

Ismael Chivite

Hi Ismael, I'm wondering if you can help me out with a similar workflow.  Here is a description of what I have set up.  I am accessing a 3rd party Wildlife Telemetry Collar API which allows me to get collar locations in near real-time.  I'm using the HTTP module in Integromat to access that collar API.  I then parse the response with the JSON module.  Using another HTTP module, I run a spatial intersect query with the JSON results against a hexagon grid feature service (in ArcGIS Online) in order to get the intersecting hexagon grid ID.  These query results are then passed to another JSON module (for parsing) and then I add one more HTTP module which takes collar data (CollarID, CollarDateTime, Latitude, Longitude) and coupled with the Hexagon Grid ID - I append this data to a point layer residing in ArcGIS Online.  This all works great! 

In ArcGIS Online, I then "join" this resulting point layer back to the hexagon layer and create a view layer from that (resulting in hexagons with the added collar data).  In a web map, I filter the hexagons to only show those from the last 24 hours.  All of this works great, and what I'm left with is an "almost" real-time web map that shows the location of my collared animal (a wolf in this case) represented by a 10 square mile hexagon.  The wolf was somewhere within that hexagon at that date/time.  The intent is to make this a public facing web app - where ranchers, farmers, and other members of the public can go and see a general location (hexagon) of where the wolf was in the last 24 hours.  This all works very well right now.  Currently, none of the services, web maps, or web apps have been set to public.  Now for my issues:

The two HTTP modules that call my feature services in ArcGIS Online (one to perform the spatial intersect and one to perform the "add features" append) require tokens to access the services.  These tokens time out after about two weeks.  I have had to go into the REST API for these services and get a new token and paste the new tokens into my Integromat scenario.  Do you have any ideas or advice on how I might be able to automatically generate a new ArcGIS Online token everytime the scenario is run, so that the scenario doesn't break every two weeks when the token expires?

Thanks so much!

Ken

IsmaelChivite
Esri Notable Contributor

Hi Ken Morefield

  I think it will be better if you create the token dynamically when the scenario executes.  In your case, since you are not triggering your scenario by watching a Survey123 survey, you need to manually get the token through the REST API.

  You can use the HTTP module to Get an access token | ArcGIS for Developers  You will need to make a POST request to https://www.arcgis.com/sharing/rest/oauth2/token and then pass parameters as described in the help topic.  It is pretty easy to setup, particularly if you create the Application right from the ArcGIS Developers site, so you can get an appId and all of that straight-away.

KassandraRodriguez
Occasional Contributor

Hi there I'm wondering if anyone has found the solution to this. I have a survey with 4 options to add attachments but they aren't necessary to add attachments. When someone attaches only 3 of the 4 there is an error and it doesn't send the email, is there an easier way to make it send regardless? I know it describes above that you can have an error handler to send an email anyways but that would be a lot of scenarios in the layout with 4 potential attachments and I have 3 different emails to send to. Thanks for any help

HarkeeratKang
New Contributor II

I am trying to configure a use case in Integromat when data gets submitted in Survey123. I want to query the data that gets submitted in my survey so I can compare the seal number for a given location A, B, C etc. If the last submission seal number does not match the current seal number then I want to send an email saying that the current seal number submitted does not match the last submitted data for the location. 

 

I have successfully configured the HTTP module's Make a request action by invoking the ArcGIS REST API to query a feature layer. The query uses date field to order the fields in DESC order.  I am able to parse the results using Parse JSON. The returned set is all the features for a given location ordered by date field (date_submitted). How can I compare row 1 seal number to row 2 seal number when the features are sorted by date_submitted field?

 

I have included screen shots of my scenario, HTTP request and JSON - Parse JSON.

 

I am not sure if I need the Iterator here. The current workflow runs without errors. An email gets generated but not with the desired results.

 

Thanks.

JamesTedrick
Esri Esteemed Contributor

Hi Rusty,

It sounds like you have the correct approach for this by using a REST request; I normally prefer using applyEdits over updateFeatures.

JamesTedrick
Esri Esteemed Contributor

Hi Luciano,

At this time webhooks do not submit repeat information, regardless of the environment being used to process them.  This is something we plan on including in the future.

JamesTedrick
Esri Esteemed Contributor

Hi Kassandra,

It may be a little complicated in your case, but you can use Routers to engage various paths of code- see Router – Integromat Support .  This would let you set up slightly different e-mails based on which attachments were submitted (essentially a series of branches based on which photos are present; you can look at the length of the array of a given attachment name).  I would also point out the use of a Data Store as a workaround for the lack of a converter (see Converger – Integromat Support  ), to aggregate the post-download steps.

JamesTedrick
Esri Esteemed Contributor

Hi Harkeerat,

If you're only needing to review the most recent and next most recent, you should be able to use the get() function to grab the values to compare - see General Functions – Integromat Support  

JamesTedrick
Esri Esteemed Contributor

Hi Cindy,

You will need to follow Open Weather's API instructions (I'm guessing Current weather data - OpenWeatherMap  - if that's the case, it looks like a key is not needed).  One way to debug this is to try the URLs you are requesting in a browser to make sure the result is what you would expect.

KirkJones
New Contributor II

I am trying to set up a scenario that will send multiple photos from a survey and and attach them to a single email.  I set up two HTTP 'Download a File' operations, one for each photo.  At that point how do I bring both of those modules back into a single email?

JamesTedrick
Esri Esteemed Contributor

Hi Kirk,

If you know that the survey will have both attachments, you can place them linearly (in line with each other), instead of being in separate branches, as you currently have.

Otherwise, this would ideally, this would be supported via an 'converger' object - Converger – Integromat Support, but at this point it is not available.  Instead, there are workarounds to store the values of one branch and read them in another (read the 'Workarounds' section of the linked document).

GeeFernando
Occasional Contributor

Love these features !!

  1. Will the 'create feature report' module be included in MS Flow?
    • Some of my clients already have access to Office 365. And it would nice if I could leverage that.
  2. Also, I noted that dates are still presented in UTC - even though I changed it to UTC + 10 - as per the video - Survey123: Create feature reports with Integromat - YouTube
    • using ArcGIS Online and Survey123 3.5 on an iPad Pro (2nd Gen)
Jim-Moore
Esri Regular Contributor

Hi Gee Fernando‌ 

Thanks for the feedback! Regarding your queries:

  1. We have this logged as a feature request - please see James' comments on this here.
  2. Thanks for reporting this issue. We already have it logged as a bug and we're looking into it; I'll endeavour to keep this thread updated with any progress.

Best regards,

Jim

DominicRoberge2
Occasional Contributor III

Hello,

we have a survey that we would like to use to collect info about "point of contact" in town and once a year sends it back to the end-user to "validate" the info. So we are excited about the new EditData in the Watch Survey in Integromat.

However, when using the new functionality (EditData) in Integromat, we only get the attributes that were updated (if any)... How can we get access ALL the attributes regardless if they were updated or not?  The reason is  that we are sending an email with an attached report based on the Address type (Residential, commercial, etc...)

below is a sample of web form with a subset of questions...In this case, Address Type didn't change but name changed

in Inegromat, the task to watch a Survey with Editdata ONLY returns the attributes that were updated (here name, video format and notes). 

So in this case, the filters before sending the emails are not working.

Any ideas how to solve this issue?

Thanks!

AdminAccount2
Occasional Contributor II

Ismael Chivite wrote:

Hi Ken Morefield

 

  I think it will be better if you create the token dynamically when the scenario executes.  In your case, since you are not triggering your scenario by watching a Survey123 survey, you need to manually get the token through the REST API.

Okay - but what if you ARE triggering your scenarios by watching a Survey123 survey? What is the process required to prevent the ArcGIS Connection token from expiring every two week? 

Jim-Moore
Esri Regular Contributor

Hi Gee Fernando‌, just an update: the issue with UTC offset in the Integromat feature report module is now fixed. You should now see the selected UTC offset applied to dates & times in your feature report.

Best,

Jim

CarlAlexander
New Contributor III

I am wanting to add the feature report back to the Survey123 feature that was created.  I can get the url fine, but I believe I am having issues wit the json syntax.  I have tried a bunch of differet things, but I keep getting this generic error.

  • Cookie headersArray
  • Data
    {"error":{"code":400,"message":"","details":["Unable to add attachment to the feature."]}}
  • fileSize
    90

Here is what I have for my syntax.  Any suggestions?

CuartaOportunidad_Local_IVC
New Contributor II

Hello

I have a problem with integromat.
In the survey123 module to create a feature report, when I select the connection to the portal, after the survey, an invalid token appears.
I do not understand why.

The initial survey module configuration is

I neeeeed help!

JamesTedrick
Esri Esteemed Contributor

Hi Luisa,

It is likely that you need to refresh the connection to your ArcGIS organization from Integromat - click on the 'Connections tab' in the left when you first login and check to see if any need to be reauthorized.

TijsLips
New Contributor III

Hi All,

I have the exact same 'wish'. Would be great to know if this is possible.

Thanks a lot!

Tijs

Alber_Verster
Esri Contributor

Hi Ismael,

You mentioned that the HTTP Make a Request function only supports POST Requests. Why is that?

No chance for a GET request?

JamesTedrick
Esri Esteemed Contributor

Hi Albertus,

This is something that would be better addressed to Integromat, as that is an aspect of their system.  That being said, the use of the POST method is the appropriate method when viewed from a REST API design as that is the method to submit data; as the name indicates, GET is the appropriate method to retrieve data (see Representational state transfer - Wikipedia ).

Alber_Verster
Esri Contributor

Hi James,

I am looking into a workflow where I intend on retrieving a submitted survey (record) along with its related records (from the repeats section of the survey).

From this blog, I deduce that the HTTP GET request is therefore not functioning. Is this correct?

Regards

Alber

TijsLips
New Contributor III

Hi ESRI Team,

Could you help Dominic Roberge and me with our question above? It would be really nice if I could update stakeholders of the feature when a change has been made via a survey - but in a way they also can see to which feature the change has been made. E.g.:


Person A changes the structural state of building B from 'normal' to 'ramshackle'. Now I can automatically generate an email that says "Status has changed from normal to ramshackle, but I cannot add "Status of building B has changed from normal to ramshackle". 

Thanks for your support!

Groet,

Tijs

JamesTedrick
Esri Esteemed Contributor

Hi Albertus,

Sorry, I was thinking you referring to the incoming HTTP request that triggers the webhook.  Form what I see, the 'Make a Request' module does support GET:

If you're having trouble with that, I would suggest contacting Integromat, as you're asking about a feature of one of their built-in modules, not the Survey123 connector.

JamesTedrick
Esri Esteemed Contributor

Hi Tijs,

You can query the feature (using the 'Make an HTTP request' action) that was edited to retrieve the full feature information.

TijsLips
New Contributor III

Thank you James,

I do not understand how I overlooked that part.. Anyway, got it working now!

DominicRoberge2
Occasional Contributor III

Hey Tijs

I am trying to setup the HTTP make a request, the OUTPUT URL is correct (and tested and returns what I am expecting) but my OUTPUT Data is binary all the time, how did you setup your Action?  Thanks for any info you could provide.

TijsLips
New Contributor III

Hi Dominic,

I may not have the neatest solution for you, as I am not a HTTP expert. But this is how I got it working;

1) Below the stream; Watch survey -> Make a request -> Parse JSON

2) In the HTTP widget at URL I put the globalId, as that was part of the payload - the objectId was not:

3) The remainder in the HTTP widget i put as follows:

4) To get the output of this request separated into fields you can use for e.g. an email, I set up the Parse JSON widget by following this video: Tutorial: Working with JSON - YouTube 

Hope this helps!

Tijs

DominicRoberge2
Occasional Contributor III

got it!

I was missing a few tags in my URL, now I got the String and all the info needed. Thanks for your help

PaulSweeney3
Occasional Contributor III

i am using integromat to automate a pdf report and save to google drive Has anyone any success in changing the resolution of an image attached to a survey  for inclusion in an pdf document. I want to capture a high resolution image but i want to reduce the file size of my document as it will quickly use my allowance in integromat. 

NatalieAyala
New Contributor II

I am using Integromat to generate Feature Reports and save them to the OneDrive. When I try to add a photo attachment to the feature report via Integromat or directly through the Survey123 website, the word document is unreadable.

When I try to open the file, I receive the error messages below and then Microsoft Word allows me to recover the file as a new document and all of the data and photo attachment appear perfectly fine. I can't figure out what the issue is here. 

Error Message

Unreadable Message

I believe the Integromat workflow is set up correctly. The issue occurs even when I generate a report directly from the Survey123 website so I think that rules out an Integromat malfunction. I'm using the following code in my template: ${Stations_image|size:0:0:0:125}. When I remove the image from the template the reports are generated without issue. Its only the addition of the attachment that introduces the problem.

Any tips would be much appreciated. 

Thanks!

TrishaSchlake
New Contributor III

Ismael Chivite and James Tedrick

I am trying to use Integromat with our Enterprise Portal, and have followed the steps as outlined above in the Connecting Integromat to an ArcGIS Enterprise Instance section of this blog post. However I am getting this error everytime I try to connect to our enterprise. It lets me see the sign in page of my portal. 

I need to use the Enterprise login: State of Nebraska to login. 

I have been able to enter my username and password, but then it presents me with this screen after a while trying to connect:

It looks like it has to do with the oath/cb based on the above url. 

I made sure that all the redirects were in place. Here they are:

I just copied and pasted them from the blog so they all should be correct.

Our portal is not behind a firewall, so I'm not sure what else to look into.

Would you have anything else to recommend I try? We would very much like to have a webhook connect to a Survey123 app in our Enterprise Portal.

Thank you in advance,

Trisha 

IsmaelChivite
Esri Notable Contributor

Hi Trisha, I suggest you open an Esri Technical Support incident so this can be looked at in mode detail. Diagnosing this may involve having your IT department doing some research in your end to understand why Integromat is not allowed to authenticate.  Esri Technical support at the very least will be able to ensure you are configuring everything correctly in your portal.

It does not seem like you are using Integrated Windows Authentication in your portal, but just a reminder: IWA is not supported with Integromat.

TrishaSchlake
New Contributor III

Hi Ismael, 

Thank you for responding. I have opened a ticket with Esri Technical Support this morning, but am wondering about this IWA limitation. We use Microsoft Azure for Active Directory and our enterprise portal (SAML). Does Integromat still treat our portal the same as if it were IWA? I have also been having issues with Feature Report Templates and see that IWA is also a limitation for that function as well. 

Thanks again, 

Trisha

IsmaelChivite
Esri Notable Contributor

Trisha Schlake‌  If you use SAML you should be good. There may be something missconfigured, but SAML is the way to go if you want to use Windows Active Directory users. I hope Esri Technical Support can help!

TrishaSchlake
New Contributor III

Thank you for reassuring that SAML should work. I appreciate that. Will see what Esri Technical Support says.