function postResponse(channel, userName, topic, title, author, description, link) { var payload = { "channel": "#" + channel, "username": "New item added to reading list", "icon_emoji": ":grin:", "link_names": 1, "attachments":[ { "fallback": "This is an update from a Slackbot integrated into your organization. Your client chose not to show the attachment.", "pretext": "@" + userName + " added a new item to the reading list", "mrkdwn_in": ["pretext"], "color": "#76E9CD", "fields":[ { "title":"Topic", "value": topic, "short":false }, { "title":"Title", "value": title, "short":false }, { "title":"Author", "value": author, "short":false }, { "title":"Description", "value": description, "short": false }, { "title":"Link", "value": link, "short": false } ] } ] }; var url = '[]'; var options = { 'method': 'post', 'payload': JSON.stringify(payload) }; return UrlFetchApp.fetch(url,options); }