• Confluence is currently running with all non-system plugins disabled, some functionality may be missing
Child pages
  • Sending an email with attachments from Confluence with ConfiForms app

This is the documentation for ConfiForms Server/Data Center app

However, this might also work for ConfiForms cloud and in most cases it does. But please see this page to understand the differences between server and cloud versions of the ConfiForms app.

In this tutorial you will learn how to include your ConfiForms File fields into the email as attachments and send it out


This tutorial is based on the Creating embedded form with ConfiForms to send emails directly from Confluence tutorial and extends it with one field. Please start with mentioned tutorial and then continue here


If you are new to ConfiForms, please take a few minutes to read the Basic concepts Guide, or go through the video tutorial on that page.  (smile)


Our from from Creating embedded form with ConfiForms to send emails directly from Confluence tutorial will get a new field of type file


This is done by placing ConfiForms Field Definition macro into the ConfiForms Form body and selecting "File" as it's type. We will name the field as "myattachment"
And adding a ConfiForms Field macro referencing the file field (myattachment) to the IFTTT macro body

The complete configuration for the form looks like this (or see alternative on the right)

Alternative via "[entry.fieldname]" notation:

Now, when the IFTTT action is fired to send the email message the field "myattachment" get's added as file attachment to the email message.


The complete storage format for the solution is included below

<ac:structured-macro ac:name="confiform">
  <ac:parameter ac:name="saveButtonLabel">Send</ac:parameter>
  <ac:parameter ac:name="formName">mailman</ac:parameter>
  <ac:parameter ac:name="registrationFormTitle">Send email</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition">
        <ac:parameter ac:name="type">text</ac:parameter>
        <ac:parameter ac:name="fieldName">recipient</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Recipient</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition">
        <ac:parameter ac:name="type">text</ac:parameter>
        <ac:parameter ac:name="fieldName">title</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Title</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition">
        <ac:parameter ac:name="type">textarea</ac:parameter>
        <ac:parameter ac:name="fieldName">messageBody</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Message body</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition">
        <ac:parameter ac:name="type">file</ac:parameter>
        <ac:parameter ac:name="fieldName">myattachment</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Attachment</ac:parameter>
      </ac:structured-macro>
      <ac:structured-macro ac:name="confiform-entry-register">
        <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
        <ac:parameter ac:name="embedded">true</ac:parameter>
        <ac:rich-text-body>
          <p>&nbsp;</p>
        </ac:rich-text-body>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:name="confiform-ifttt">
      <ac:parameter ac:name="title">[entry.title]</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="action">Send Email</ac:parameter>
      <ac:parameter ac:name="who">[entry.recipient]</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:name="confiform-field">
            <ac:parameter ac:name="fieldName">messageBody</ac:parameter>
          </ac:structured-macro>
        </p>
        <p>
          <ac:structured-macro ac:name="confiform-field">
            <ac:parameter ac:name="fieldName">myattachment</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:name="confiform">
  <ac:parameter ac:name="saveButtonLabel">Send</ac:parameter>
  <ac:parameter ac:name="formName">mailman</ac:parameter>
  <ac:parameter ac:name="registrationFormTitle">Send email</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition">
        <ac:parameter ac:name="type">text</ac:parameter>
        <ac:parameter ac:name="fieldName">recipient</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Recipient</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition">
        <ac:parameter ac:name="type">text</ac:parameter>
        <ac:parameter ac:name="fieldName">title</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Title</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition">
        <ac:parameter ac:name="type">textarea</ac:parameter>
        <ac:parameter ac:name="fieldName">messageBody</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Message body</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition">
        <ac:parameter ac:name="type">file</ac:parameter>
        <ac:parameter ac:name="fieldName">myattachment</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Attachment</ac:parameter>
      </ac:structured-macro>
      <ac:structured-macro ac:name="confiform-entry-register">
        <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
        <ac:parameter ac:name="embedded">true</ac:parameter>
        <ac:rich-text-body>
          <p>&nbsp;</p>
        </ac:rich-text-body>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:name="confiform-ifttt">
      <ac:parameter ac:name="title">[entry.title]</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="action">Send Email</ac:parameter>
      <ac:parameter ac:name="who">[entry.recipient]</ac:parameter>
      <ac:rich-text-body>
        <p>[entry.messageBody]</p>
        <p>
          <ac:structured-macro ac:name="confiform-field">
            <ac:parameter ac:name="fieldName">myattachment</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>