mail icon indicating copy to clipboard operation
mail copied to clipboard

Select and map a table to write mail properties to

Open miaulalala opened this issue 1 year ago β€’ 3 comments
trafficstars

Is your feature request related to a problem? Please describe.

I want to process my incoming messages in the Tables app, so I need to be able to choose the table and the data that should be mapped.

Describe the solution you'd like

The settings should be on a mailbox level.

Design input needed, but I would suggest adding it to the three- dot- menu for a mailbox (with the appropriate icon):

image

I used https://pictogrammers.com/library/mdi/icon/swap-horizontal/ but https://pictogrammers.com/library/mdi/icon/database-arrow-right-outline/ might work well too.

If we use the Account settings, it could look like this:

image

Which could open an additional modal:

image

If a table exists it should show an NcSelect for them.

cc @nimishavijay

In the next step:

  • [ ] I can choose a table from the tables app that I want my messages to be written to.
  • [ ] I want to be able to choose which data should get mapped, and to choose which table column the information should be written to
  • [ ] Data that is available for writing
    • Mailbox
    • From
    • To
    • CC
    • BCC
    • Date received / sent
    • Subject
    • Body
    • Attachment(s)
    • Referenced email (replied)
    • Thread root
    • Flags

This would be nice to have in a modal that focuses on the mapping only, but again, design input needed.

When I'm done, all incoming messages in my INBOX should be written to the Tables app automatically.

Whenever there is a write to oc_mail_messages for my defined mailbox, there should be an additional write to the table of my choosing with the data that I defined.

Option 1

The messages are written to the tables app via background job.

This will need a new table in mail app:

mailbox ID
table ID
mappings
highest mapped UID

Option 2

The mappings could be saved in oc_preferences.

TBC

  • [ ] Separate Table or oc_preferences

Describe alternatives you've considered

No response

Additional context

No response

miaulalala avatar Apr 05 '24 13:04 miaulalala

Cool idea!

Some questions:

  • [ ] How would adding to an existing table work? for example, if I want to link my inbox to the existing vacation request table
    • [ ] How would you select the column to link message data? eg, I want to link the attachments to the "Vacation request form" column, would that be possible?
    • [ ] Could you modify existing tables while setting this up? eg. can I add a "sender" column to the vacation request table while I'm setting up the mapping?
  • [ ] Once a table is set up is it possible to modify it from the tables app?
    • [ ] what happens if I delete the a column from the tables app?
  • [ ] For creating a new table, how much control does the user have over the table details?
    • [ ] can the user set the table and column names?
    • [ ] what about constraints for the column (default values, etc)?
    • [ ] possible to create columns that are not linked to message data?

Regarding the design itself:

  • [ ] Since this is a rather niche feature, the entry point can be in the settings
  • [ ] I would use the word "Connect" or "Link" instead of "Map", as it's easier to understand. MS has "Connect to Outlook" in Sharepoint, so I would go with that
  • [ ] For icons, to maintain consistency with the Tables app icon, what do you think about tables-large-plus?

rough high level mockups with only very basic functionality, what do you think? is this even remotely close to the scope or did I completely misunderstand what's happening here:

When you click on "Connect to Tables": image

Creating a new table: image

Connecting an existing table: image

What do you think? :) If this is in the right direction I can do more detailed mockups with more functionality, etc

nimishavijay avatar Apr 30 '24 02:04 nimishavijay

Very nice! Agree with both your proposals @miaulalala @nimishavijay. Only the icon I would change to table-arrow-right so it’s the small table icon and it denotes the one-way-ness of the connection: https://pictogrammers.com/library/mdi/icon/table-arrow-right/

jancborchardt avatar May 08 '24 14:05 jancborchardt

That is so cool !! I think this could replace or enhance #44 There is one thing in the original proposal. I personally would map it to a folder instead of the full mailbox.

It's more likely a user place a mail into a folder and the mail triggers a new row into the Tables app. This would be very useful in ticketing systems. Like different folders would create different rows for different people. => Place it in marketing => Row for the marketing people => Place it to design => Row for the design people

Aveyron-RetD avatar May 13 '24 12:05 Aveyron-RetD

Superseded by https://github.com/nextcloud/mail/issues/9691

miaulalala avatar May 31 '24 13:05 miaulalala