I was wondering if it’s possible to attach a document uploaded on one of my cards in my pipe as an email template?
I know that you can use the Dynamic Field to get the link to the document, but what I really need is the document attached to the email, not the link to the file.
I don’t know much about integrations, so maybe there’s something in that area that could help me.
Please note that this automation works for ONLY ONE FILE ATTACHED PER FIELD! If you want to attach multiple files into the email, it will be required to have multiple fields (one per file)
Without Further ado, here are the 3 automations you have to setup:
GET CARD’S INFORMATION Since you’ll be using an HTTP automtion, there are a few specific information regarding the card that should be retrieved from the API before creating the email: - The card’s email address - the attachment field URL path Those are values that you will not find on dynamic fields for automation The automation will look somewhat like that:
For the “Request Body”, here’s the query you will be sending:
%ID% = Card ID Now the JSON Schema is a little bit more complex… You will need to make an example API call to have the exact response to be used as model.. It should look something like this, although unique to your pipe:
With that, you will have the file URL, which will be in the “array_value” key
CREATE EMAIL The second automation is going to compose the email via API request. Its trigger is the API response from the first request. This is what the automation should look like:
Now, this query has way more parameters than the first one (paste this one into pipefy automation):
With that, you email is going to be sent, with attachments! Example:
This is rather complex and was recently found. If you have any questions, please feel free to post them and I will try to aid you however I can
Lucas Lee, Solutions Engineer
Thank you all!
@lucas_lee , I think this could be the solution I’ve been searching for! unfortunately I do not have the knowledge needed to develop this action, I’ll look for help with my pipefy contact
Thank you all!
@lucas_lee , I think this could be the solution I’ve been searching for! unfortunately I do not have the knowledge needed to develop this action, I’ll look for help with my pipefy contact
Sounds good Felipe! If it helps, please tell them to come talk to me internally and I’ll make sure to address whatever questions you have!
Hi Lucas, thank you for this solution.
But if a person is technically savy enough to do this, might as well make a microservice that gets triggered through the first HTTP call, downloads the attachments and sends an e-mail. That would “spend” one automation call instead of three and I would argue that is a more maintainable solution.
I have seen idea submitions as far back as 2 years ago proposing automated attachments (as in MIME attachments, not links), and this is the closest solution, although I think this is a little cumbersome.
What I think all the people who requested this would like is something like an option on the dynamic file field indicating wether we would like the attachment to be added to the e-mail (MIME-style) or be sent as a link.
I am grateful for your solution, as it is clever and solves the problem, but I think a no-code, UI oriented solution is what we expect from Pipefy.