Proof of concept - interacting with our SIS via slack channels. Includes authentication check based on channel access.
<cfoutput>
<cfif #StructKeyExists(FORM, "token")#>
<cfif #FORM.token# NEQ '##############'>
Sorry, Authentication Failed
<cfelse>
<cfif #FORM.channel_id# NEQ "############">
What are you doing?!?!!?? This channel is not authenticated - stop trying to break stuff.
<cfelse>
<cfif #FORM.text# EQ "restart">
@#FORM.user_name# - Sonis is restarting
<cfelseif #FORM.text# EQ "isup">
@#FORM.user_name# - Sonis is currently up. Uptime: #Hour(Now()-3)# hours #Second(Now())# Minutes.
<cfelseif #FORM.text# EQ "JB7891234">
Staff: John Smith, 614-779-5555, 523 E. Main St Columbus OH 43119
<cfelseif #FORM.text# EQ "who">
@#FORM.user_name# There are 18 users currently active in Sonis. John Bocook, Jared Black, Sunny Stewart, Michael Sheetz, Jeremiah Moebs, Logan Edmonds, Jason Sheetz
<cfelse>
@#FORM.user_name# - You need to pass the command to run
</cfif>
</cfif>
</cfif>
</cfif>
</cfoutput>