Class MicrosoftTeamsFunctions
java.lang.Object
flexagon.fd.services.groovy.functions.BaseFunctions
flexagon.fd.services.groovy.functions.MicrosoftTeamsFunctions
- Direct Known Subclasses:
WebhookMicrosoftTeamsFunctions
Utility functions for Microsoft Teams
- Since:
- 5.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected static final Stringprotected final StringFields inherited from class flexagon.fd.services.groovy.functions.BaseFunctions
mFLOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()voidcreateCalendarEvent(String pTeamsMessagingAccountCode, JSONObject pCalendarEvent, String pUser) Creates a calendar Event Requires a Teams Messaging Integration Account.voidsendTeamsWebhookMessage(String pWebhookUrl, Object pMessage) Sends a Microsoft Teams message to a team channel.voidsendTeamsWebhookMessage(String pWebhookUrl, String pMessageTitle, String pMessageText, String pIconURL) Sends a Microsoft Teams message to an Incoming Webhook associated to a team channel.Methods inherited from class flexagon.fd.services.groovy.functions.BaseFunctions
captureSecureValues, captureSecureValuesForLogFunction, decryptIntegrationInstance, doSimpleGet, findIntegrationInstanceByCode, getBinding, getLogFunctions, getServerBaseUrl, setBinding
-
Field Details
-
FLEXDEPLOY_LOGO
- See Also:
-
APPROVE_STRING
- See Also:
-
REJECT_STRING
- See Also:
-
-
Constructor Details
-
MicrosoftTeamsFunctions
-
-
Method Details
-
getGroovyKey
- Specified by:
getGroovyKeyin classBaseFunctions
-
cleanup
public void cleanup()- Specified by:
cleanupin classBaseFunctions
-
sendTeamsWebhookMessage
public void sendTeamsWebhookMessage(String pWebhookUrl, String pMessageTitle, String pMessageText, String pIconURL) throws FlexCheckedException Sends a Microsoft Teams message to an Incoming Webhook associated to a team channel.- Parameters:
pWebhookUrl- - The URL to send the message topMessageTitle- - Optional Title of the messagepMessageText- The text for the message content. Can be plain text or html.pIconURL- The URL for the icon of the sender of the message.- Throws:
FlexCheckedException- All exceptions- Since:
- 5.5.0.2 See https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference for information about Message Cards.
-
sendTeamsWebhookMessage
public void sendTeamsWebhookMessage(String pWebhookUrl, Object pMessage) throws FlexCheckedException Sends a Microsoft Teams message to a team channel.- Parameters:
pWebhookUrl-pMessage-- Throws:
FlexNotFoundException- When no Teams Account found for given codeFlexCheckedException- All other exceptions- Since:
- 5.5.0.2
-
createCalendarEvent
public void createCalendarEvent(String pTeamsMessagingAccountCode, JSONObject pCalendarEvent, String pUser) throws FlexCheckedException Creates a calendar Event Requires a Teams Messaging Integration Account.- Parameters:
pTeamsMessagingAccountCode- - The messaging account code for the Teams account.pCalendarEvent- - JSON based on off of the website https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=httppUser- - Optional user's calendar to create the event on. If null, the event is created for the Teams Messaging Integration Account user.- Throws:
FlexCheckedException- Since:
- 6.5.0.9
-