Power Automate - SQL Deletion Trigger using Power Automate

  Рет қаралды 659

abm abm

abm abm

Күн бұрын

This video explains how to trigger a SQL deletion trigger and execute a HTTP endpoint using Power Automate.
OLE Automate configuration for SQL
learn.microsoft.com/en-us/sql...
SQL Trigger code. Here Employee is my table.
USE [Employee]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create TRIGGER [dbo].[trgEmployeeDelete]
ON [dbo].[Employee]
FOR DELETE
AS
Declare @varId int;
SELECT @varId = Id FROM DELETED;
declare @Object as Int;
declare @ResponseText as Varchar(8000);
declare @body varchar(max);
set @body='{"Id":' + str(@varId) + '}';
declare @Apilink varchar(max);
set @Apilink='Your Flow https endpoint here';
Exec sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;
Exec sp_OAMethod @Object, 'open', NULL, 'post',@Apilink,'false'
EXEC sp_OAMethod @Object, 'setRequestHeader', null, 'Content-Type', 'application/json'
Exec sp_OAMethod @Object, 'send', null, @body
Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT

Пікірлер: 3
@codelessstudio1269
@codelessstudio1269 2 ай бұрын
Exactly what I'm looking for, thanks for sharing Hope it will work for deletion of multiple rows also?
@codebreaker1903
@codebreaker1903 5 ай бұрын
Hi how can i contact you please?
@abm4975
@abm4975 5 ай бұрын
Hi Check my Channel about section. There is an email there. Thanks
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 3,8 МЛН
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 14 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 15 МЛН
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 69 М.
MS Flow and SQL Triggers
15:58
Paul O'Flaherty
Рет қаралды 15 М.
Automate SQL Report Generation with Power Automate
20:57
TheOyinbooke
Рет қаралды 9 М.
RPA - How to extract data from PDF file in Microsoft Power Automate
20:14
Power Automate - Community question related to arrays
10:06
5 ways to Manually Trigger a Power Automate Flow
14:36
Andrew Hess
Рет қаралды 20 М.
Use the Power Automate v2 Trigger for Power Apps
19:09
Shane Young
Рет қаралды 36 М.
Power Automate - Community question JSON Filters
9:42
abm abm
Рет қаралды 453
Top 5 Most-Used Deployment Strategies
10:00
ByteByteGo
Рет қаралды 253 М.
How .NET Aspire will save .NET (and its not about "the cloud")
8:54
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 14 МЛН