Send Emails
1. Overview
The "Send Emails" action step allows you to automate the sending of personalized emails to various recipients, using dynamic data extracted from a configured VIEW. This step is ideal for sending reports, notifications, or any type of communication that needs to be tailored based on specific information for each recipient.
2. Configuring the VIEW
You can use any type of VIEW (Data Analysis VIEW, Table VIEW, or SQL VIEW) to supply the data used in the emails.
Table Binding (for SQL VIEW): When using an SQL VIEW, it is essential to bind the table used in your query. This ensures that the system correctly filters the data and applies the variables to generate the emails, particularly when dynamic links are used.
3. Configuring Dynamic Fields
After configuring the VIEW, you will see a preview of the results. At this stage, you can use the columns of the VIEW to define the dynamic fields of the email:
Recipient (Email): Select the VIEW column that contains the recipient's email address. Each row in the VIEW corresponds to one email sent.
Email Subject: This can be a combination of fixed text and VIEW variables. For example, "Hello, $Name" personalizes the subject for each recipient.
Email Body: Similar to the subject, the body can combine fixed text with variables from the VIEW columns. Each row in the VIEW represents a personalized email.
Text Formatting: While writing the email body, you can format the text with options such as bold, italic, font size adjustments, bullet points, or numbered lists. You can also convert text into a hyperlink, which is especially useful with the variable $Link. For instance, you can write “click here” and hyperlink it to a dynamic link, avoiding the need to display the full URL in the email.
4. Dynamic Links
Configuring Dynamic Links: By selecting the "Dynamic Link" option, you can choose a folder and a screen within Mitra. The system automatically generates a dynamic link, identified as the $Link variable.
Usage: This link can be inserted into the email body, allowing the recipient to directly access a specific screen in Mitra without logging in. The link is filtered based on the corresponding row's data, ensuring each user only sees the information relevant to them.
5. Importance of Table Binding in SQL VIEW
When using an SQL VIEW, binding the relevant table (linking the vendor's table with the vendor ID) is critical. This binding ensures the dynamic link functions correctly, filtering the data so that each recipient only views their specific information on the linked dynamic screen.
6. Example Use Case
Imagine a scenario where you send a weekly email to each vendor. The email includes a personalized greeting, a summary of their weekly sales, and a link to an interactive dashboard where they can analyze their data in detail.
Example Email:
Subject: Weekly Sales Summary
Body:
Hello, $Name,
You sold $TotalVendas last week.
[Click here]($Link) to view the interactive dashboard and analyze your sales.