Select to view content in your preferred language

Add attachment, status code 500

385
13
2 weeks ago
abureaux
MVP Frequent Contributor

Using the Add Attachment action in Power Automate, I am getting Status Code 500, which indicates a server issue. 

"body": {
        "success": false,
        "message": "AxiosError: Request failed with status code 500. "
    }

This flow was working fine until last night, and nothing has changed on my server. I am also able to manually upload this file to the appropriate record myself:

abureaux_0-1761924505785.png

 

I'm not sure what the issue would be on my end. Is this an Esri issue?

EDIT: It's worth noting that there are no errors in Server Manager, and everything else (e.g., flows and server tasks) is working properly.

0 Kudos
13 Replies
AkshayHarshe
Esri Regular Contributor

@abureaux That is interesting. Can you please share what steps are you running and what connector you are using?

Thanks,
Akshay Harshe
0 Kudos
abureaux
MVP Frequent Contributor

As mentioned, the 'Add attachment' step, but specifically for the Enterprise connector:

abureaux_0-1761936393553.png

It's in a Do until to try until Success equals true

abureaux_2-1761936444660.png

This is the extent of the explanation I get (raw json above), so not much to go off:

abureaux_1-1761936404566.png

 

0 Kudos
abureaux
MVP Frequent Contributor

I will also add that this flow watches an inbox for lab results. Because this project only allows 1 set of lab results per year, I filter the record for attachments, and then delete all attachments from the current year. This is working properly. So it is finding the correct record in the correct layer and modifying it.

Here it is successfully deleting the attachment I manually uploaded, just moments before failing to upload that same attachment itself:

abureaux_3-1761936813296.png

 

0 Kudos
abureaux
MVP Frequent Contributor

@AkshayHarshe any ideas? I have opened a case today for this as the issue is ongoing and quite an issue.

Case number: 04039745

0 Kudos
AkshayHarshe
Esri Regular Contributor

I don't have many ideas since you are saying that it was working previously. Has something changed on your Enterprise Security wise? Seems like Power Automate doesn't have access to your Enterprise or the feature layer. See if all the necessary ports for webhooks are open if you are using them: 

ArcGIS Enterprise ports

Also, In the Raw outputs of the `Add Attachments` action what version do you see under 

 "arcgis_connector_version""Enterprise 2025.2.0 2025.06.10 1749573699153 361de8",

Thanks,
Akshay Harshe
0 Kudos
abureaux
MVP Frequent Contributor

We upgraded from 11.3 > 11.5 over a month ago. That is the only real change. There is a chance this particular flow, which is the only one using Add Attachment, hasn't run since 11.3. I forwarded the port diagram off to my IT for them to check.

Beyond that, server should be unchanged.

Same connector version as yours:

 
{
    "statusCode": 400,
    "headers": {
        "ETag": "W/\"xyz\"",
        "arcgis_connector_version": "Enterprise 2025.2.0 2025.06.10 1749573699153 361de8",
        "X-Powered-By": "Express",
        "x-ms-environment-id": "default-xyz",
        "x-ms-tenant-id": "xyz",
        "x-ms-dlp-re": "-|-",
        "x-ms-dlp-gu": "-|-",
        "x-ms-dlp-ef": "-|-/-|-|-",
        "x-ms-mip-sl": "-|-|-|-",
        "Timing-Allow-Origin": "*",
        "x-ms-apihub-cached-response": "true",
        "x-ms-apihub-obo": "false",
        "Date": "Tue, 04 Nov 2025 21:41:23 GMT",
        "Content-Length": "91",
        "Content-Type": "application/json"
    },
    "body": {
        "success": false,
        "message": "AxiosError: Request failed with status code 500. "
    }
}
0 Kudos
AkshayHarshe
Esri Regular Contributor

@abureaux That is weird, Can you share a screenshot of your Add attachment inputs. I am curious because, your delete attachment is working.

It could still be uploading/ creating a file that is somehow blocked.

Thanks,
Akshay Harshe
0 Kudos
abureaux
MVP Frequent Contributor

From the simplified test I set-up. All I am doing is getting a file, and then trying to upload it.

abureaux_1-1762443548639.png

Again, I can manually upload a file to this same FL. And in this same flow, I can even Query Attachment and Delete Attachment successfully:

abureaux_2-1762443635545.png

It really is just "Add Attachment" that isn't working:

abureaux_3-1762443669592.png

 

0 Kudos
AkshayHarshe
Esri Regular Contributor

I think attachment name needs an extension .pdf. See if that works. 

Thanks,
Akshay Harshe
0 Kudos