Hi there!
Are you expecting multiple email addresses in that array? If not, you can safely extract just one using this Power FX expression:
if(empty(outputs('Compose_-_Verantwoordelijke')), '', first(outputs('Compose_-_Verantwoordelijke')))
This checks if the array is empty—if it is, it returns an empty string; otherwise, it retrieves the first item. That way, you avoid any runtime errors when the array has no values.
And, if you're inside a for each, you can Append to a String Variable, and just do on the dynamic content the same PowerFX Formula followed after by a ','. That will let you at the end with a big string of email addresses looking like this: 'email1'at'test.com,email2'at'test.com,' and the last thing you would need to remove the last comma (unnecesary), with a PowerFX Formula like:
substring(variables('RecipientEmailsCSV'), 0, sub(length(variables('RecipientEmailsCSV')), 1))
Assuming that RecipientEmailsCSV is your variable name, otherwise replace it 😉
If this post helped you, please click "Does this answer your question?" and give it a like to help others in the community find the answer too!
José MartÃnez Lago
Solution Architect | Dynamics 365 & Power Platform
Empowering low-code consultants to deliver high-impact solutions
🔗 Blog: thatsagoodquestion.info
🔗 LinkedIn: martinezlago