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 :
Copilot Studio
Unanswered

PVA variable inquiry

(0) ShareShare
ReportReport
Posted on by 6

Hi All

 

I'm new to PVA and just created a sample chatbot. This chat bot will be used to send email and will require user to provide "down time" and "logs". My issue is when the message is sent (using power automate) and received via email, the logs are in 1 line (not the same output and copied ones from a router log).

 

Is there a way to leave that formatting?

 

Thank you.

I have the same question (0)
  • longgee Profile Picture
    6 on at

    Hi @Expiscornovus 

     

    here you go.

     

    join(split(triggerBody()['text_2'], variables('month')), '<br>')

  • Expiscornovus Profile Picture
    33,417 Most Valuable Professional on at

    Hi @longgee,

     

    That is a strange issue. A split and a join normally shouldn't replace characters.

     

    They only split a string on the matching characters and join the array into a string value back together with the separator between each item of array.

     

    Can you share the exact expression you used in your setup?

  • longgee Profile Picture
    6 on at

    Hi @Expiscornovus 

     

    Thank you for the expression. It works and I managed to change 'Feb 11' with a variable to match the current month. The only issue I have is it somehow replaces what it matches.

     

    Sample email

    longgee_0-1679980800676.png

     

    The device output is below. It shows "Mar"

    longgee_1-1679980851093.png

     

  • Expiscornovus Profile Picture
    33,417 Most Valuable Professional on at

    Hi @longgee,

     

    It looks like the CRLF characters are not stored in that input variable. You might be able to split and join on the datetime stamp. Only you need a way to find it dynamic (instead of hard coding the Feb 11 date in the split expression).

     

    With this specific test data you could split it on Feb 11 and join it back together with a br tag. Switch the body of the Send an Email (v2) action to code view and add the expression below:

    join(split(triggerBody()['text_2'], 'Feb 11'), '<br>')

     

  • longgee Profile Picture
    6 on at

    Please see below. I have included the sample email received once the flow is successful. The logs part is showing as a 1 long line.

     

    The goal is to have the logs below have the same format as in the test email.

     

    Feb 11 09:20:00 xxxxxxx /usr/sbin/cron[51590]: %CRON-6: (root) CMD ( /usr/libexec/atrun)
    Feb 11 09:21:27 xxxxxxx : %PFE-6: fpc1 NH_RESOLUTION_REQ_THROTTLED: Next-hop resolution requests from interface 323 throttled
    Feb 11 09:25:00 xxxxxxx /usr/sbin/cron[51661]: %CRON-6: (root) CMD ( /usr/libexec/atrun)
    Feb 11 09:30:00 xxxxxxx /usr/sbin/cron[51731]: %CRON-6: (root) CMD (newsyslog -X)
    Feb 11 09:30:00 xxxxxxx /usr/sbin/cron[51732]: %CRON-6: (root) CMD ( /usr/libexec/atrun)
    Feb 11 09:35:00 xxxxxxx /usr/sbin/cron[51803]: %CRON-6: (root) CMD ( /usr/libexec/atrun)
    Feb 11 09:40:00 xxxxxxx /usr/sbin/cron[51872]: %CRON-6: (root) CMD ( /usr/libexec/atrun)

     

    pva flow.jpg

    pa flow1.jpg

    pa flow2.jpg

    sample email.jpg

  • Expiscornovus Profile Picture
    33,417 Most Valuable Professional on at

    Hi @longgee,

     

    Can you share a screenshot of your Power Automate flow setup? This will help us to troubleshoot and give you a good suggestion.

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 > Copilot Studio

#1
Valantis Profile Picture

Valantis 414

#2
chiaraalina Profile Picture

chiaraalina 130

#3
S-Venkadesh Profile Picture

S-Venkadesh 84 Moderator

Last 30 days Overall leaderboard