3

I am able to send messages to chat room through webhooks by app script,But how can i send reply to that messages.It's being as a one way chat.How can i able to make that as a flow of conversation through webhooks.

Sampoorna S
  • 53
  • 1
  • 5
  • This was what worked for me: https://stackoverflow.com/questions/54372950/posting-a-webhook-to-existing-thread – Rafalages Mar 31 '20 at 12:13

1 Answers1

8

You can supply a threadKey as query parameter. You can generate this key yourself. Messages with the same threadKey are grouped together.

curl -H 'Content-Type: application/json' -X POST https://chat.googleapis.com/v1/spaces/<space>/messages?key=<key>\&token=<token>\&threadKey=this-thread-rocks --data '{"text": "hi there"}'

See https://developers.google.com/hangouts/chat/reference/rest/v1/spaces.messages/create for documentation.

user2919670
  • 81
  • 1
  • 2