Confiforms - Create Attachment and email it on Creation

Drew T
Contributor
October 30, 2022

Hi, 

I'm trying to use an IFTTT macro to create an attachment 'on Creation ' {iftttResult_attachmentMacro}, containing the form inputs and then use another IFTTT to send an email with the created attachment attached. 

Appreciate advice on the best way to achieve this.

I have added a field definition 'requestAttachment'  to the form of type file/Attachment

I have tried using an IFTTT macro to Create / update Confiforms entry with params entryId=entry.id&requestAttachment={iftttResult_attachmentMacro}

I have also tried using a confiform Rule definition to Set the Value of the requestAttachment field to [entry.requestAttachment].

So far neither method has worked.

I understand I need to add the requestAttachment field to the Send Email macro but first I need to get the attachment field to populate. 

@Alex Medved _ConfiForms_ are you able to help with this one?

Thanks, 

Drew

1 answer

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 1, 2022

Hi @Drew T 

 

Have a look at this tutorial page

It does exactly what you are looking for - creates an attachment on the fly, attaches it to page and then sends an email with the attachment to the user

 

Alex

Drew T
Contributor
December 20, 2022

Hi @Alex Medved _ConfiForms_ ,

Thanks for sending that info through. I finally got back to this task and whilst I can get it to work as expected when I'm generating a plain text or html attachment, I get the following error with pdf's, both when trying to open them from the Confiform record and from the IFTTT generated email that the file was attached to. 

"Adobe Acrobat could not open filename.pdf because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)"

In the field of type 'File/Attachment', I have the 'Accepts:  field' as 'application/pdf' and in the IFTTT macro that creates the Attachment on creation also has the file Content type (mime type) field as 'application/pdf'. The file name also seems to generate correctly e.g. filename.pdf

In the body of the IFTTT macro I have tried entering the attachment content (user inputs as entry. notation) directly and both embedded in No Format and HTML macros. Each time I get the above error. 

Appreciate if you could provide some advice to resolve this, 

Thanks.

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2022

Hi

Adobe Acrobat is a binary format that is impossible to create from a text file without some extra step, such as converting the text to binary/pdf

ConfiForms IFTTT could create a text (html, yaml, csv) attachment for you. 

Alex

Like Drew T likes this
Drew T
Contributor
December 21, 2022

Thanks Alex, 

Do you know a way to do this using an IFTTT with some JavaScript? E.g convert the text to binary/pdf then attach the output to another file field definition? Then that field could be added to emails etc?

Drew T
Contributor
December 21, 2022

@Alex Medved _ConfiForms_ or any other method you can think of?

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 21, 2022

ConfiForms app cannot create a PDF for you

It is simply of of the scope of the functionality our app has.

It is a very large and complicated topic

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events