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 :
Power Platform Community / Forums / Power Automate / Email String Variables...
Power Automate
Unanswered

Email String Variables Combining in Test Email

(0) ShareShare
ReportReport
Posted on by

My Main SharePoint List has items with renewal dates and departments. I'm using string variables to pull emails from a Contacts List. I'm trying to get string variables to be linked to the correct email address(es).

 

Here's how my flow works:

  • First some string variables are initialized
  • A filter gets items from the Main List to look at items that have renewal dates that are today
  • A filter is pointed at the Contacts List to get contacts with the same department name as the Main List
  • Some conditions are made to look at contacts with the correct role and no renewal date
  • Variables are appended
  • Test email is sent

 

Capture.PNGCapture 2.PNG

 

I'm having trouble linking the string variables to the department. An early trigger is if the main list has an item that has a renewal date that's today. Eventually, this flow will automatically recur once a day to look at the renewal dates. If the flow only finds one item, the test email gets sent perfectly. However, if the flows finds two items, the first email has the correct emails, but the second email has the string emails from item #1 and item #2 combined together.

 

I want the email to be sent so that the string variables are only included in the email if they are linked to the correct department from the Main List (no matter how many items are found under the initial filter for the Main List).

 

Thanks for your help

 

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    The list of email addresses needs to be semicolon delimited.  Make sure you add a semicolon after the dynamic content that enters the email addresses when you append them to the string variable.  The resolution on your screen shot is quite low so I can't tell for sure but it doesn't look like you've added the semicolons.

  • Community Power Platform Member Profile Picture
    on at

    I tried that, and it didn't fix the problem. Since I pressed "enter" after each dynamic content, the emails already came back as individual emails.

     

    I will try to clarify my problem better.

     

    Let's say that the flow brings back 2 items. Item 1 has department "X" and item 2 has department "Y". The first email contains all the emails pertaining to department X, but the second email contains all the emails from X AND Y.  I want the string variables to only be in the email if they fall under their respective department

  • Community Power Platform Member Profile Picture
    on at

    @Pstork1 

  • Community Power Platform Member Profile Picture
    on at

    @Pstork1 

     

    Also here is (hopefully) a better set of screenshots

     

    Capture 3.PNGCapture 4.PNGCapture 5.PNG

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Sorry, I thought you were using the emails addresses to address an email to some group of users.  But as I said its hard to read the screenprints as small as they are.

     

    Can you upload screenprints that focus on the condition and then the actions that update each variable?  If I can see more detail I'll try to help.  It sounds like its an issue with the logic.

  • Community Power Platform Member Profile Picture
    on at

    Capture 6.PNGCapture 7.PNG

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

     I suspect the problem is the logic around the renewal date being Null.  The problem is that when you do a get in Flow if the field is null it isn't returned in the JSON.  So you can't test against it for that item because it doesn't exist.  That's different from it existing but the value being null.  Check a previous run and look at the values returned.  Verify that the renewal date actually exists for all the items you are checking.

  • Community Power Platform Member Profile Picture
    on at

    @Pstork1 

    The first Get Items (for the Main List) has a filter that's looking at the renewal date -- and that renewal date column on the SharePoint List is a required value, so I don't think that's the problem. I'm always getting an item. And in the email I'm able to look at the dynamic content and verify the title/ department.

     

    I'm new with variables, so I was thinking it had something to do with splitting the variable, using an array, making an increment variable -- or something like that. I just wasn't sure which one I should utilize. 

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Not Renwal, whatever field starts with Remove.  The one you are testing against Null in your condition.

  • Community Power Platform Member Profile Picture
    on at

    Hello! were you able to solve this? I believe I have the same problem

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 > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard