Error decoding X12 message with Logic Apps - Delimiters are not unique

OmarAtieh-8848 0 Reputation points
2024-02-15T15:15:53.9866667+00:00

Hello, I am setting up a logic app to process ANSI X12 messages (flat text file, not in xml format). I have an office 365 email trigger (When a new email arrives (V3)), where I fetch an email containing an EDI file as an attachment, I am retrieving the attachment using the following expression in the input of the decode step, and attempting to decode it.

triggerOutputs()['body']['value'][0]['attachments'][0]['contentBytes']

I am providing a valid message and I can see it when I view the details of the run in the "run history" I can see the flat text message displayed correctly as input for the decode step, my issue is that the decode fails with the following reason: {   "errorMessage": "Error: 1 (Miscellaneous error)\r\n\t522: Delimiters are not unique, segment and component separator are the same\r\n\r\n",   "statusCode": "BadRequest" } My ISA segment clearly has two different delimiters, (private information is redacted from sample below):

ISA*00* *00* *01*000000000 *01*999999999 *240201*1531*U*00401*000000000*0*P*>~

Can someone help or point me to the right direction?
I can provide more information if needed. Thanks in advance!

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,995 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Mike Urnun 9,786 Reputation points Microsoft Employee
    2024-02-28T23:16:29.28+00:00

    Hello @OmarAtieh-8848 - Sorry for the late reply. Were you able to resolve this issue? The error message documented here which is originating from the underlying BizTalk server. If you're still encountering this issue, send us an email at azcommunity@microsoft.com with "attn: murnun" in the subject line, and the URL of this thread in your email.

    0 comments No comments

  2. Youcef, Marc (Luxembourg) 1 Reputation point
    2024-06-28T14:54:51.6533333+00:00

    I have same issue, did you manage to resolve it?

    Thanks

    0 comments No comments