Answers.Body: <p>Fatith, As per your requirement this is not straight forward and needs some custom coding or need good knowledge about using smarty api since the created id is stored as source contact id for an activity and data of source contact id is directly not available in smarty or as a token.</p>
  
  <p>Here is possible solution for this</p>
  
  <ol>
  <li><p>Create token and token values using CiviCRM <a href="https://docs.civicrm.org/dev/en/latest/hooks/list" rel="nofollow noreferrer">hooks</a>, then add tokens in message template</p></li>
  <li><p>Like @demerit said use smarty to get contact details of the person who created the activity. Below snippet should work in your case. You need to add the below code in desired place in message template.</p></li>
  </ol>
  
  <p>snippet:</p>
  
  <pre><code>{if $contact.activity_id}
    {crmAPI var='activityResult' entity='Activity' action='getsingle' return="source_contact_id" id=$contact.activity_id}
    {crmAPI var='contactResult' entity='Contact' action='getsingle' return="phone,email" id=$activityResult.source_contact_id}
    &lt;tr&gt;
      &lt;td&gt;Phone Number&lt;/td&gt;
      &lt;td&gt;{$contactResult.phone}&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Email&lt;/td&gt;
      &lt;td&gt;{$contactResult.email}&lt;/td&gt;
    &lt;/tr&gt;
  {/if}
  </code></pre>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-29T06:00:16.143Z
