add section to add list of attachments for sending email in email workflow #22326
xshadowlegendx
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
under the email body, there is a button to add email attachments. the attachment can be a link or file from the Directus file library and the link can insert sth like
{{$trigger.payload.file_url_from_a_field}}
, then when the flow is triggered, it will download those files and attach it to the emailBasic Example
No response
Motivation
an email workflow is one of the important tasks for staff to use to create some data and able to send attachments along. another use case is job application form submission, for example, sending the job application email to HR with a resume attached or generally building any form that requires sending some file via email
Detailed Design
Directus already used
NodeMailer
to send email andNodeMailer
supports sending attachments out of the box so for the backend we can update the email workflow API to accept a list of attachments, read those files' URLs to download them, and attach them to the email.for the web UI under the email body section, add a button to add attachments, each attachment has a remove button and a dropdown to select whether to choose the same file from the Directus file library or enter the file URL, the manually enter file URL part can also use the
{{$trigger.payload.file_url_from_a_field}}
syntax to inject file URL dynamically and if the injected URL is file from Directus, it will download from Directus otherwise just download from other server assuming it is allowed.there should also be validation on the frontend and backend to ensure the user does not attach too many files and check for maximum total size since we should keep email content light as well
Requirements List
Must Have:
Should Have:
Could Have:
Won't Have:
Drawbacks
Directus already has many great features and made user and developer experiences great but I think this is a another great feature to have and implementing this would give Directus ++ more points in user experience
Alternatives
this feature can be implemented using
Run Script
with someone who knows some code but this could be another great feature for a user who has little to no coding knowledge and can just create the email flow, fill in some title, subject, recipient, body and lastly nice button to click to add attachments and also simplify processing of building form to submit and send email alertAdoption Strategy
this will be an add-on feature that will not introduce any breaking changes I think and I would like to contribute to this feature as well if this is approved and allowed
Unresolved Questions
No response
Beta Was this translation helpful? Give feedback.
All reactions