Hi,
I have the following use case: The client needs to approve or reject a batch of invoices, but that everything is done through email, and they are external users who will not have a user in appian, they do not want to enter the platform, but from the mail they have the option to approve or reject. What occurred to me was that from the mail call a webAPI and it executes the startprocess, according to the link (approve or reject) that the user selects.
Is this possible? Can I run a POST type webAPI from an email link? If not possible, what other way could I implement in this use case?
Thanks.
Discussion posts and replies are publicly visible
A link in an email can not trigger a POST API call. And to call Appian, authentication is required.
One option might be to reply by email and a specific keyword. That email would start a process.
Another option is to create an Appian Portal which accepts a unique identifier sent by email. On this portal these external users could approve or reject.
Hi, Stefan is absolutely correct - an email can not trigger a POST API call.
An alternative solution would be sending an email to the external users, with a link in it. If the link is clicked, it generates an answer email [utilizing mailto:] with the recipient set to the process model ID (you can obtain this with a!queryProcessAnalystics() docs.appian.com/.../fnc_system_a_queryprocessanalytics.html) and with the desired keyword, 'reject' or 'approve'.
In the process model you will have the normal start node and the received message event set to 'email'. The flow from the incoming email node will go to the gateway where it is determined what path further should be followed. You might consider a timeout or a reminder loop, if the external user is not responding to avoid having active processes sitting in the environment.
Thank you very much Stefan and juergeng0002
I'm going to try with the email option that would start the process
Stefan,
Do you have tips for how to insert/extract custom property fields from emails? I'm running into a similar manner as the original poster, but I'm having a very difficult time trying to get the information out of the email. I see in the documentation about retreiving custom properties, but nothing about how to actually implant and/or use them in the email itself. Any help/tips?I am also having a difficult time with splitting the body information. Using any of the body properties includes the company footer in what is stored in the variable being used to hold the body.
As an email has zero structure, there is no good or fool proof way of doing this.
What is your concrete use case? If it is about requesting data from a non-Appian user, did you consider Portals?
Currently, it is all POC and being investigated/conisdered. But from my understanding with the clients, it is very similar to the original post. The client does not see a nessecity for certain users to always have to login to Appian in order to approve/deny/reject/etc certain tasks or updates, and wanted it explored for if there is a way to do so using email. I know the send/receive email sections of the Appian documentation mention using custom properties, but I don't see any information about how to correctly set them up or retreive them. It's mentioned at the bottom of this article here, at the very least.docs.appian.com/.../Receive_Message_Event.html
I assume these custom properties are email headers.
Do you act in a highly regulated environment? If yes, then an approval by email is probably not a good idea.
RyanB, milagrosadrianar
Go through the following URL - https://docs.appian.com/suite/help/23.1/Receive_Message_Event.html#message-properties
Basically you need to configure the receive message event in the Start node as following.
With Email message types, key-value pairs are treated as custom properties.
To obtain the value of a key specified in a message, the name of the key should be included in the definition of a mapping. For example, if the key-value pair [incidentId =222100] is sent in an email message, you can capture incidentId in a receive message event by creating a mapping with the following definition:
[incidentId =222100]
msg!properties.incidentId
Include [incidentId = <value>] in either subject or email body
I understand it's probably not a good idea. But at this point currently, I'm mostly just tasked with checking if it can be done. Even if it's not being implemented, I'm too far into it now myself, that I want to see it through to the end of even being possible. I appreciate the concern and warnings regarding best practices.
Abhay,
Unknown said:Include [incidentId = <value>] in either subject or email body
That's the information I was looking for! I had all of my input mapped in the process model, but I couldn't get any of the information out of the body. Turns out I was setting up my values wrong, I was usnig colons instead of equal signs. Thank you so much, I couldn't find any information in the documentation about how to actually set up custom properties, just how to call them.