Skip to main content

Notifications

Copilot Studio - Topic Creation & Management
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.

  • longgee Profile Picture
    longgee 6 on at
    Re: PVA variable inquiry

    Hi @Expiscornovus 

     

    here you go.

     

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

  • Expiscornovus Profile Picture
    Expiscornovus 31,104 on at
    Re: PVA variable inquiry

    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
    longgee 6 on at
    Re: PVA variable inquiry

    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
    Expiscornovus 31,104 on at
    Re: PVA variable inquiry

    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
    longgee 6 on at
    Re: PVA variable inquiry

    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
    Expiscornovus 31,104 on at
    Re: PVA variable inquiry

    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard

Featured topics