cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LyonsBI_BRL
Resolver I
Resolver I

When an item is modified in SQL - Update and email

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. 

LyonsBI_BRL_0-1619925458352.png

 

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. 

LyonsBI_BRL_1-1619925554379.png

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. 

 

Any suggestions?

 

21 REPLIES 21
Sid_Jafri
Responsive Resident
Responsive Resident

Hi @LyonsBI_BRL ,

 

Would be possible for you to share the triggers outputs? You can hide the data and show the fields name. Please see the screenshot I shared earlier. I know I am using dataverse however behavior of showing raw data would be same for SQL.

 

Please Thumbs up if my post helped you solve your issue.

@Sid_Jafri 

Yep I can, in order for the YES to display the OutPuts I had to remove the TriggerOutPut expression you had given me

LyonsBI_BRL_0-1619986980684.png

LyonsBI_BRL_2-1619987105954.png

 

Otherwise it does this

LyonsBI_BRL_1-1619987034112.png

 

Hi @LyonsBI_BRL ,

 

sorry, I am looking the raw output for SQL trigger not the email or condition

@Sid_Jafri 

Got it!

Had to set in Run a SQL Query to get the output here

 

LyonsBI_BRL_3-1619987905583.png

 

Pstork1
Dual Super User III
Dual Super User III

Did you drop the trigger and add a new connection and trigger after changing the table schema?  Otherwise it wouldn't update to use the new schema.



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

Hi @LyonsBI_BRL ,

 

Your condition was correct from the start but data that is coming from SQL says "NON-STARTED". You have to find a record that contains "LEO" and update to validate that Yes condition trigger.

 

Also make sure that record contains your email id otherwise email will go to the person who own the record

 

Please Thumbs up if my post helped you solve your issue.

 

@Pstork1 Okay so I removed the connector from Flow, which of course broke everything. Now when trying to re-add it back I'm getting this.

 

LyonsBI_BRL_0-1619988814644.png

 

@LyonsBI_BRL ,

 

There was no need to drop the trigger, you could just switch the table to something else and back to the table you need. I think it is better to create a new flow instead of trouble shooting this. It will be quick as there are only few items in your flow

@Sid_Jafri @Pstork1 

Well now I can't even select the correct DB now. After adding back the connection. My app is reconnected but now I can't select the correct DB which is 2A-Industries

LyonsBI_BRL_0-1619989402481.png

 

Pstork1
Dual Super User III
Dual Super User III

If you create a new flow can you see the database and table?  If not, then there is something wrong with the connection.  That will need to be fixed first.



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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,094)