azure-logic-appsworkflow-definition-language

How to convert xml to EDI x12 855 message in logic app?


How to convert xml to EDI x12 855 message in logic app? i used Transform XML then i used Encode component there i get output as enter image description here

when i try to add decode component in logic app flow it shows an error like, Unable to process template language expressions in action 'Decode_X12_message' inputs at line '1' and column '1535': 'The template language function 'base64ToString' expects its parameter to be a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#base64ToString for usage details.'. and i used "@{base64ToString(item()?[body('Encode_to_X12_message_by_agreement_name')?['Payload']])}" in code view of decode component. How can i solve this and how can i generate EDi x12 855 from XML input? please provide me the workflow components to be used and workflow definition language for specific component.

Here is my logic app workflow enter image description here


Solution

  • Why are you using item(), you only need:

    @{base64ToString(body('Encode_to_X12_message_by_agreement_name')
    ?['Payload'])}