Hey All,
I was wondering if there was a way in which I could customize the following default email that Appian sends out notifying a task has been assigned?
Discussion posts and replies are publicly visible
I believe the most common approach to this use case is to turn off the email sent by default from the assignments tab on the user input task.
as you flow into the user input task flow through a Send Email smart service/task and configure a message to suit your needs.
What is the best way to get the link generated from the User Input Task and to integrate it on the Send Email smart service/task?
Hi ,
It really depends on the Appian version.
a!urlfortask() was introduced quite recently and should be the way to obtain the URL for a particular task. Once you have that URL, you can include a reference to it in a template used by the Send Email smart service.
https://docs.appian.com/suite/help/20.3/fnc_scripting_a_urlfortask.html
Hi Pedro,
I am using Appian 20.3, so I can use the function a!urlfortask(). My problem is that I do not know how to run the task(which ID I am gonna use) and email node on the same time. Or is there a way to run the task only from the email not from the original user input task?
Thank you in advance
Does a!urlForTask() have any particular way at this point to return a sites-specific link? When I run it within a blank expression rule editor, it returns a link to Tempo, which of course might not be acceptable for certain implementations. I don't know what happens when the rule is run from within a Sites interface, but when run during a process flow I have to assume it would also generate the Tempo link, no?
Hi - it's doable but takes a bit of a workaround. Basically you would split the process flow using an AND gateway; on one path, launch the task as normal. On the other path - possibly behind a short (10 second) timer to ensure the task is launched first - use a!queryProcessAnalytics into a Process Instance report pointing to your process model and process ID, where the result of the QPA call is the Task ID. After that, you could simply generate the URL using the task ID and send it in an email formatted as you wish.
Mike Schmitt to your question on returning a sites-specific link, there is an extra parameter in a!urlForTask() that determines whether it determines the full Tempo URL or only the last path segment (which basically determines the task unique identifier). If you have the function only return that identifier, you can append it to the end of your site URL like this:
concat( "<env url>/suite/sites/<site name>/page/<site page name>/task/", a!urlForTask( taskIds: ri!taskId, returnTaskPathOnly: true ) )
Ok so... in a process instance, how would we determine the site context for the user being assigned the task? Is there any way other than using cumbersome and unintuitive work-arounds?
Yeah unfortunately that part isn't any easier - you would still have to either send everyone to the same site or replicate the logic in the user start pages to determine which groups can see which pages.