---
title: "How to assign issue automatically based on Email Keywords"
canonical: "https://support.appfire.com/space/SUPPORT/80875878/How%20to%20assign%20issue%20automatically%20based%20on%20Email%20Keywords"
format: markdown
---
If you’ve configured your instance to create issues through email requests, you can refer to this article to learn how to automatically assign newly created issues (through email requests) to a specific user. We will assign issues, based on the keywords in the email subject/email body - using the [Update Any Issue Field (JSU)](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518373) post function.

> ℹ️ Use cases:
> ℹ️ 
> ℹ️ - How to compare the value of a text field using a [Regular Expression pre-condition(JSU)](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518693)
> ℹ️ - How to assign the issue to a specific user using [Update Any Issue Field (JSU)](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518373) post function

## Instructions

Example scenario: If the email has 'Dev' or 'QA' in the subject, the ticket needs to be assigned to user1. If it has 'Deploy' or 'Prod', it needs to go to user2.

1. Log in as a Jira Admin and go to the workflow that is associated with your project and issue type.
2. In the workflow, click **Edit** to switch to Edit mode.
3. Select the *Create* transition, then select the *Post Functions* tab and click **Add post function***.*
4. Select the *Update Any Issue Field (JSU) *post function then click **Add.**
5. Add two [Regular Expression](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518693) pre-conditions: One for *Dev* and another for *QA, *then add the following regular expressions:  
For *Dev* :
  For *QA* :
6. Select **OR** in the pre-condition section and select **True** under “Preconditions must be”.
7. Select the *Assignee* field and add the account ID of user1 in the *Field Value* as illustrated below:
8. Click **Add**.
9. Similarly, add another [Update Any Issue Field (JSU)](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518373) post function on the *Create* transition for 'Deploy',  'Prod' and add the account ID of user2 in the *Field Value.*
10. Publish your workflow.
11. If you want to verify the email body instead of the subject, then replace *Summary* with *Description* in the Regular Expression pre-conditions.
12. Place these post functions below *Creates the issue originally* built-in post function on the *Create* transition.

> ℹ️ It is recommended that you test this scenario in a non-production environment before implementing it in a production environment.