I'm running into an issue when I want to kick off an email when I've changed a value in my gallery for a particular item. It's connected to a SQL server, showing the items in the gallery. What I want this automated flow to do is, when someone changes the NICS Status, it updates SQL for that item and then kicks off an email to that customer, based on their email address for that particular record.
I have my automated flow configured like so. However, I'm not getting any emails. I did noticed when I first set the trigger, the Table names didn't populate. To fix this, I went into my SQL Created Items - Send an Email flow, and found out, when peeking at the code, it looks for the table in SQL format.
I know I'm missing something simple here. As it is looking at the email field, for the email address that is in that column in order to kick off an email.
Solved! Go to Solution.
SUCCESS! Okay here's what the solution was
1. @Pstork1 - Yes the turning on the RowVersions, was an absolute.
2. @Sid_Jafri You were right about the output. So what it was looking for was this, triggerOutputs()?['body/NICS_x0020_Status']
It didn't dawn on me, until I went to Using triggerBody() / triggerOutput() to read CDS trigger metadata attributes in a Flow | Power Auto... and looked it up and looked out how it was formatted.
I ran my rest and the YES part kicked off! 😀
Hi @LyonsBI_BRL ,
Did you trigger the flow and check that which condition is running? Does it trigger the Send Email action and you don't receive email? By looking the screenshot it looks like that NICS status is choice column. You should check what is your trigger outputs for When Item modified. If you share the screenshot of Flow output of "When Item Modified" will help
Your condition should have expression that
Please Thumbs up if my post helped you solve your issue.
Hey @Sid_Jafri ,
Thanks for reaching out.
So in my "When Item is Modified" settings I see this. Is this where I need to enter the expression of "triggerOutputs()?['body/_NICSStatus_Label']"
I don't think it triggers the Send Email action as I never recieve any email. The NICS Status gets changed in the DB as it patches correctly. You are right so the NICS Status is a choice column.
Doesn't look like it wants to kick off the flow yet. I know I'm close though. Any other suggestions?
No, you have to write in Condition action. Please see attached. Also if you trigger the flow and share the screen shot of executed flow that shows the outputs of Item modified trigger will help to identify the exact field name for the choice column. I just assumed that name will be NICSStatus
Okay so I entered the condition. Went to try and run the App, selected LEO for it to trigger, but still no email yet.
But yes, the name of the Dropdown is called NICSStatus.
I have been trying to manually trigger the flow. It just sits there, even after I go into the app, change the NICSStatus for that particular item, and still no email.
Please see attached screenshot for further trouble shooting. Can you confirm that condition action goes to Yes action or No action? May be email value that is coming from SQL is not yours, you can hard code your email address to confirm
@Sid_Jafri Still no go. Though I am using SQL and not Dataverse.
I tried hard coding it for the email for it to just go to me than what's in the email field and still no go.
What's very odd is for the SQL trigger for When Modified, it'll auto populate the server name and DB, but not the table. I have to manually write that in. Could that be a problem?
@Sid_Jafri Finally got something going here!
Okay so I set the NO as well to email me. Sure enough that fired off. So somewhere it's the condition then for the Yes that's not working.
So we know the SQL modified WORKS. That trigger is correct. It's just getting the YES to work.
So what's missing then?
One of the known limitations on the SQL connector and that trigger is that a ROWVERSION column is required. If there isn't one in your table that might be why the table doesn't show in the trigger.
When invoking triggers, we have the following limitations:
When an item is modified [DEPRECATED]/
When an item is modified (V2)
When an item is created [DEPRECATED]/
When an item is created (V2)
When an item is created [DEPRECATED]/
When an item is created (V2)triggers use latest inserted row's identity column value as a threshold(trigger state) in order to identify newly inserted rows later. The logic assumes every new row's identity has to be bigger than the previous one. Therefore, in case identity sequence is reset for a table due to explicit t-sql command or table truncation, trigger logic will skip new rows for existing flow. There are two different workarounds possible. First, you can reset flow trigger state by updating trigger action card (rename it, update parameters, add new connection) and save the changes. Or, you can restore target table identity sequence using the following approach
@Pstork1 Yep I saw that as well and added a rowversion column last night called RowVersion
Unfortunately still getting this.
It's somewhere in the trigger, I know that, what it is, is where I'm stuck on still. If I can figure this out, myself or the community members here, would really help pave the way for this tool I'm creating.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.