Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,314
Community Members
 
Community Events
165
Community Groups

Send an Email from Confluence Form

Hello, 

 

I have created a form in Confluence for people to submit suggestions. I want the populated information to be sent to my email however, the information does not show up in the email. I only receive an empty email body. 

 

Thank you, 

Sam

1 answer

Hi

How have you created your form - are you using some kind of a plugin for that?

Alex

Hi, 

I'm using the ConfiForm macros (ConfiForms Form Definitions). To send the email I have used ConfiForms IFTT Integration Rules

Event: OnCreated

Choose Action to perform: Send Email

No Conditions have been set. 

 

Thanks, 

Sam

Have you put the contents of an email into the macro body? 
Also the ConfiForms Field macros, if you want to send the values from a form’s record

Alex

Like Samantha Andrade likes this

I think I understand your question.

I've tried adding it two ways:

Pasting the confiform fiele dmacros directly in the IFTT Integration rules body (as seen in the image) vs using notation :ie [entry.fieldName]

ConfiForm Email.PNG

ConfiForms Field Definition macros are part of the ConfiForms Form Definition - these define and configure the form

I was referring to ConfiForms Field macros - these macros you use when you want to get/show the data from the form. So, inside the ConfiForms IFTTT macro body you "get" the values for the fields and need to use ConfiForms Field macros

See this tutorial https://wiki.vertuna.com/display/FORMS/How+to+create+a+form+to+send+emails 

I hope it helps

PS, And yes - the alternative to ConfiForms Field  macros is to use [entry.field_name] notations to extract RAW values for the fields (useful in certain cases like creating mapping for Jira issues and alike, but for emails it is wiser to use ConfiForms Field macros)

Alex

Like Samantha Andrade likes this

Thanks for this, Alex! It helped 

 

@Alex Medved _ConfiForms_ 

If I wanted to send an email with fixed data, that is, without the user interacting, I have the idea of setting the value of the fields from the beginning and hiding them, however, how could I do the same with an attachment, note- the attachment will always be the same

You can use attachment picket field and set it to "attachment id" that you want to include

Each attachment in Confluence has an id, and you can set that to "attachment picker field"

Adding attachment picker field into email (IFTTT macro body) will behave the same way as adding the "file/attachment" field - it will add the file as an attachment to the email

Alex

 

Thank you @Alex Medved _ConfiForms_  for your reply, I have been trying to do this but have not been successful, can you give me a bit more details about this please? I mean how can I get the attachment id?, my attachment is an image and basically I want to send an email to the user after the user logs a Jira issue via commit in Confluence, this email has the information of sla that's why there is no user interaction with this procedure, I already managed to send the mail I just need to attach the image, obviously I have set the fields that I will use to send the email with the corresponding information such as the recipient, the title and the message, additionally I have hidden these fields so that the user does not have interaction with this information 

I have this...

1.png

Thanks in advance...

To get an attachment id you can follow the steps below

Open page attachments view

And then click on the attachment element to get the "developer tools"

You will see an id as below 

attachment-id.png

We also have a handy user macro that you can use to get the attachment IDs in a more convenient way

https://wiki.vertuna.com/display/VERTUNA/Attachments+list

Then it is just a matter of "setting" this id to your picker field

That can be done in the Registrations Control - preset values parameter as  fieldname=attachmentId 

preset-values.png

Alex

 

Thanks @Alex Medved _ConfiForms_ I'm going to work about this, I'll keep u informed...

Little demo of what's been said

https://recordit.co/Gbak4EK6Wk

(of course the field itself (the attachment picker), could be hidden on the form with https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Field+Definition+Rules#ConfiFormsFieldDefinitionRules-Hidefield)

Hope it helps

Alex

 

Dear @Alex Medved _ConfiForms_ it's working, you are the king!!!

 

Thanks a lot!!!

@Alex Medved _ConfiForms_  the functionality is working, I have a little doubt, in the registration control I set the values for each field that will be sent in the mail, this in the Set values as key=value functionality, for the boddy message field, I need to insert "enter" to line balance, however look in inspect to see how that field goes with "enter" in the xml and indicates <br> I already tried it and no, I also put \n and neither did it, also in the documentation of this property of the registration control neither indicates how to insert an "enter", can you give me a hint?

3.png2.png

Using \\n

ta-line-break.png

And there is no need to put spaces between the = or after the values, unless you want them to appear in the values

Alex

 

Thank you very much, my form is working well and the best is becoming more complete

 

Thanks @Alex Medved _ConfiForms_ 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

174 views 1 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you