When setting up a Workflow, you will first need to set up a trigger event to determine when the Action will run. For a list of Trigger Events see our article here: Workflow Trigger Events
This article will focus on Notification Actions. A user can be notified by 3 automated workflow actions. They can receive an E-mail or combined email, and be notified via Slack integration with a Webhook.
Send Slack Message
To send a slack notification it will require you to obtain the Webhook from Slack, select 'Notify' as the Action and 'Send Slack message' as the Result.
Next you will need to add a message.
You can reference Record data by using @Softools.FieldValue("FieldID") as a Keyword.
You can also add a link to the Record that generated the workflow by adding the Keyword @Softools.RecordLink()
Note: For records with multiple forms where you want to attach the record link with the correct form showing (e.g., you have three forms, one for proposal of an idea, one for evaluation of the idea and one for approval and you want to send the record link but open on the approval form), you would use the same Keyword - @Softools.RecordLink() but with a forward-slash and then the form ID like so:
The message will take a similar syntax to Markdown. Here is an example message for when a support ticket has been completed:
A '@Softools.FieldValue("dPriority") @Softools.FieldValue("dType")' ticket has been updated on the Support Ticketing App \n*@Softools.FieldValue("oTicketNumber"): @Softools.FieldValue("oTitle")* @Softools.RecordLink() \n ```Status Update: \n @Softools.FieldValue("dStatus") \n\nAssignee: \n @Softools.FieldValue("pAssignee_Text") \n\nComments: \n @Softools.FieldValue("dComments") \n\nProject: \n @Softools.FieldValue("dProject") ```
Note: For more guidance on Slack message formats, see their support article here.
Once you have added the message you will need to integrate to the correct channel by finding the channel Destination URL. To do this open the channel that you would like to add an integration to and then select 'Add an app' from the COG menu.
Search for 'Incoming Webhooks' to send data to slack in real time. Add a configuration with the chosen channel in the 'Post to Channel'. Then copy and paste the Webhook URL form this screen into the 'Destination URL' and the integration is complete.
Recommendation: Set the 'Customize Name' and 'Customise Icon' options. For more details on setting up incoming Webhooks to Slack see their support article here.
Send Email and Combined email
You can send an email to a User that contains information from the Record that generated the Workflow. Firstly, select 'Notify' as the Action and 'Send Email' as the Result.
Below is example content for sending information about a RAID item that has turned Status Red:
First select 'Notify' as the Action and 'Send Email' as the Result.
Email Content: You can then choose if you would like to 'Use Base Template?'. If you select this format then it will format the email to include a Softools header and footer to the body of the message.
You can now set the Subject for the email and the message content. For these you can reference Record data by using @Softools.FieldValue("FieldID") as a Keyword. You can also add a link to the Record that generated the workflow by adding the Keyword @Softools.RecordLink("text shown"). This will create a clickable link to the record if the user clicks the "Text shown" in the email. If you just use the @Softools.RecordLink()without the text to click, then URL will be shown as clickable text
For our example we will use the following in the Subject and Message:
@Softools.FieldValue("Title") has turned Status Red
- A RAID item (@Softools.FieldValue("Title") ) has turned status RED
- Owner : @Softools.FieldValue("Owner_Text")
- Client : @Softools.FieldValue("Client")
- Status: @Softools.FieldValue("Status")
- Tag: @Softools.FieldValue("Tag")
- Due Date : @Softools.FieldValue("DueDate_Formatted")
- Click here to load the record : @Softools.RecordLink()
- @Softools.RecordLinkHtml('click here to show my project') shows an actual URL link with the text provided as the parameter.
- This is the project Description : @Softools.FieldValue("Description")
Send Combined Email: This function is similar to the node above with some differences suited for larger amounts of data.
- "Send email" sends one email per record to all the recipients. You can use template substitutions (@Softools.FieldValue... etc) within the subject and message body. The attachments of each email contain only the one record the email is about.
- "Send combined email" sends one email per workflow batch (typically only one email unless the number of records matched is very large) to all the recipients. You cannot use template substitutions (@Softools.FieldValue... etc) within the subject or message body. The attachments are combined reports of all records matched.
Attachment: Within the email, you can choose to include a Templated Report as an attachment - at the bottom there is an 'Add Attachment' button allowing you to specify the templated report you wish to attach to the email going out. This needs to be a pre-existing word export template at Record level.
Note: Attachments are added to emails via a link, this link will last for 30 days.
Note: The entry for the message is Rich Text. This means that it if you copy and paste values in then it will keep the text formatting. This may cause a conflict for the @Softools.FieldValue("Field") references if the text format has changed due to a copy and paste of the Field ID. We recommend that you type the full keyword reference and do not copy and paste values into the Email message to avoid this.
Note : Some field types are not supported because the emails are rich text and so cannot support more complex field types such as ImageFields, Grids, InAppChart fields... For these, it is better to include them in a Templated Report and attach that.
Note: Adding a static email address to an email workflow will require you to create an email field in the app with the email as the default value and then reference that field in the workflow as: @Softools.FieldValue("EmialFieldId") otherwise the '@' in the email will try and reference a field that doesn't exist
Following the above example will send an email that looks like this:
Lastly, you will need to say which Users should receive the email. To do this type in the 'To' box and you can search for specific Users and Teams or Users named in Person and Email Fields.
Notes: Notes is a really useful area for new app builders or collaborating app builders, this allows you to note down what the purpose of each node is used for to help yourself if you make changes down the line or for other app builders who work on the app and need some context
Note: The recipient list must contain one 'To' in order to send the email. If a User is referred to more than once as a result of being selected as a User and a member of a Team and named in a Person or Email Field then they will only receive the email once in priority 'To' then 'Cc' and then 'Bcc'.
Make sure to click the 'Save' button when making any changes in order for them to be added to the next app version. Once you have made all the changes you need to an application you are then ready to publish it to workspace.