Hey there! This is something I’ve been cooking on for a long time and haven’t gotten it quite right yet. I’m going to see if anyone in the community can help me crack this one…
Preface:
I have Gmail integration setup for my Inbox folder and Sent messages folder
I’ve been exploring how adding a label in Gmail (folder) can create a Task
So I created a rule – if a message is created / updated where the folder contains “Task” (my label out in Gmail), then create a Task from it.
My main issue is that labeling a message “Task” in Gmail also labels any replies as “Task” within the conversation. This creates a separate Task for every subsequent reply.
We’re using Threads in our Gmail integration, and so my first thought was to only create a Task if the Thread for the message is empty (thus preventing future replies from being created as Tasks).
This also sorta works. The snag here is that if a Task comes up halfway through a conversation, tagging it as “Task” won’t fire off the Task creation (because NOW, the Thread isn’t empty)
I feel like there’s a blindly obvious solution to this somehow, where I can only create a Task once and also include ALL messages from the relevant thread (if applicable) with the Task.
Can’t you just use a filter on the automation that creates a Task, to only execute if the Email belongs to a thread (i.e. is not the root email of the thread) OR if the root Email for the thread already has a Task?
Of course, this will always create a Task linked to the root of the Thread (which is not necessarily the Email which was tagged) but if you turn on grouping by thread in the relation view, you will see all Emails in the Thread, even thought the Task is only actually linked to the root Email.
The connection to the Thread → Task was something I’d overlooked. I think we’re getting closer!
In your explanation, you said
only execute if the Email belongs to a thread (i.e. is not the root email of the thread) OR if the root Email for the thread already has a Task
however your screenshot shows “AND” instead. I’m assuming the explanation was correct based on what I’m seeing, but wanted to be sure.
In my quick tests, I’m still seeing multiple Tasks being created when I add the /Tasks label, and it may be my filtering is still wonky.
However, since adding that label in Gmail would, in theory, trigger all ten (for instance) emails in the conversation to “update” their folder, would that fire the automation on all 10 emails quickly enough that the filtering logic would still see the thread’s tasks as being “empty” even if they won’t be once all the processing happens.
Sorry, yes, my image and text were not consistent.
It should execute if the Email is the root (Thread is empty) or if it belongs to a thread which does not already have a Task linked to the root.
But yes, you’re also right with this:
So indeed, the check for a Task-less root email will only work if the Emails are created (synced) in date order, which is not the case when an Email later in a thread is tagged (which will cause the whole thread up to that time to become synced).
But perhaps this means we don’t need to worry?
In your first message, you wrote
which is not quite right I believe.
If you have an email thread that looks like this
E1
E2
E3
E4
if the first time you add a tag is for E4, then I believe the whole thread will get synced, and an automation that only runs when Thread is empty will be fine - it will get triggered on the creation of E1 and not for the rest.
Of course, my comment about the Task always being linked to the root Email is still true, so perhaps that’s a problem.
Very interesting! Thank you so much for putting extra thought into this. I’ve adjusted our setup a bit, and I believe you’re correct on all counts. Flagging as a Task in Gmail now correctly creates a single Task in Fibery.
I’ve also built a similar automation that looks for the presence of an Accounting tag, for example, to create and assign a Task to our bookkeeper, and so on. This turns Gmail into a mini-Missive style collaborative inbox (with some caveats, of course, but the more stuff we can get into Fibery, the better for us)
The one hiccup is that, as you said in your final paragraph, the Task is always linked to the root email. Not a huge deal breaker, as this isn’t the desired outcome maybe 1 out of 30 times or so, in my recent experience.
There’s probably some way to sort out a solution, but for right now I’m quite happy with being able to create Tasks correctly (most of the time) from Gmail