LogicApp failure when attaching multiple files to email.

Devika Dev 25 Reputation points
2025-08-22T16:53:23.03+00:00

After a recent upgrade to Logic Apps, the existing code that handles email attachments started failing.

Specifically, the failure occurs when attempting to attach multiple files as an array to an email.

This functionality was working prior to the upgrade,so I suspect that a feature may have been removed or modified during the update.

Has anyone else experienced similar issues after an app update?

Are there any known changes to email attachment handling in recent releases?

Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.


Answer accepted by question author
Rakesh Mishra 11,440 Reputation points Microsoft External Staff Moderator
2025-08-28T13:29:33.1533333+00:00

Hi Devika Dev,
Here is a summary of what we discussed over private messages.

Thank you for sharing the workflow details. We did below change in the workflow Json to fix the internal server error.

  1. While appending attachments to attachment array, the name and contentBytes were in camel case. We need to add pascal case for the field names like below.
       { 
        "Name": "test2.txt", 
        "ContentBytes": "@base64('hello again')"
       }
    
  2. There were 2 foreach loops and Send email action was configured to run after first loop completion. Added second loop in runAfter like below. This will ensure the value in attachment array is set and then sent.
       "runAfter": {
    					"First_For_each": [
    						"SUCCEEDED"
    					],
    					"Second_For_each": [
    						"SUCCEEDED"
    					]
    				}
    
    

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. hossein jalilian 13,365 Reputation points Volunteer Moderator
    2025-08-22T17:15:19.98+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    The most frequent cause is port 445 being blocked by ISPs, VPNs, or firewalls, which interrupts SMB connections. Other issues include encryption or protocol mismatches, storage account firewall or VNET restrictions, and credential problems if access keys are not saved properly. Disconnections may also result from idle timeouts, especially on Linux, where keep-alive settings or updated kernels can help. To troubleshoot, first check if port 445 is open; if not, alternatives include using Azure File Sync with SMB over QUIC (443) or REST-based tools like Storage Explorer. Ensuring proper firewall rules, updating encryption settings, persisting credentials, and keeping the File Sync agent updated are key steps. Finally, reviewing SMB logs and error codes helps identify whether the issue is caused by network, authentication, or timeout failures.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.