# Workflow post functions

You can send automatic emails to senders of incoming emails. These emails can be fully customized with the sender's email address saved in a custom field.

1\. Go to **Issues** --> **WORKFLOWS** --> **Workflows**.

2\. Choose the Workflow and click **Edit**.

3\. Switch to **Text** mode.

4\. In the **Transitions (id)** column click on the transition you would like to add the post function to.

5\. Switch to the **Post functions** tab, click **Add post function** and choose **Email This Issue from the list**.&#x20;

![](https://4173056255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY44m7ZY1jU4Arh2tzwNn%2Fuploads%2FXbIK28Ge5VwrvlGI92sc%2Foutgoing_38.jpg?alt=media\&token=168f197d-852d-4ea7-a48c-864e492a63db)

{% hint style="warning" %}
**Important**: It is strongly recommended that the Jira Email This Issue post function is positioned after the system post function **Re-index an issue to keep indexes in sync with the database** in the list. This is to make sure that the updated attributes are included in the emails.
{% endhint %}

### Execute Post function conditionally <a href="#workflowpost-function-executepost-functionconditionally" id="workflowpost-function-executepost-functionconditionally"></a>

<mark style="color:green;">SINCE VERSION 5.5.0.7</mark>

On the **Add Parameters To Function** panel you can specify a JQL filter criteria as part of the post function configuration. When specified, Jira Email This Issue executes the post function (i.e. sending emails from the post function) only if the issue matches the JQL criteria. You can add multiple post functions with different JQL filters to implement a complex conditional logic.<br>

![](https://4173056255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY44m7ZY1jU4Arh2tzwNn%2Fuploads%2FbKfP6ng5ghElgndJsqlu%2Fimage.png?alt=media\&token=72ba6448-02ff-4b58-8c23-28dfe9f98779)

### Configuring email attributes <a href="#workflowpost-function-configureemailattributes" id="workflowpost-function-configureemailattributes"></a>

1\. Configure email recipients.

![](https://4173056255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY44m7ZY1jU4Arh2tzwNn%2Fuploads%2FaN3Jl8F8MXUa9BfKwmvy%2Fimage.png?alt=media\&token=037cbe61-da4f-4d3b-b518-871fa9a8b9f2)

{% hint style="info" %}
**Note**: You can select users in the User Picker pop-up window that opens after clicking the icons on the right.
{% endhint %}

![](https://4173056255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY44m7ZY1jU4Arh2tzwNn%2Fuploads%2FCubfNgs7D4kOghe2mntB%2Fimage.png?alt=media\&token=e00320e5-2f9f-4518-9bad-166b12108a49)

2\. Add a subject, a body, choose whether to include a transition comment in the email body, the type of attachments you want to add (if any) and the template you'd like to use.

![](https://4173056255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY44m7ZY1jU4Arh2tzwNn%2Fuploads%2FEjOuWG5LIYhGxe4IWK9R%2Fimage.png?alt=media\&token=fd0bf5c7-efad-4db9-ab12-8f19b0a6c891)

<br>

3\. Specify email options.

{% hint style="info" %}
**Note**: Email options are by default prefilled with the global default values.
{% endhint %}

![](https://4173056255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY44m7ZY1jU4Arh2tzwNn%2Fuploads%2FnqX6en0UmwOkDqVkwSxh%2Fimage.png?alt=media\&token=05af7a02-75f4-4485-893b-9ab79021646a)

4 Click **Add** to finish the procedure.<br>

<br>

<br>
