web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : B66JVDbqdB3DNmm3jlkGXE
Power Automate - Using Flows
Unanswered

Initialise variables - string cutting off input?

Like (0) ShareShare
ReportReport
Posted on 18 Mar 2024 10:25:00 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

 

 

I have the same question (0)
  • v-yetonggu-msft Profile Picture
    on 25 Mar 2024 at 06:23:54
    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 18 Mar 2024 at 11:32:40
    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
    388 on 18 Mar 2024 at 11:04:41
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Featured topics

Restore a deleted flow
Loading complete