To email a route with a list of its activities you must first create a button. To do so, please go to Setup > Buttons > click on the "+" button:
In the button settings, fill in all the fields like in the example below. Make sure to add a "Send email" action under the "Actions" section:
In the "Send email" action, you need to add the following:
Name (of the action)
To (recipient's email)
Subject
Body
To include dynamic content in your email subject or body you will need to use a twig code wrapped in {{ }}. For example, for the subject, you may use:
"{{ record.name }}" route is created for {{ record.date }}
And for the body:
Route distance is: {{ record.distance_km }} km
<br>Approx duration is: {{ record.total_duration | date('H:i:s', '+00:00 GMT') }} hrs
<br><br>Route waypoints are:<br>
{% for activity in record.activities %}
<br>
<p style="text-decoration: underline;">Waypoint #{{loop.index}}</p>
<strong>Name:</strong> {{ activity.objectName }}<br>
<strong>Address:</strong> {{ activity.address }}<br><br>
{% endfor %}
Note that in the above script, we've also used some HTML and inline CSS to format our email template according to our requirements. You can then execute this action by clicking the "Send route email" button (that we created earlier) from the route's context menu in Table View:
The final result of this example will look like this:
In case of any difficulties please don't hesitate to contact Mapsly support viat chat or email [email protected].