Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
how to get thread_ts value as response from slack using appscript

How to get a thread_ts as a response from the Slack API using Google Appscript? Here's my code.

function postToSlack() {
  var payload = {
    channel: "#slackbot-test",
    username: "my test",
    icons_url: "",
    text: "<@username>testing<#>",
  };
  var options = {
    method: "post",
    contentType: "application/json",
    payload: JSON.stringify(payload),
  };
  response = slack_client.chat_postMessage(
    (channel = receiver),
    (text = message)
  );

  console.log(response.data);
  thread_ts = response.data["ts"];
  console.log(thread_ts);
  console.log("Message sent: ", payload);

  return UrlFetchApp.fetch(webhookUrl, options);
}

Slack API Google Appscript

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!