Attach Survey123 feature report from Make.com as feature attachment on ArcGIS Online

I have a scenario setup in Make to watch a survey from Survey123, create a feature report using a template .docx, get a PDF file using the HTTP module, and email it to my colleague. Is it possible to also attach this PDF to a feature on ArcGIS Online as a feature attachment? I think I am getting close but need help getting to the finish line.

I am trying to use the HTTP module to POST the attachment to ArcGIS Online, but that’s where I am hung up. Thank you in advance!


I think I am getting closer but still can’t get it to work. Any ideas?


Welcome to the Make community!

Thank you for providing screenshots of your modules. However, there doesn’t seem to be any question being asked here.

Are there any errors generated by any module? What issues are you facing?

1. Screenshots of error messages

Please share screenshots of any error messages or issues. It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

This is great, thank you @samliew ! The issue I am experiencing is that the resulting feature report from Survey123 is not attaching to the feature on ArcGIS Online after the scenario runs. I suspect its either how I have the HTTP module setup to POST to ArcGIS Online, or its a setting in the actual feature layer on ArcGIS Online.

I have attached the Blueprint that was exported from the scenario.
blueprint.json (85.3 KB)

I have also downloaded the output bundle for the last HTTP module. It is below.

[
    {
        "statusCode": 200,
        "headers": [
            {
                "name": "content-type",
                "value": "application/json; charset=utf-8"
            },
            {
                "name": "content-length",
                "value": "72"
            },
            {
                "name": "connection",
                "value": "close"
            },
            {
                "name": "date",
                "value": "Tue, 06 Feb 2024 13:43:22 GMT"
            },
            {
                "name": "cache-control",
                "value": "no-cache"
            },
            {
                "name": "pragma",
                "value": "no-cache"
            },
            {
                "name": "expires",
                "value": "-1"
            },
            {
                "name": "vary",
                "value": "X-Esri-Authorization"
            },
            {
                "name": "request-context",
                "value": "appId=cid-v1:02d88829-cd35-4b36-83db-f89bb9f85514"
            },
            {
                "name": "x-arcgis-upstream",
                "value": "us1h01c00"
            },
            {
                "name": "strict-transport-security",
                "value": "max-age=63072000"
            },
            {
                "name": "x-arcgis-trace-id",
                "value": "000000000000000024a36bb0338e1aac"
            },
            {
                "name": "x-arcgis-correlation-id",
                "value": "00-000000000000000024a36bb0338e1aac-b61c20cf68c1fad8-00"
            },
            {
                "name": "x-arcgis-instance",
                "value": "i7tdixsfq000000"
            },
            {
                "name": "access-control-allow-origin",
                "value": "*"
            },
            {
                "name": "x-cache",
                "value": "Miss from cloudfront"
            },
            {
                "name": "via",
                "value": "1.1 4eed67f4be7da2537d3407735b8962a8.cloudfront.net (CloudFront)"
            },
            {
                "name": "x-amz-cf-pop",
                "value": "IAD55-P4"
            },
            {
                "name": "x-amz-cf-id",
                "value": "4iOipLKz8Q2FzPLOWcHWj8uXodqq8iqx6Bs2R2DhPp6hfqJ2uc2n0w=="
            }
        ],
        "cookieHeaders": [],
        "data": "{\"error\":{\"code\":400,\"message\":\"Invalid URL\",\"details\":[\"Invalid URL\"]}}",
        "fileSize": 72
    }
]

I am fairly new to Make.com, so I appreciate your patience and assistance with all of this!!!

A.

What is an example output bundle of the trigger module [1]?

B.

According to the documentation for Add Attachment, the URL format is

https://services.myserver.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0/818654/addAttachment

Could you verify if this is correct in the Input bundle for module [13]?

You can view previous scenario runs from the History tab under the scenario name/title. Click on the purple “Details” buttons on the right of the latest entry, then click on the white speech bubble on the modules to view the Input and Output bundles.

Screenshot_2023-09-12_110941

C.

Just a guess: I think you should be using an ArcGIS token here, and not a token coming from another service.

Screenshot_2024-02-07_110234

2 Likes

Thank you again for your time @samliew .

I made 1 small adjustment to the URL and its working now! I copy and pasted the feature service URL from ArcGIS Online into the URL input instead of using the built in dynamic URL.

Essentially it went from this:
MakeAttachment_old

To this:
MakeAttachment_new

3 Likes

Excellent! I’m glad you managed to figure it out!

It’s always good to check the dynamic variables if something’s not right, to see if they were set to expected values.

You can always review previous scenario runs from the History tab under the scenario name/title. Click on the purple “Details” buttons on the right of the latest entry, then click on the white speech bubble on the modules to view the Input and Output bundles.

Screenshot_2023-09-12_110941

This way you can see what was used last, without having to re-run the scenario.

2 Likes

Thank you for the tips @samliew !

2 Likes