How to create an automatic relation based on a number of different criteria

I’m using the fantastic Gmail integration, and I’m looking to use some light CRM-like functionality by displaying all the emails with a client inside their Contact entity. Unfortunately, I can only seem to easily create an automatic relation between them and those messages with their email in the “Email From” field.

to link to messages TO them, I can create a lookup from Contact → Gmail Contact → Message, but this field is then displayed in a separate list inside the entity.

The functionality I’d like to have would be a single list with both Messages To and Messages From, sorted by date together - in much the same way you can include two first-level databases in a list.

If anyone has any advice, that would be greatly appreciated!

You would need to combine multiple lists in one.
There was a topic for that sometime ago. At the end there is an instruction from @Matt_Blais on how to make it work.
TLDR:
Two of your lists would be automatically linked based on from/to. You can hide those lists from UI as they are only used in automation.
Automations would sync those two lists into one by adding and removing links when lists are updated.

Having union function would be way nicer though /cc @Chr1sG

1 Like

The union function is in the backlog, but I’m not sure when it might get implemented I’m afraid.

2 Likes

Thank you both! Will use an automation in this case.

Not sure if you have an internal list of requests for Union, but would love to add a +1 to it if it existed: There are a number of use cases where we could benefit from this.

Consider your vote now counted :slight_smile:

1 Like

Another question:

Having successfully implemented this across multiple Email Accounts (each with 3x fields connecting each Contact to each Email, with a different database for each email accounts messages), I’m running into another difficulty:

I’m looking to create a single list view that shows all the emails from every inbox, inside of the associated Contact entity views.

The problem is that each Contact entity has the following relations:

  1. Emails From Person A
  2. Emails To Person A (A lookup only, via Gmail Contacts)
  3. Emails (To+From Combined, created by automation) Person A
  4. Emails From Person B
  5. Emails To Person B (A lookup only, via Gmail Contacts)
  6. Emails (To+From Combined, created by automation) Person B
  7. etc. for add’l inboxes

And when I go to create a list view within a contact entity and try to include multiple “First Level” databases for target Emails To+From, both Person A and Person B, there is no ability to tell the UI which relation I’m referring to. Sometimes, I get both relation I’m looking for (Emails To+FroM). Sometimes, it seems like I get the wrong one (Emails To+From Person A; Emails From Person B).

Is this the intended functionality and I am thinking about this incorrectly, or is there a functionality limitation here for interacting with multiple different relations between the same two entities?

I’ve moved this question to this thread here for neatness reasons