Morning guys,
I just convert the email variable array to a string variable, but when I try to put the string variable on the email action, this return me the datas like this, how can I filter just what are inside the "email":"jorge@xxx.com"
Solved! Go to Solution.
Hey @JorgeGBS
Try this:
Initialize a string variable. Then add an apply to each and pass the outputs where you are just getting the emails. And append to string the current item like this: items('Apply_to_each')?['email']
And also add a semi colon at the end so that you are able to separate them and directly add it to send email action.
Where are you getting the email string from? It might be possible to run it through a parse JSON before converting to a string to get what you need.
However if what we see is all you have to work with, you'll want to split the value using a split expression in a compose card. something like split(emailstring,';') this will split on the semicolon separating each line. Then you'll have to add an apply to each with the value being the output of the above split. Then inside the loop you'll want to do a replace on the output of that to strip off all the extra text and then you can send your email with the simple email address. if you want to send to all emails at once, you'll want to append the cleaned emails to a string variable separated by a semicolon
Hello,
I'm extracting from a table in the Power BI
And I put in the join action, to transform into a string
But, when I put this result in the e-mail, don't send for anybody because are in this weird format {"email":"user@email.com"}
Hey @JorgeGBS
Try this:
Initialize a string variable. Then add an apply to each and pass the outputs where you are just getting the emails. And append to string the current item like this: items('Apply_to_each')?['email']
And also add a semi colon at the end so that you are able to separate them and directly add it to send email action.
This way you have said before, it's work and give to me this result
Now, how can I put this in email action, because when I try return me this
there's a way to split it in just one e-mail or put ; between the e-mails?
Just put the semi colon there, after appending each email in the variable. You can try split too, but that will just add one more action to your flow.
Adding a semi colon worked for me.
I got it.
There's a way to exclude all the e-mails after the ; ? I want to send just one e-mail, but in this way is sent three e-mails
oh okay. So all the emails will be similar always?
Then split it and just send the value at 0 index.
Thank you, my problem has been solved! Have a great day!
User | Count |
---|---|
27 | |
16 | |
16 | |
12 | |
11 |
User | Count |
---|---|
42 | |
30 | |
28 | |
24 | |
24 |