<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Howto: Posting to Slack from Qlik Sense load script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/1582659#M42599</link>
    <description>&lt;P&gt;I managed to do this without proxies or windows executables, by calling the REST connector and disabling error temporarily because QLIK has issues parsing the response from SLACK (which makes sense since it is not valid json or CSV)&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a REST connector using POST as method. The url should be the Slack webhook url. (looks like &lt;A href="https://hooks.slack.com/services/xxxxxxxxxxxxx/yyyyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzz" target="_blank" rel="noopener"&gt;https://hooks.slack.com/services/xxxxxxxxxxxxx/yyyyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzz&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;Set a temporary Request Body:&amp;nbsp;{"text":"test"}. We will override this later.&lt;/LI&gt;&lt;LI&gt;Data options: Uncheck both (Auto detect response type and Check response type during 'Test Connection'&lt;/LI&gt;&lt;LI&gt;Set a name for the connector ('Slack')&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Create a sub for posting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sub notifySlack(labeltext)
//insert connect statement for REST connector just created below
	LIB CONNECT TO 'slack (qlikcloud_qlikid_xxxx_xxxx)';
	set ErrorMode=0;
    	let user = osuser();
	let doc = DocumentTitle();

	RestConnectorMasterTable:
	Select
	"test"
	from  CSV "CSV_Source"
	With Connection(
	BODY "{'text':'*[$(doc)]* $(labeltext)\n{$(user)','mrkdwn':'true'}"
		);
	set ErrorMode=1;
end sub;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Call the function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;call notifySlack('Start Loading data');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I call the function at the beginning and the end of the data-load. Hope to improve this so it can run without disabling the errors, ideas anyone?&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2019 11:12:02 GMT</pubDate>
    <dc:creator>gbme</dc:creator>
    <dc:date>2019-05-21T11:12:02Z</dc:date>
    <item>
      <title>Howto: Posting to Slack from Qlik Sense load script</title>
      <link>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/968192#M13906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Being a heavy Slack user, I have for some time thought about the possibility to integrate Slack and Sense. &lt;/P&gt;&lt;P&gt;Turns out it isn't hard at all..&lt;/P&gt;&lt;P&gt;Oh, never heard of Slack? Check it out - it's a really good instant messaging/group communication tool. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Being able to post Slack messages from the Sense load script opens up all sorts of possibilities, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Have different reload tasks post to different Slack channels, depending on what the tasks do.&lt;/LI&gt;&lt;LI&gt;Post messages when a scheduled reload job starts and ends.&lt;/LI&gt;&lt;LI&gt;Post status messages for long running reload tasks. It is suddenly trivial to get an idea of how far along that 3 hour reload task has come.&lt;/LI&gt;&lt;LI&gt;Post information about failures during the reload. This is especially relevant if a reload task should continue even if some failure occurs – quite often you would still want to notify someone about the failure that did happen.&lt;/LI&gt;&lt;LI&gt;Notify end users and stakeholders that their Sense apps have been refreshed with new data.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full writeup &lt;A href="https://ptarmiganlabs.com/blog/2015/12/07/posting-to-slack-from-qlik-sense-load-scripts/"&gt;here&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should be noted that the approach described in the post above may introduce security risks in a Sense server setting - so do read the Sense help pages for the "execute" command before deploying this in a production setting.&lt;/P&gt;&lt;P&gt;I'll post an alternative solution in the next few days too, where security can be kept on default (=higher) levels.&lt;/P&gt;&lt;P&gt;Which one should be used depends on your use case - if you are running Sense desktop you can probably use the approach described above. In a setup with sensitive data you might want to go with the proxy based setup described in the coming post (need a few days to wrap it up..).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 23:04:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/968192#M13906</guid>
      <dc:creator>mountaindude</dc:creator>
      <dc:date>2015-12-07T23:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Howto: Posting to Slack from Qlik Sense load script</title>
      <link>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/968193#M13907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'comic sans ms', sans-serif;"&gt;Feeling Qlikngry?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A _jive_internal="true" data-containerid="2049" data-containertype="14" data-objectid="8342" data-objecttype="102" href="https://community.qlik.com/docs/DOC-8342" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;How To /Missing Manual(23 articles)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 20:14:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/968193#M13907</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-12-08T20:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Howto: Posting to Slack from Qlik Sense load script</title>
      <link>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/968194#M13908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adding to the previous post, at the link below is a write-up on how to use Node.js to create a small proxy service, which via a REST API makes it possible to post Slack messages without lowering the security settings of Sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://ptarmiganlabs.com/blog/2015/12/10/posting-slack-qlik-sense-load-scripts-web-service-style-part-2/" title="https://ptarmiganlabs.com/blog/2015/12/10/posting-slack-qlik-sense-load-scripts-web-service-style-part-2/"&gt;https://ptarmiganlabs.com/blog/2015/12/10/posting-slack-qlik-sense-load-scripts-web-service-style-part-2/&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please feel free to extend the (very basic) Node proxy code - I am sure there are lots of good things that can be added there. Github pull requests always welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Göran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 23:23:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/968194#M13908</guid>
      <dc:creator>mountaindude</dc:creator>
      <dc:date>2015-12-09T23:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Howto: Posting to Slack from Qlik Sense load script</title>
      <link>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/968195#M13909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added another endpoint to the proxy, for creating directories on the server where the proxy app is running.&lt;/P&gt;&lt;P&gt;The rationale for this is that you probably don't want to lower Sense's security settings, but those settings prevent you from (among other things) creating directories on disk.&lt;/P&gt;&lt;P&gt;Another option is then to have a small proxy app do this for you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The proxy app now has two endpoints:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/slack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for posting to Slack&lt;/P&gt;&lt;P&gt;/createDir&amp;nbsp;&amp;nbsp; for creating directories on disk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is pretty easy to add additional endpoints, if/when needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything available at the &lt;A href="https://github.com/mountaindude/slack_proxy/tree/master"&gt;GitHub repository&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:10:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/968195#M13909</guid>
      <dc:creator>mountaindude</dc:creator>
      <dc:date>2016-01-14T22:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Howto: Posting to Slack from Qlik Sense load script</title>
      <link>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/1582659#M42599</link>
      <description>&lt;P&gt;I managed to do this without proxies or windows executables, by calling the REST connector and disabling error temporarily because QLIK has issues parsing the response from SLACK (which makes sense since it is not valid json or CSV)&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a REST connector using POST as method. The url should be the Slack webhook url. (looks like &lt;A href="https://hooks.slack.com/services/xxxxxxxxxxxxx/yyyyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzz" target="_blank" rel="noopener"&gt;https://hooks.slack.com/services/xxxxxxxxxxxxx/yyyyyyyyyyy/zzzzzzzzzzzzzzzzzzzzzz&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;Set a temporary Request Body:&amp;nbsp;{"text":"test"}. We will override this later.&lt;/LI&gt;&lt;LI&gt;Data options: Uncheck both (Auto detect response type and Check response type during 'Test Connection'&lt;/LI&gt;&lt;LI&gt;Set a name for the connector ('Slack')&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Create a sub for posting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sub notifySlack(labeltext)
//insert connect statement for REST connector just created below
	LIB CONNECT TO 'slack (qlikcloud_qlikid_xxxx_xxxx)';
	set ErrorMode=0;
    	let user = osuser();
	let doc = DocumentTitle();

	RestConnectorMasterTable:
	Select
	"test"
	from  CSV "CSV_Source"
	With Connection(
	BODY "{'text':'*[$(doc)]* $(labeltext)\n{$(user)','mrkdwn':'true'}"
		);
	set ErrorMode=1;
end sub;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Call the function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;call notifySlack('Start Loading data');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I call the function at the beginning and the end of the data-load. Hope to improve this so it can run without disabling the errors, ideas anyone?&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 11:12:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Howto-Posting-to-Slack-from-Qlik-Sense-load-script/m-p/1582659#M42599</guid>
      <dc:creator>gbme</dc:creator>
      <dc:date>2019-05-21T11:12:02Z</dc:date>
    </item>
  </channel>
</rss>

