• Confluence is currently running with all non-system plugins disabled, some functionality may be missing

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you are unfamiliar with ConfiForms app, please start with the basics: Creating a form in Confluence

This is how the form will look like after you complete this tutorial

Image Added

The form has 2 fields of type text and one texarea field to input the message

The form's configuration in the Confluence editor looks like this

Image Added

And we will have a ConfiForms FormView Registrations Control macro to render the form, like this

Image Added

Configuration for ConfiForms Field Definitions is very simple - just 3 fields, with names and titles, selecting the field type as "text" for the first two, and "textarea" for the 3rd field

The interesting part is the IFTTT Integration Rule, which is configured like this. We reference field's values via [entry.field_name] notations in corresponding macro parameters

Image Added

Image Added

The macro has the reference to "message" field definition in it's body (via ConfiForms Field macro), which will be used as a message contents for the email


Complete solution in storage format could be found here

Code Block
<ac:structured-macro ac:name="confiform" ac:schema-version="1" ac:macro-id="93168f84-1c27-431b-8549-8f7bfdb7ce5a">
  <ac:parameter ac:name="formName">emailer</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1"
                           ac:macro-id="53e663eb-6627-4ad1-bf3f-d84c1dd0374f">
        <ac:parameter ac:name="fieldName">recipient</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Recipient email</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>&nbsp;- text field to input phone number
    </p>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1"
                           ac:macro-id="ae84d7d2-218a-4231-b8b1-a1d84ecd8dbd">
        <ac:parameter ac:name="fieldName">subject</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Message subject</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
        <ac:parameter ac:name="required">true</ac:parameter>
      </ac:structured-macro>&nbsp;- text field to input email message subject
    </p>
    <p>
      <ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1"
                           ac:macro-id="9e3af553-2845-4002-9154-f77608a1808b">
        <ac:parameter ac:name="fieldName">message</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Message</ac:parameter>
        <ac:parameter ac:name="type">textarea</ac:parameter>
      </ac:structured-macro>&nbsp;- textarea field to input email message text
    </p>
    <p class="auto-cursor-target"><br/></p>
    <p class="auto-cursor-target">-- ConfiForms IFTTT rule to send email message</p>
    <ac:structured-macro ac:name="confiform-ifttt" ac:schema-version="1"
                         ac:macro-id="81144b22-1890-4b56-a1de-acffd0d129c2">
      <ac:parameter ac:name="action">Send Email</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">[entry.subject]</ac:parameter>
      <ac:parameter ac:name="who">[entry.recipient]</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:name="confiform-field" ac:schema-version="1"
                               ac:macro-id="5db403eb-7abb-458f-acf3-66109a0c9b29">
            <ac:parameter ac:name="fieldName">message</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p class="auto-cursor-target"><br/></p></ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target"><br/></p>
<ac:structured-macro ac:name="confiform-entry-register" ac:schema-version="1"
                     ac:macro-id="3495c8ac-35b6-40ad-9ecf-9fe66b10d7dd">
  <ac:parameter ac:name="overrideSaveButtonLabel">Send</ac:parameter>
  <ac:parameter ac:name="formName">emailer</ac:parameter>
  <ac:parameter ac:name="formTitle">Send email message</ac:parameter>
  <ac:parameter ac:name="successMessage">Message has been sent</ac:parameter>
  <ac:rich-text-body>
    <p><br/></p></ac:rich-text-body>
</ac:structured-macro>