Looking to have a few project info fields sent to ...
# integrations
j
Looking to have a few project info fields sent to a Slack channel and added to a google sheet upon new project/customer creation. Is this possible? Who can help?
p
Hello Jared, I have not done a slack integration but I just built one for google sheet using Dell Boomi. Boomi has connectors for slack, netsuite and google sheets
j
Hi Phillip, I assume Boomi is a paid connector like Celigo? If so, we aren’t interested unfortunately. We prefer manually coded connectors or not using a paid connector. Netsuite is pricey enough, ha.
p
the ease of maintenance more than makes up for the price
d
Fairly straight forward to do these types of integrations directly within NetSuite, so no connectors or middleware even required. The Slack one is a few hours at most to create.
m
@dynamicl do you have any info on doing a slack integration directly in Netsuite? I am googling for it but results seem flooded with integration platforms rather than what you are talking about.
d
@Michael B. You just need to create an 'app' in slack, enable incoming webhooks and generate a new url (all this can be done in a free account). Then you can test with the following code in the NetSuite debugger (replace the URL with yours) ...
Copy code
require(['N/record','N/https'],
    function(record,https){

            function _log(first,second){
                log.debug(first,second);
            }

            var jsonData = {channel: "#general",
                        username: "test",
                        text: "Message from NetSuite to #general"};

            var bodyData = JSON.stringify(jsonData);

            var headerData = [];
            headerData['Content-Type'] = 'application/x-www-form-urlencoded';

            var targetURL = '<https://hooks.slack.com/services/[id1]/[id2]/[id3]>';

            try{
                var response = <http://https.post|https.post>({
                    url:targetURL,
                    headers:headerData,
                    body:bodyData
                });

                _log('response from slack',response.body);

            }catch(e){
                _log('ERROR',JSON.stringify(e));
            }
});
You could call a generic version of this function from a user event, workflow etc with the data you want to send. Hope that helps :)