Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Initialise variables - string cutting off input?

(0) ShareShare
ReportReport
Posted on by 26

I am running a flow when an email arrives, trying a different method

p1.png

 

The email is as follows

 

Membership Number: 123456768
Application Reference: xxxxxxx-56a3-427f-b18d-21b261d5db77

Employer

Exists in CRM: True
Crm Id: xxxxxxx-2dae-e411-9401-005056a04b19
Employer Code: 123456
Name: a large company that is down the road from a smaller one

Address Line 1: the road
Address Line 2: the street
Address Line 3:
City: Romford
Country: United Kingdom
Post Code: AA01 xyz

 

The variable is just initialised as a string

 

p2.png

 

yet looking at the input of the compose it has shorted the string

 

Membership Number: 123456768
Application Reference: xxxxxxx-56a3-427f-b18d-21b261d5db77
Employer
Exists in CRM: True
Crm Id: xxxxxxx-2dae-e411-9401-005056a04b19
Employer Code: 123456
Name: a large company that is down the road from a smaller one
Ad

 

So I am guessing the string is limiting to a certain number of characters

 

How do I increase the size

 

Cheers

 

 

  • v-yetonggu-msft Profile Picture
    on at
    Re: Initialise variables - string cutting off input?

    Hi @smallzoo ,

    Please switch to classic designer.

    vyetonggumsft_2-1711347823197.png

    Please add Email body into Html to Text.

    Convert the body of an email from HTML format to text.

    Of course, you can use expressions to get the Membership Number, and other fields in the email body.

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1711347495367.png

    vyetonggumsft_1-1711347725499.png

     

     

    split(outputs('Html_to_text')?['body'],variables('ParseEmail'))[0]

     

     

    Best Regards,

    Sunshine Gu

     

  • smallzoo Profile Picture
    26 on at
    Re: Initialise variables - string cutting off input?

    Found the issue. I was (as per other suggestions on this site) using body preview for the compose but  this cuts off the body text. However if I use Body instead then I cant use the split expressions as its all in html

     

    It all works well if I use Body Preview except of course its cuts off the text !

     

    p2.png

    e.g. Output from the email is

     

    ......<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"><div class="WordSection1"><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="">Membership Number: 123456768</span><br>Application Reference: xxxxxxx-56a3-427f-b18d-21b261d5db77<span style=""></span></p><h2>Employer</h2><p class="MsoNormal"><strong><span style="font-family:&quot;Calibri&quot;,sans-serif">Exists in CRM: True</span></strong><br>Crm Id: xxxxxxx-2dae-e411-9401-005056a04b19<br>Employer Code: 123456<br>Name: a large company that is down the road from a smaller one</p><p class="MsoNormal">Address Line 1: the road<br>Address Line 2: the street<br>Address Line 3: <br>City: Romford<br>Country: United Kingdom<br>Post Code: AA01 xyz</p><h2></body>....

     

    so the input to the compose is

     

    ....<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"><div class="WordSection1"><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="">Membership Number: 123456768</span><br>Application Reference: xxxxxxx-56a3-427f-b18d-21b261d5db77<span style=""></span></p><h2>Employer</h2><p class="MsoNormal"><strong><span style="font-family:&quot;Calibri&quot;,sans-serif">Exists in CRM: True</span></strong><br>Crm Id: xxxxxxx-2dae-e411-9401-005056a04b19<br>Employer Code: 123456<br>Name: a large company that is down the road from a smaller one</p><p class="MsoNormal">Address Line 1: the road<br>Address Line 2: the street<br>Address Line 3: <br>City: Romford<br>Country: United Kingdom<br>Post Code: AA01 xyz</p><h2></body>....

     

     

    when I look at the input / ouput of  the add a row to excel its now weird

    ....
     "table": "Email1",
    "item/Membership Number": "<html><head>\r",
    "item/Application Reference": "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><meta name=\"Generator\" content=\"Microsoft Word 15 (filtered medium)\"><style>\r",
    "item/Exists in CRM": "@font-face\r",
    "item/Crm Id": "\t{font-family:\"Cambria Math\"}\r",
    "item/Employer Code": "@font-face\r",
    "item/Name": "\t{font-family:Calibri}\r",
    "item/Address Line 1": "p.MsoNormal, li.MsoNormal, div.MsoNormal\r",
    "item/Address Line 2": "\t{margin:0cm;\r",
    "item/Address Line 3": "\tfont-size:11.0pt;\r",
    "item/City": "\tfont-family:\"Calibri\",sans-serif}\r",
    "item/Country": "h2\r",
    "item/Post Code": "\t{margin-right:0cm;\r"

     

     

    which means I can no longer user

    split(outputs('Compose'),variables('ParseEmail'))[0]
    etc...
  • Tristan_D Profile Picture
    386 on at
    Re: Initialise variables - string cutting off input?

    Hi @smallzoo !


    I just ran some tests and I can't reproduce the error : 

    Tristan_D_0-1710759756048.png


    Any chance for you to check if the variable is properly initialized ?

    Let me know.

    T

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow