Sending mail attachments through automations: Cannot choose "file array" link formula columns?

Your Setup:

  • SeaTable Self-hosted 5.3.12

Describe the Problem/Error/Question:

I have a Table A that links to another Table B. Both contain a File type column. The File type column from Table B is shown in Table A via a Link formula column. Standard stuff.

When creating a Button action or an Automation based on Table A to send mail, I’d expect that the original Table A / File column as well as the linked Table A / Link formula => Table B / File columns are offered as attachments for the mail. However, only the Table A / File column is shown.

I suspect that in the background, accessing files in Table B may require some different program logic, but because both columns behave similarly in the GUI, is the expectation wrong that both should be available as mail attachments? I’d hate it to write some fancy python script to transfer files from Table B to Table A. Not because of the effort, but because it would duplicate data.

For those who are interested, I created an workaround in a Python script, which copies the attachment links from the Link formula column to the File column. Needs to be triggered by an automation:

from seatable_api import Base, context
base = Base(context.api_token, context.server_url)
base.auth()
table = context.current_table
currentrow = context.current_row
# make sure that there is a current row selected (manually / by automation trigger)
if (isinstance(currentrow, dict)):
  currentrowdata = base.get_row(table, currentrow['_id'])
  row_data = {
      "Name of file column in current table as TARGET": currentrowdata['Name of link formula column showing files from linked records as SOURCE']
  }
  base.update_row(table, currentrow['_id'], row_data)