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.
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?
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
The device output is below. It shows "Mar"
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>')
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)
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.