No worries @Basic, happy to help further on this! 😁
The approach I’d take would be to store a record of the task’s ID and corresponding message thread ID (timestamp) in a third party app. Something like Zapier Tables could work well for this. And there’s a Is Thread field that’s only present when the message is part of a thread so if you use a filter to check whether that field exists you can then add the comment in Asana.
Here’s an outline of the triggers and actions I’m thinking of:
Zap 1 - posts a message in Slack when a new task is created in Asana and adds the Slack thread to the task
- Trigger: New Task (Asana) - runs whenever a new task is added in Asana.
- Action: Send Channel Message (Slack) - posts a message on Slack with a link to the Asana task (set to post the message as a bot).
- Action: Create Record (Zapier Tables) - stores a record of the Slack message’s timestamp (Ts) and the corresponding task ID.
- Action: Create Comment/Story (Asana) - adds a comment to the existing task in Asana with a link to the Slack thread that was created. Note: In the Task ID field use the Custom value option to select the task ID from the New Task trigger.
That should ensure that new Asana tasks are added as a new message in Slack with a link to the Asana task and a link to the Slack thread is added to the task.
Zap 2 - creates a reply to the task message in Asana
- Trigger: New Message Posted to Channel (Slack) - runs whenever a new message is posted in a specific Slack channel (set to disregard bot messages).
- Action: Only continue if… (Filter by Zapier) - only allows the Zap to continue if the Is Thread field Exists (meaning that a value exists for this field) so it will only continue for messages in a thread. See: Add conditions to Zaps with filters.
- Action: Find Record (Zapier Tables) - searches based on the timestamp in the Thread TS field, which should match the timestamp of the original message that started the thread, to get the task ID.
- Action: Create Comment/Story (Asana) - adds a comment to the existing task in Asana with text from the Slack message that triggered the Zap. Note: In the Task field use the Custom value option to select the task ID found by the previous Find Record action.
And this Zap should ensure that any replies in the task message threads will be added as comments on the relevant tasks in Asana.
Alternatively, instead of using a Find Record action you could parse the task link from the Slack message using a Retrieve Thread Messages (Slack) action followed by an action to extract the task link from the parent Slack message (like a Formatter (Text > Extract Pattern) action or a ChatGPT action etc.), but that would use an extra task to by retrieving the thread messages. Whereas Tables actions don’t cost any tasks when they’re run.
Hope that helps to get you started. If I’ve misunderstood what you’re after here or you run into any trouble on setting this up do let us know!