LA: Runbook output to sharepoint item help

Jurgen Verhelst 326 Reputation points
2021-01-04T05:21:35.36+00:00

Hi,

can't figure out what to do with the output of a runbook
it adds div's in the sharepoint list messing up my JSON formatting

A logic app step calls and waits for an runbook to run (it grabs the verified domains in O365)
The next step get the output and it looks like:

dom1.be

sharepoint.dom1.be

tenant.onmicrosoft.com

tenant.mail.onmicrosoft.com

dom2.be

dom3.be

apart form the additional line breaks its ok..

In the raw output it looks like:

"body": "dom1.be\r\n\r\nsharepoint.dom.be\r\n\r\ntenant.onmicrosoft.com\r\n\r\ntenant.mail.onmicrosoft.com\r\n\r\ndom2.be\r\n\r\ndom3.be\r\n\r\n"

The third step takes that output and updates a field in an SPO item

there it gets wonky

the LA run history shows the SPO update item step is putting the following in the field

<div class="ExternalClass43ABE2F13A5F459D924B8610DCFD1ECF">jurgen.be

dom1.ez.be

tenant.onmicrosoft.com

tenant.mail.onmicrosoft.com

dom2.be

dom3.be

</div>

where is it getting that HTML form? I just want a list without spaces...

should I ask the runbook to output in JSON (convert to JSON), then in LA convert back to... csv? it gives an error its not an array then..

thanks for your help guys!

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,133 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,256 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,686 questions
{count} votes

Accepted answer
  1. Amos Wu-MSFT 4,051 Reputation points
    2021-01-05T07:45:38.737+00:00

    The SharePoint Multiple lines of text column uses a rich text editor on the UI. The allowed input value can be styled, which is equivalent to an HTML page, so when you enter plain text, a div will be added by default in the outermost layer. The class attribute, space conversion, etc. will also be automatically converted into HTML elements.
    My test result:
    53475-image.png
    You can use rest to get the real value stored in SharePoint.
    53555-image.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Jurgen Verhelst 326 Reputation points
    2021-01-04T19:17:28.283+00:00

    Hi,

    I tried to parse to JSON, and I then I get this:

    53364-screenshot-2021-01-04-201030.png

    That shows me the values I need are called 'Text'

    then create a table with only the value 'text'

    53391-screenshot-2021-01-04-201233.png

    After a test run I see the output being formatted in raw output as:

        {  
            "body": "Domein\r\nDom1.be\r\nsharepoint.Dom1.be\r\nTenantO365.onmicrosoft.com\r\ntenant.mail.onmicrosoft.com\r\ndom2.be\r\nDom3.be\r\n"  
        }  
      
    

    and in the normal view as:

    53382-screenshot-2021-01-04-200621.png

    Nice, now only a normal list of domains is given, thats what i need

    I chenged the step 'Update SharePoint Item' to use this csv table output:

    53372-screenshot-2021-01-04-200723.png
    53336-screenshot-2021-01-04-200749.png
    53326-screenshot-2021-01-04-200839.png

    But again something is adding the divs in the SPO output, the SPO input what it gets from the previous CSV step is just fine, but then decides to do some html div thing just before dropping that in the sharepoint Multi line Field...

    Think I am missing something here

    because in the list item with with custom formatting it looks like this:

    53365-screenshot-2021-01-04-202426.png

    Where I just want

    Domains:  
    Dom.be  
    tenant.onmicrosoft.com  
    dom2.be  
    dom3.be  
    dom4.be  
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.