Need some assistance using Alteryx and Google webhook to message an existing thread.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So far I've managed to successfully send google chat messages to specific chatrooms using the google webhook URL. I'm sharing below a setup of my current workflow that successfully does that. What I haven't managed to do is send the message to a specific thread, instead of a new one being created automatically each time (which is the current default behavior of my workflow)
Let's say the thread key of the thread I want the message to go to is 1eFXoWDA5bs
Based on another post afound, and on google's documentation here https://developers.google.com/chat/how-tos/webhooks#reply_to_a_message_thread
I tried adjusting just the URL value of my setup to the following values:
1. https://chat.googleapis.com/v1/spaces/AAAAs4vUeDk/messages?threadKey=1eFXoWDA5bs
Response: Missing valid API key
Response: Invalid request token
3. https://chat.googleapis.com/v1/spaces/AAAAs4vUeDk/messages?key=1eFXoWDA5bs
Response: API key not valid. Please pass a valid API key.
I already came across cgoodman3's response in a similar thread (https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Google-Chat-webhooks-via-download-tool...), but I still wasn't able to figure it out unfortunately
As I am not very experienced with the download tool and API requests yet, could someone suggest an edit that achieves the above? Thanks in advance.
EDIT:
The correct format of the URL for sending a message to a specific thread is:
So the threadkey parameter has to be first, followed by key and token. However, now I'm still stuck at the part where I need to figure out how to get a list of all threads in a specific space, in order to find the latest thread to send the message to. Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @AkisM ,
If you want to post a message to a Google Chat Thread you'll need the Thread Identifier. Inside every Google Message, you can find the thread ID. More specifically, inside the REST Resource spaces.message. Here's some more info on that
What you'll need to do, is pull a Google Chat Message from the thread your interested in. You can do this using the spaces.messages.get function
To sum all of this up -
Step 1. Get Google Chat Message Response from the thread of interest
Step 2. Parse the JSON response and pull out the thread: value
Step 3. Pass this thread: value into your current API call
Hope this helps,
Milos
