cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mmchx
Helper IV
Helper IV

Convert string to HTML

Hi everyone,

      Is it possible to convert the string variable to html file?

In this case, I particularly want to create the approval log which I have been already created all logs appear in a string. So, I think it is the easiest way to collect all logs but I don't know how to convert them into html files.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
chrissahagun
Resolver II
Resolver II

There is one step under Data Operations called "Create HTML Table"... its input parameter is not exactly string though.  It expects an array variable.  And I'm guessing if what you want to process are logs, then maybe they can also be stored in a string array instead?  That way you can use the Create HTML Table step.

 

One time I created an HTML that I sent via email, from pure text input... It's a journey of putting loops to append substrings and HTML tags to a string variable, so it's also possible to do it that way.

 

The formatting of the Create HTML Table might be too generic though.  To that, you might want to manually add a <style> area so you can define the formatting. 

 

Once you have the HTML output to another string variable, you can use that as input to some "Create File" connectors.  I saw a couple, one is under OneDrive, another is under SharePoint.  I believe there are others as well.

View solution in original post

2 REPLIES 2
chrissahagun
Resolver II
Resolver II

There is one step under Data Operations called "Create HTML Table"... its input parameter is not exactly string though.  It expects an array variable.  And I'm guessing if what you want to process are logs, then maybe they can also be stored in a string array instead?  That way you can use the Create HTML Table step.

 

One time I created an HTML that I sent via email, from pure text input... It's a journey of putting loops to append substrings and HTML tags to a string variable, so it's also possible to do it that way.

 

The formatting of the Create HTML Table might be too generic though.  To that, you might want to manually add a <style> area so you can define the formatting. 

 

Once you have the HTML output to another string variable, you can use that as input to some "Create File" connectors.  I saw a couple, one is under OneDrive, another is under SharePoint.  I believe there are others as well.

mmchx
Helper IV
Helper IV

Thank you for your guide.  Now, I tried by creating an array variable and do some looping to collect the necessary responses into JSON array and then created an HTML table. Which it worked!!
But it might need to edit some Html style to make it looks good. 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,526)