Child pages
  • ConfiForms IFTTT macro actions for creating rich integrations in Confluence

Versions Compared

Key

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

With ConfiForms plugin you can create rich interactions and integrations in with your existing systems

Info

The page has moved to Configuring ConfiForms IFTTT actions and rules

 

 

Info

ConfiForms IFTTT macro is a powerful tool which helps you to built integrations with other systems: to send emails, to crete issues in JIRA, to build workflows in Confluence, to organise templates and rules. And also to create various types of cool things around ConfiForms and Confluence.

 

ConfiForms IFTTT macro is a part of ConfiForms Form definition and must be placed inside the ConfiForms Form macro body. You can place as many ConfiForms IFTTT macros as you want. Each macro has an event it is binded to. There are 3 types of events in ConfiForms:

  • onCreated
  • onModified
  • onDeleted

 

You can define the "condition", to limit the scope when action is fired. Meaning that you can define to execute an action only when certain condition is met.

Conditions macro parameter expects a filter, more about filters could be found here: ConfiForms Filters

 

At the moment ConfiForms IFTTT macro has 31 action types to choose from:

  • Send Email

  • Create Page

  • Make Request

  • Send Notification

  • Create / Update ConfiForms Entry

  • Delete ConfiForms Entry

  • Create Task

  • Create JIRA Issue

  • Run JavaScript

 

Each action has different set of parameters to set. In most cases you can use references to your entry fields via [entry.FIELD_NAME] in macro parameters, so these will be replaced with actual values.

 

Warning

Important

The execution order for actions is the same as you put them inside the ConfiForms Form macro body (obviously, filtered by event type). IFTTT execution also supports referencing of results for previous execution: Advanced integrations with IFTTT macros with ConfiForms

 

Let's see each "action" is details:

Send Email

There are couple of tutorials on using this action type:

Create Page

You can create a page based on the template in this IFTTT macro body. You can have a template embedded or you can reference Confluence template with

Code Block
[template.TEMPLATE_NAME]

Templates can reference field values using 

  • [entry.FIELD_NAME] to embed the values statically
  • using ConfiForms Field macro to have a dynamic reference to original form, so when the value is changed in the original form then it will get's changed in the page created

 

You can set your own root page (also dynamically based on the values in your entries, as usual... by referencing via [entry.FIELD_NAME]), you can enable custom permissions on newly created pages 

Additional tutorials:

Make Request

This is very technical action type and requires a bit of understanding on what is a HTTP request.

So, ConfiForms can do a GET request to the URL you specify in ConfiForms IFTTT macro parameters, values will be referenced and set dynamically (same [entry.FIELD_NAME]  way of referencing field values)

 

Send Notification

This action type send internal Confluence notification to the user specified, the notification will be visible in the "workbox", in the right top corner of Confluence toolbar.

Sending this type of notifications is very similar to Sending email, the difference is only in where the notification ends up. And what you can use for notification message body (defined through the ConfiForms IFTTT macro body) - free to use Confluence formatting macros, as they are correctly shown inside the Confluence notifications workbox.

Confluence Notification could be sent only to a registered user (email notification can be sent to any external email address, unless your email server does not support that)

 

Create/Update ConfiForms entry

This action helps you to create different types of update rules for your ConfiForms entries. You can create an audit for all changes, you can update entries in other forms or entries in the same form based on chosen criteria

Same action type is used for creating new entries and updating existing and the parameter to indicate that is "entryId"

So, to create record you will specify:

Code Block
someparam=[entry.somefield]&anotherparam=[entry.another]

But to update existing record you will need to have something like this:

Code Block
entryId=[entry.id]&someparam=[entry.somefield]&anotherparam=[entry.another]

You can also set constant values, does not have to be a reference to some field value

Code Block
someparam=MY CONSTANT&anotherparam=[entry.another]

The above example will set "someparam" to constant value of "MY CONSTANT" and "anotherparam" will be set to a value found on the field named "another"

 

Warning

Important bit which is often forgotten is to specify which form and where it is located (form name and pageId), the last parameter in the macro. If this is not specified then nothing is executed, as ConfiForms does not know where this action to be applied

 

Other tutorials:

...

Delete ConfiForms Entry

You can automatically delete entries, and this is done by specifying a filter. When you want to delete just a record created then the filter is by id:

Code Block
id:[entry.id]

Important difference (between Creating and Deleting actions) here is the name of the field used to reference entry ID. In filters you need to specify it as "id" and in field parameters you will need to use "entryId"

So, deleting entries happens by filter, more about filters ConfiForms Filters

You will need also to specify explicitly which form to use and where it is located (pageId). See last parameter in Macro editor for ConfiForms IFTTT macro for this action type

 

Tutorials:

Create Task

"Create Task" action is very similar to "Create Notification" action. The only difference is that it creates a personal task for the user specified. Important to note that Atlassian have removed the support for personal tasks in recent version of Confluence, so this action type is provided and should be used for Confluence versions prior to 5.5 (see more https://jira.atlassian.com/browse/CONF-33614).

 

Create JIRA issue

You can create JIRA issues from ConfiForms entries. However, this is a bit technical to setup as the integration is done through the JSON document you will need to prepare. See tutorial below for more details and examples. Important: you must have a correctly configured Application link to JIRA

Also, there are some helpers to help you with preparing correct JSON, see Virtual functions

This action type supports uploading files to created JIRA ticket, an example is also available in the same tutorial.

Important to note that currently this action selects a primary app link to JIRA, if you have more than 1 JIRA connected then you will be able to create JIRA issues only in your primary JIRA (the one set as primary in your application links)

Tutorials:

 

Run JavaScript

This action type is used to inject some custom JavaScript code into the page on certain event/condition.

Your script must be valid and work correctly with Confluence (using AJS.$). The script will be placed in "document.ready"

Code Block
AJS.$(document).ready(function () {
 
   ... you script
 
});

Please make sure it runs correctly, as if it fails it might affect other parts of Confluence functionality which relies on Javascript execution

 

 

 

...