We have an automation where we get emails, and store information in a queue item. the unique reference is senderemail+timestamp, and the specific content is the email subject. when a new email comes in, is there a way to check if the subject is already in the queue?
You can set the subject value as queue item reference and then when checking if it’s already exists in the queue, use get queue items activity using the reference.
You can also set unique reference settings in queue to avoid duplicate.
Also it’s better to use Message Id for checking for duplicate emails.
Thing is, the subjects often times are too long to be used as reference that is why we stored it as specific content. and these are not “duplicate emails” that we are checking. just wanted to check if the subject line has a similar one that was already in the queue. that is why we were wondering if it is possible to lookup in queue using specific content
using get queue items you cannot, but using get queue items api you can…please check below reference on how to filter
Hope this helps
cheers
Hi @Ezekiel_Gomez1 ,
If possible, can you proceed with Database actions before adding items to the queue. So that we can check for duplicates before adding to the queue items.
Or You can use excel if the process is simple and not the multi Bot architecture.( If not proceeding with API)
@Ezekiel_Gomez1 Yeah, with Get Queue Items activity, you cannot directly filter by SpecificContent.
If you want to check whether a similar subject already exists in the queue, one practical way is
- Use Get Queue Items to read the relevant queue items
- Loop through the returned items
- For each item, read the subject from SpecificContent(“Subject”)
- Normalize both values before comparing, for example: a) convert to lowercase b)trim spaces
- Then apply your comparison logic: exact match, Contains, keyword match
Example idea: Current email subject: “Invoice for March 2026”
Queue item subject: “RE: Invoice for March 2026”
After normalization, you can decide whether to treat them as similar
If you need filtering before fetching, then Orchestrator API is the better option, since activity-level filtering on SpecificContent is not available.
Hi @Ezekiel_Gomez1,
- Maintain a master log/source (e.g., shared file, database, Data fabric, storage bucket) to store processed subjects in file or database.
- Before adding a new queue item, check if the subject already exists in this master source.
- Once your transaction complete, bot add subject in this master log source.
Thanks!