SS1
SS1

Reputation: 1

Power Automate - Creating a Comment in a List Item if Email fields from two seperate lists match

have been working on this for days, but not sure what I'm missing, as my Power Automate flow doesn't seem to work no matter what variables are changed/amended.

I have 2 existing MS Lists, as below:

CONTACTS (fields include 'Name', 'Organisation', 'Email' etc.)

EMAILS (fields include 'To Email', 'From Email', 'Email Body', and 'Date')

I have an existing Power Automate flow that creates list items in EMAILS as they are sent/received in Outlook.

I want to now create a Power Automate flow that matches the 'To' or 'From' columns in EMAILS to the 'Email' column in CONTACTS

I have tried different variations to build out the power automate flow for the process to look like:

  1. When an EMAIL item is created [i.e. from the existing flow]

  2. Get items from CONTACTS

  3. EMAIL 'To' field or EMAIL 'From' field matches exactly the CONTACT 'Email' field

  4. If true, create text comment linking to EMAIL item, and post the comment in the matched CONTACT item

  5. If false, ignore

Not sure what I'm doing wrong - I've tried all different types of loop actions and even creating two separate flows, but keep getting the error below:

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'For_each_1' referenced by 'inputs' in action 'Condition' are not defined in the template

I have already looked into existing materials about automating comments to list items but I think the bit that is the problem is the matching email fields from one list to another list to allow the comment creation?

Example PA flow: https://i.sstatic.net/FDr2WYVo.png
Example plain text TO email: https://i.sstatic.net/WiYlhhiw.png
Example Conditions set out: https://i.sstatic.net/80oeZrTK.png

Upvotes: 0

Views: 55

Answers (0)

Related Questions