"Tasks" is a feature that allows human interaction inside workflows. Any flow that requires non-automated approval can be easily built using this powerful module.

To understand how this module works, let's dive straight into a simple example.

Say we wanted to approve documents once they enter a specific folder in our Google Drive. Documents get manually or automatically sent to a specific folder which triggers a flow in Appmixer. This flow makes sure a relevant person gets notified and is incentivised to approve or reject the document. After the approval or rejection, the document is automatically sent either to the "Approved" or "Rejected" folder. A process that would be somewhat time-consuming is now a question of a single click.

Before we uncover all the steps required to build such a flow, let's start from the end and see what the flow looks like in Appmixer when it's complete.

Let's see how we've built the flow from scratch. First, we need to set up the trigger. In this case, the flow starts every time a new file gets uploaded to the "Waiting for approval" folder in our G-Drive.

We want to notify the approver via email. Therefore, we need to use the "RequestApprovalEmail" component under the "Tasks" module. As said earlier, this module makes sure the relevant person receives an email where she can easily approve or reject the document. First, we set the Task title and Description.

Next, we need to define the Requester and Approver emails.

Last but not least, we need to set the "Decision by" date. Here, we will use Modifiers and will set the due date to the time the document was created + 24 hours. In other words, the approver has 24 hours to approve the document after it's been uploaded to the "Waiting for approval" folder.

Notice there are three paths from the Tasks component: approved, rejected, and due. As the names suggest, "approved" sets the path once the document gets approved, "rejected" allows you to set a different path in case the document gets rejected, and "due" helps you adjust the flow when the task is due. In our case, we want to notify the approver via SMS.

When the document gets approved, we need to export the relevant file from our G-Drive and upload it to the relevant folder.

Also, we want to send a Slack message every time a document gets approved.

Notice how we've used Variables throughout the setup. Thus, we will make sure the flow works with the right file throughout the execution, and we get a notification on Slack with a better context (using the file name and web link in the message body).

Now when the "Approved" path is set, let's finalise the "Rejected" path. To save you a little bit of time, see the already set up path below. Needless to say, the process for similar to setting up the "Approved" path.

As stated above, we want to notify the approver via SMS when the task is due. This way, we reduce the risk of tasks being forgotten.

We're all set now. When we start the flow, upload a file to the "Waiting for approval" folder and the file gets approved or rejected, we should see in the Logs that the flow runs successfully.

You may wonder, how does the approver approve or reject the documents? Glad you ask. In this case, the approver can either hit the "Approve" or "Reject" button in an email that is sent as part of the "RequestApprovalEmail" component...

... or she can visit the "Tasks" dashboard where she sees all the tasks.

As you can see, instead of logging into a G-Drive account, finding the right folder, opening a document, and then moving it into the right folder (Approved or Rejected), the approver hits a single button and Appmixer takes care of the rest. Simple, yet very powerful.

You may have noticed the other component under the "Tasks" module called "RequestApproval". This component works similarly to RequestApprovalEmail, but it allows you to set a specific path also when the task is created. For example, you may want to create a task in Asana. In this case, no email is sent. Instead of that, you use the links for approval/rejection and pass it to Asana (or any other platform).

Note that both these components are templates and are assumed to be adjusted for your specific needs. For example, you might want to use your own email provider, or use your own email template with your own branding and different wording.

Great job! You went through a pretty extensive example of how Tasks can be used. Next, we'll look at another great module, Language.

Last updated