R/get_slack_payload.R

Defines functions get_slack_payload

Documented in get_slack_payload

get_slack_payload <- 
function(report_name,report_url,report_updates='') {
    
  payload<-paste0('{
	"blocks": [
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":carlton: *<',report_url,'|',report_name,'> has been updated*"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Last Run:',lubridate::now(),'"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "*notes*: ',report_updates,'"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "_If you need help accessing this report, please reach out to <@UHVUF8FC4>_"
			}
		}
	]
}')
  
  
  payload
    
}
  
gottalottasoul/RiHana documentation built on Aug. 7, 2020, 3:22 p.m.