Answers.Text: Hello, Pradeep. Smarty civicrm.settings.php ('CIVICRM_MAIL_SMARTY', 1); I started doing it. Then I added the code you passed to the message patterns. The phone and email came, but the person who created the record came. The activity I wanted was for the new individual created.
Answers.UserDisplayName: Fatih ATEŞ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-29T08:30:37.793Z
Answers.Text: And how this new individual is attached to activity? Assignee or target?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-01T06:09:43.180Z
Answers.Text: Hi @pradeep-nayak I create an event with the steps "Create New> Individual> Actions> Phone Call". I would like to withdraw individual information from this event. When I add "Assigned to", I get the name and surname of the individual. I want the phone and E-mail information to come under it. I don't think this should be that hard.
Answers.UserDisplayName: Fatih ATEŞ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-27T17:31:52.950Z
Answers.LastActivityDate: 2019-07-27T17:31:52.950Z
Answers.UserDisplayName: Pradeep Nayak
Answers.Body: <p>You can edit the message template at admin - Civimail- message templates on the system workflow tab and use the api to look up the current user's info, as described at <a href="https://docs.civicrm.org/dev/en/latest/api/interfaces/#smarty-api-interface" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/api/interfaces/#smarty-api-interface</a></p>
  
  <p>e.g. <code>{crmAPI entity='contact' action="get" ...</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-27T14:15:02.980Z
Answers.Text: I think we're talking about different things. I would like to add a few more codes to the code above to add the phone and email address of the person I created the event to.
Answers.UserDisplayName: Fatih ATEŞ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-27T15:05:04.833Z
Answers.Text: Seems like we are talking about the same thing. See here for another example of using smarty and crmapi to look up and add info in a message template https://civicrm.stackexchange.com/questions/29230/how-to-create-tokens-for-custom-fields-participant-individual-organisation/29232#29232
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-27T13:13:18.577Z
Answers.LastActivityDate: 2019-07-27T13:13:18.577Z
Answers.UserDisplayName: Demerit
Body: <p>When a person is assigned any activity, the information goes as a form. However, I would also like to include the phone number and email address of the person from whom the event was created. How can I do that.</p>
  
  <blockquote>
    <p>administrator/?option=com_civicrm&amp;task=civicrm/admin/messageTemplates/add&amp;action=update&amp;id=1&amp;reset=1</p>
  </blockquote>
  
  <pre><code>    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
   &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
   &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  {capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
  {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
  {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
  
  &lt;center&gt;
   &lt;table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;"&gt;
  
    &lt;!-- BEGIN HEADER --&gt;
    &lt;!-- You can add table row(s) here with logo or other header elements --&gt;
    &lt;!-- END HEADER --&gt;
  
    &lt;!-- BEGIN CONTENT --&gt;
  
    &lt;tr&gt;
     &lt;td&gt;
      &lt;table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;"&gt;
       &lt;tr&gt;
        &lt;th {$headerStyle}&gt;
         {ts}Activity Summary{/ts} - {$activityTypeName}
        &lt;/th&gt;
       &lt;/tr&gt;
       {if $isCaseActivity}
        &lt;tr&gt;
         &lt;td {$labelStyle}&gt;
          {ts}Your Case Role(s){/ts}
         &lt;/td&gt;
         &lt;td {$valueStyle}&gt;
          {$contact.role}
         &lt;/td&gt;
        &lt;/tr&gt;
        {if $manageCaseURL}
         &lt;tr&gt;
         &lt;td colspan="2" {$valueStyle}&gt;
       &lt;a href="{$manageCaseURL}" title="{ts}Manage Case{/ts}"&gt;{ts}Manage Case{/ts}&lt;/a&gt;
         &lt;/td&gt;
         &lt;/tr&gt;
        {/if}
       {/if}
       {if $editActURL}
       &lt;tr&gt;
         &lt;td colspan="2" {$valueStyle}&gt;
     &lt;a href="{$editActURL}" title="{ts}Edit activity{/ts}"&gt;{ts}Edit activity{/ts}&lt;/a&gt;
         &lt;/td&gt;
       &lt;/tr&gt;
       {/if}
       {if $viewActURL}
       &lt;tr&gt;
         &lt;td colspan="2" {$valueStyle}&gt;
     &lt;a href="{$viewActURL}" title="{ts}View activity{/ts}"&gt;{ts}View activity{/ts}&lt;/a&gt;
         &lt;/td&gt;
       &lt;/tr&gt;
       {/if}
       {foreach from=$activity.fields item=field}
        &lt;tr&gt;
         &lt;td {$labelStyle}&gt;
          {$field.label}{if $field.category}({$field.category}){/if}
         &lt;/td&gt;
         &lt;td {$valueStyle}&gt;
          {if $field.type eq 'Date'}
           {$field.value|crmDate:$config-&gt;dateformatDatetime}
          {else}
           {$field.value}
          {/if}
         &lt;/td&gt;
        &lt;/tr&gt;
       {/foreach}
  
       {foreach from=$activity.customGroups key=customGroupName item=customGroup}
        &lt;tr&gt;
         &lt;th {$headerStyle}&gt;
          {$customGroupName}
         &lt;/th&gt;
        &lt;/tr&gt;
        {foreach from=$customGroup item=field}
         &lt;tr&gt;
          &lt;td {$labelStyle}&gt;
           {$field.label}
          &lt;/td&gt;
          &lt;td {$valueStyle}&gt;
           {if $field.type eq 'Date'}
            {$field.value|crmDate:$config-&gt;dateformatDatetime}
           {else}
            {$field.value}
           {/if}
          &lt;/td&gt;
         &lt;/tr&gt;
        {/foreach}
       {/foreach}
      &lt;/table&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/table&gt;
  &lt;/center&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
Tags: <joomla><email><phone>
Title: Cases - Send Copy of an Activity, Add Individual Phone and Email
ThreadText: # Cases - Send Copy of an Activity, Add Individual Phone and Email
  
  (Asked by: username_0 on 2019-07-27)
  
  When a person is assigned any activity, the information goes as a form. However, I would also like to include the phone number and email address of the person from whom the event was created. How can I do that.
  
  > administrator/?option=com\_civicrm&task=civicrm/admin/messageTemplates/add&action=update&id=1&reset=1
  
  ```
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title></title>
  </head>
  <body>
  
  {capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
  {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
  {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
  
  <center>
   <table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
  
    <!-- BEGIN HEADER -->
    <!-- You can add table row(s) here with logo or other header elements -->
    <!-- END HEADER -->
  
    <!-- BEGIN CONTENT -->
  
    <tr>
     <td>
      <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
       <tr>
        <th {$headerStyle}>
         {ts}Activity Summary{/ts} - {$activityTypeName}
        </th>
       </tr>
       {if $isCaseActivity}
        <tr>
         <td {$labelStyle}>
          {ts}Your Case Role(s){/ts}
         </td>
         <td {$valueStyle}>
          {$contact.role}
         </td>
        </tr>
        {if $manageCaseURL}
         <tr>
         <td colspan="2" {$valueStyle}>
       <a href="{$manageCaseURL}" title="{ts}Manage Case{/ts}">{ts}Manage Case{/ts}</a>
         </td>
         </tr>
        {/if}
       {/if}
       {if $editActURL}
       <tr>
         <td colspan="2" {$valueStyle}>
     <a href="{$editActURL}" title="{ts}Edit activity{/ts}">{ts}Edit activity{/ts}</a>
         </td>
       </tr>
       {/if}
       {if $viewActURL}
       <tr>
         <td colspan="2" {$valueStyle}>
     <a href="{$viewActURL}" title="{ts}View activity{/ts}">{ts}View activity{/ts}</a>
         </td>
       </tr>
       {/if}
       {foreach from=$activity.fields item=field}
        <tr>
         <td {$labelStyle}>
          {$field.label}{if $field.category}({$field.category}){/if}
         </td>
         <td {$valueStyle}>
          {if $field.type eq 'Date'}
           {$field.value|crmDate:$config->dateformatDatetime}
          {else}
           {$field.value}
          {/if}
         </td>
        </tr>
       {/foreach}
  
       {foreach from=$activity.customGroups key=customGroupName item=customGroup}
        <tr>
         <th {$headerStyle}>
          {$customGroupName}
         </th>
        </tr>
        {foreach from=$customGroup item=field}
         <tr>
          <td {$labelStyle}>
           {$field.label}
          </td>
          <td {$valueStyle}>
           {if $field.type eq 'Date'}
            {$field.value|crmDate:$config->dateformatDatetime}
           {else}
            {$field.value}
           {/if}
          </td>
         </tr>
        {/foreach}
       {/foreach}
      </table>
     </td>
    </tr>
   </table>
  </center>
  
  </body>
  </html>
  
  ```
  
  **Tags:** joomla, email, phone
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-07-27. Score: 2
  
  Fatith, As per your requirement this is not straight forward and needs some custom coding or need good knowledge about using smarty api since the created id is stored as source contact id for an activity and data of source contact id is directly not available in smarty or as a token.
  
  Here is possible solution for this
  
  1. Create token and token values using CiviCRM [hooks](https://docs.civicrm.org/dev/en/latest/hooks/list), then add tokens in message template
  2. Like @username_2 said use smarty to get contact details of the person who created the activity. Below snippet should work in your case. You need to add the below code in desired place in message template.
  
  snippet:
  
  ```
  {if $contact.activity_id}
    {crmAPI var='activityResult' entity='Activity' action='getsingle' return="source_contact_id" id=$contact.activity_id}
    {crmAPI var='contactResult' entity='Contact' action='getsingle' return="phone,email" id=$activityResult.source_contact_id}
    <tr>
      <td>Phone Number</td>
      <td>{$contactResult.phone}</td>
    </tr>
    <tr>
      <td>Email</td>
      <td>{$contactResult.email}</td>
    </tr>
  {/if}
  
  ```
  
  HTH
  
  username_1
  
  > **Comments:**
  > **username_0**: Hello, username_1. Smarty civicrm.settings.php ('CIVICRM_MAIL_SMARTY', 1); I started doing it. Then I added the code you passed to the message patterns. The phone and email came, but the person who created the record came. The activity I wanted was for the new individual created.  
  > **username_1**: And how this new individual is attached to activity? Assignee or target?  
  > **username_0**: Hi @username_1 I create an event with the steps "Create New> Individual> Actions> Phone Call". I would like to withdraw individual information from this event. When I add "Assigned to", I get the name and surname of the individual. I want the phone and E-mail information to come under it. I don't think this should be that hard.  
  
  ---
  
  ### Answer by username_2 on 2019-07-27. Score: 1
  
  You can edit the message template at admin - Civimail- message templates on the system workflow tab and use the api to look up the current user's info, as described at <https://docs.civicrm.org/dev/en/latest/api/interfaces/#smarty-api-interface>
  
  e.g. `{crmAPI entity='contact' action="get" ...`
  
  > **Comments:**
  > **username_0**: I think we're talking about different things. I would like to add a few more codes to the code above to add the phone and email address of the person I created the event to.  
  > **username_2**: Seems like we are talking about the same thing. See here for another example of using smarty and crmapi to look up and add info in a message template https://civicrm.stackexchange.com/questions/29230/how-to-create-tokens-for-custom-fields-participant-individual-organisation/29232#29232  
  
  ---
  
  