I have created visualforce email template for Task Object. Email pops up to the respective user Id when sent through 'Send test and verify merge fields' with content specified in template. And when the same vf email template when called from workflow for Task email pops up but with empty content. Please guide me. Thanks

The code below is the Visualforce email template created. On creating workflow for Task object with email alert, email gets popped up but with no content.

    <messaging:emailTemplate subject="AOO" 
    <messaging:htmlEmailBody >
    hr {
       display: block;
       margin-top: 0.5em;
       margin-bottom: 0.5em;
       margin-left: auto;
       margin-right: auto;
       border-style: inset;
       border-width: 1px;
       border-color: blue;
    table {
        font-family: Times New Roman, sans-serif;
        border-collapse: collapse;
        width: 75%;
    td, th {
       border-bottom: 1px solid #ddd;
        text-align: left;
        padding: 8px;
    <apex:repeat var="vt" value="{!relatedTo.Tasks}">
        <td><b>Due date</b></td>
        <td>[email protected]</td>
        <td><b>Last ModifiedBy</b></td>
    <apex:repeat var="bt" value="{!relatedTo.Tasks}">
    Remainder <input type="checkbox" name="Remainder" /></td>
  • Does the template refer to a VF component? If yes, check whether the user profile has access to that component. Jan 2, 2018 at 10:24
  • Thank you Sagnik. Currently I'm the Admin of this org. , so i have access to every components. Jan 2, 2018 at 10:55
  • Reduce the size of the problem space to the smallest possible email template; then edit your question with details
    – cropredy
    Jan 2, 2018 at 23:40

2 Answers 2


There is a known issue with VF email templates and WFR that can cause these kinds of issues, https://success.salesforce.com/issues_view?id=a1p30000000SdBfAAK Recipient bind values are blank. The work around is either get all the data you need from the RelatedTo value or else use a trigger instead of WFR.


I have using the same kind of functionality where I am sending it as a PDF. Please check that your VF has component has all the values.

<apex:page docType="html-5.0" action="{!yourApexMethod}" controller="ApexCustomController" > <!-- your VF page --> </apex:page>

yourApexMethod will run when the vf page is called and creates the necessary data which is you want it to be displayed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .