Example 1: Send Email To An Administrator When A Project Request Created
This first example shows how to send an email to an administrator when somebody creates a Project whose status is Requested.
1.First, go to the Workflow Manager page and press the Create button to create a new Workflow.
2.Give it a name, like Project request to admin
3.Specify the Main Type as Project
4.Add a Database Event, give it a Name, set the Target Type to be Project and Create Events to True.
5.Add a condition: Status is Requested
6.Add an Email Workflow Action, give it a Name.
7.Add the recipients you require
8.Enter the email's subject
9.Specify the text of the email. This can reference properties of the project created and the user who created it.
Example 2: Send Email To A New User After They Register
This example shows how to create an Email Workflow that will be sent to a new user immediately after they register with Calpendo. We need to make sure it gets sent when a new User is created, and that the email gets sent to the new user.
1.Create a Workflow with a Database Event that is triggered when a User is Created, to do this give it a Name, set the Target Type to be User and Create Events to True.
2.Add a condition: Status is Requested
3.Add an Email Workflow Action, give it a Name.
4.On the Recipients tab in Property Paths , set Source #? UserMakingTheChange.
5.On the Email Subject tab, enter the text you want to be the subject of the email.
6.On the Email Body tab, enter the text you want to be the main content of the email.
Example 3: Send Email To A User When New User Request Denied
This example shows how to send an email to user who has just registered (so the status is set to Requested) but had their request denied (so the status has changed to Denied).
1.Create a Workflow with a Database Event that is triggered when a User is Updated, to do this give it a Name, set the Target Type to be User and Update Events to True.
2.Add a condition: Old Value Status is Requested.
Add a condition: New Value Status is Denied.
3.Add an Email Workflow Action, give it a Name.
4.On the Recipients tab in Property Paths , set Source #? to be New;
5.Enter the email's Subject.
6.Enter the email's main content
Example 4: Send An Email When A Booking Is Cancelled
This example shows how you can do quite complicated things by adding conditions to achieve the desired result. We're going to create an Email Workflow that will tell interested people when there's a cancellation on a particular resource. The purpose of this email is to enable resources to be better utilised by filling in gaps in the bookings. However, if the booking being cancelled is too far into the future, there's little point telling people about it, so we will make sure the booking is no more than 21 days into the future. Also, if a booking has only just been made, then sending out an email is likely to be viewed as spam. So we will make sure the booking was created before 1 hour ago.
For this last requirement to work, we rely on the fact that Calpendo stores the date and time a booking was created on the Booking.
1.Create a Workflow with a Database Event that is triggered when a Booking is Updated, to do this give it a Name, set the Target Type to be Booking and Update Events to True.
2.Add a condition: Old Value not equal to Cancelled
Add a condition: New Value equals Cancelled
Add a condition: New Value of dateRange.start earlier than now plus 21 days to the day
Add a condition: Old Value of created earlier than now minus 1 hour with accuracy of a minute
3.Add an Email Workflow Action, give it a Name.
4.Add the recipients you require.
5.Enter the email's Subject and Body. Text should include the name of the resource and the time of the booking.
6.Enter the email's body