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:
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.
omg... Well, I just deleted my last post. This is working again!
The problem? utcNow() and/or special characters...
I changed the file name from "Test-utcNow().pdf" to "Test.pdf" and it is working again. I only thought to test this when I compared my simple flow with my main flow and realized the file name structure was the same.
I will follow up with the Esri rep as this sounds like a bug on your end.
I'll poke at this more tomorrow. But in my quick testing:
| Works | Doesn't work |
| Test.pdf | Test<utcNow()>.pdf |
| Test 2.pdf | Test2025-11-06T22:33:20.0657585Z.pdf* |
| Test-2.pdf | Test2025-11-06T22:33:200657585Z.pdf |
| Test~!@#$%^&*()_+=-{}][:"';?><,./2.pdf | 5:5.pdf |
| Test2025-11-06T2233200657585Z.pdf | |
| Test2025-11-06T223320.0657585Z.pdf | |
| A:5.pdf |
* Note that this is the outcome of "Test<utcNow()>.pdf", just as plain text.
After test #1 of the Doesn't work side failed, I wanted to test if it was the expression causing the issue, or a character in the utcNow() output that was. I narrowed it down to the : character. Problem is, I already tested the : character when I put in a bunch of random special characters into the string (test #4 of the Works column).
@AkshayHarshe please see the final two tests in each column. This is SUPER specific issue where the : symbol causes the issue only when surrounded by numbers (e.g., in a time stamp)
@abureaux Thanks for giving it a thorough test run. I will try to reproduce this issue at my end and see if this is related to the connector or the Add attachment api. I feel this might be an issue with the API since we just send all the request to the API directly. Did you say this was working with the same file name through MapViewer or the Add attachment endpoint?
Add attachment.
The one thing I wasn't able to test (which may be related to the error) manually uploading a file with a date/time tag as windows doesn't accept the : character in file names. As such, I can't try manually uploading a file named , for example, "Test2025-11-06T22:33:20.0657585Z.pdf".