9/28/2023 0 Comments Slack channel webhookBy bridging together different systems, an organization can increase its productivity radically. Link for more details on message formatting.APIs break down information silos and make data more actionable. These messages were simple and informative and nature, but more complex implementations Procedure created a HTTP session and posted data from a database table trigger. Used the URL for that webhook in a stored procedure that we created. To recap we created a Slack channel, added a web hook integration Now we have a real time notification component to a few tables CREATE 5 RANDOM ORDERS BY CUSTOMER ID 4, MONITOR FOR ALERTS IN SLACK. Option to be able to run the stored procedure. Now that we have a stored procedure created, we need to enable a sp_configure SET = 'Response text: ' + Close the connection.ĮXEC = sp_OADestroy 0 RAISERROR('Unable to close HTTP connection.', 10, 1) SET = (SELECT CASE WHEN = 'Get' THEN NULL ELSE END )ĮXEC = sp_OAMethod 'send', NULL, - IF YOUR POSTING, CHANGE THE LAST NULL TO Handle the response.ĮXEC = sp_OAGetProperty 'status', OUT ĮXEC = sp_OAGetProperty 'statusText', OUT ĮXEC = sp_OAGetProperty 'responseText', OUT IF 0 RAISERROR('Unable to open HTTP connection.', 10, 1) ĮXEC = sp_OAMethod 'open', NULL, 'false' ĮXEC = sp_OAMethod 'setRequestHeader', NULL, 'Authentication', = sp_OAMethod 'setRequestHeader', NULL, 'Content-type', 'application/json' CREATE PROC VARCHAR(MAX), VARCHAR(MAX), VARCHAR(MAX) VARCHAR(MAX) OUTPUTĮXEC = sp_OACreate 'MSXML2.ServerXMLHTTP', OUT
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |