Skip to main content

Community

Connector Improvement: Support file renaming in Email connector for unstructured file replication

Please sign in to leave a comment.

Comments

2 comments

  • Official comment

    Hi Doug,

    Could you share a bit more about what you’re trying to accomplish with file renaming in the Email connector? Currently, the connector puts attachments in a timestamped folder based on when the email is received, to avoid conflicts.

    Understanding your requirements (such as the desired naming format, rules for timestamps, or any other metadata you’d like to include) will help us assess how we could best support your use case.

    Thanks,
    Parmeet

    Sure thing Parmeet, here are some examples. 

    Since we have various utility companies sending in bills, and none of them use a standard format, they might look like this:

    - CompanyXYZ_Acct16081681_20260209.pdf

    - 65610513248_213051_January2026.pdf

    - BILLING022026_984654.pdf

    We know what each of those filename formats correspond to, so we can set up rules in the connector to pick up bills according to those regex patterns and direct them to the correct table. But it would also be useful to rename the files so that other users can more easily see what the file represents once it is in the destination. 

    Since we can add separate files/destination tables in the email connector, it would be useful to also add a target filename pattern at that level. So incoming files that match the format for that file/table can also be renamed to the target filename pattern. Using the examples from above:

    - CompanyXYZ_Acct16081681_20260209.pdf -> Utility_Water_20260209.pdf

    - 65610513248_213051_January2026.pdf -> Utility_Electric_20260209.pdf

    - BILLING022026_984654.pdf -> Utility_Gas_20260209.pdf

    In the file target pattern configuration it could look like this for the first example: Utility_Water_{yyyyMMdd}.pdf

     

    Thanks!

    Doug