cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AutomateNewbie
New Member

Send an email when a sharepoint list item is modified based on a conditions

Hello,

 

I am teaching myself Power Automate and am stuck on a new flow that I'm building.

 

I currently have a flow that creates a new Sharepoint list item once a Form is submitted, then it Starts and waits for an approval. Here is the screenshot for that flow:

 

AutomateNewbie_0-1648057127014.png

 

Once I receive approval, I then process the request and modify blank fields within my sharepoint list. The fields that I modify are Sales Order Processed and ZDEM Order Number as seen in the following screenshot:

 

AutomateNewbie_1-1648057344949.png

 

I want to create a flow that sends and email when the list is modified and the following conditions are met. If these conditions are not met, do nothing.

On Manual Allocation = Yes

Approval = Approve

Sales Order Processed = Yes (checkmark)

ZDEM Order Number starts with 100

 

Here is the flow I tried to build, but I kept receiving the following error:

Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'contains' expects parameters of matching types: a dictionary and a key (string), an array and a value (object), or a string and a substring. The provided types 'String' and 'Integer' are incompatible

 

AutomateNewbie_2-1648057563457.png

 

I assume I need to create some strings instead of the text in condition but I don't know how to. Please help!

 

1 ACCEPTED SOLUTION

Accepted Solutions

@AutomateNewbie I did some testing on my end with your situation to see what the culprit might be.  From my findings, it's as simple as the casing on your checks. 😊

* I noticed I mixed the numbers up. on the results 1 should be 2

Created a simple sharepoint list that mimics yours slightly.

Zpemberton_0-1648066311580.png

Flow Create.pngFlow Results.png

View solution in original post

8 REPLIES 8
ScottShearer
Super User
Super User

@AutomateNewbie 

I suspect the issue has to do with what type of SharePoint columns are being used.

I suggest that you proceed as follows:

  1. Start with just 1 condition and test the Flow
  2. If there are no errors and you get the expected results, add another condition
  3. Keep adding conditions until you get an error.
    1. Post a screen shot of the error
    2. Post a screen shot of the condition
    3. Post a screen shot of the SharePoint column definition (list settings/click on column name)

That way, we can identify where the error is coming from which will make your issue much easier to solve.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Zpemberton
Helper I
Helper I

@AutomateNewbie You are attempting to use a 'contains' with an integer value.  A quick solution to this would be to place quotes around the 100 such as 

Zpemberton_0-1648060533025.png

 

Hi @Zpemberton , I tried this but that solution is not working. The flow succeeds however, it always comes back as false, so it will not send an email although the condition is met.

Would you be able to provide the values of an item that you know you would want to pass?  Also, one thing to note is that Sharepoint handles yes/no checkboxes or drop downs as true/false, not yes/no.  So for the third condition, you should indicate 'true' instead of 'yes' as your variable to check by.  Not sure if this is the specific issue or not.

In the following screenshot, the first row in green should pass and send an email. I'm not sure if it matters but the "On Manual Allocation" Field is a multiple choice field on the original form.

 

AutomateNewbie_0-1648062176729.png

 

Hi @ScottShearer 

 

Is this what you mean by column definition?

AutomateNewbie_0-1648066340506.png

 

@AutomateNewbie I did some testing on my end with your situation to see what the culprit might be.  From my findings, it's as simple as the casing on your checks. 😊

* I noticed I mixed the numbers up. on the results 1 should be 2

Created a simple sharepoint list that mimics yours slightly.

Zpemberton_0-1648066311580.png

Flow Create.pngFlow Results.png

Thanks that worked! Who knew it could be such a simple fix?!?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,931)