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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Initialise variables -...
Power Automate
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

 

 

Categories:
I have the same question (0)
  • Tristan_D Profile Picture
    400 on at

    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

  • smallzoo Profile Picture
    26 on at

    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...
  • v-yetonggu-msft Profile Picture
    on at

    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

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard