Hi Everyone,
I try to automate the creation of project in jira thanks to jira automation.
The user creates a ticket inside a specific project "Project configurator" to ask a new jira project.
The following fields are used to create the project:
1. Summary will be use as the project name
2. A customfield nammed "Project Leader" to add him inside the project leader on the new jira project.
3. Description
I create a automation with rest api call to create jira project, inside the automation:
1. I take the summary and use the function {{#issue.summary.toUpperCase().split(" ")}}{{left(1)}}{{/}} to get first letter of each words inside the summary to generate the project key
2. The summary will be the project name
3. I get the user id of user inside the project leader customfield and define as the jira project leader
4. I send rest api call to generate the project

If the jira key already exists, the api call is failed ... it's normal 
So my idea is to check if the project key or project name already exist and to provide a new jira project key with a increment
Example:
I want to create a project with the project key = ABC
While the project key already exists new project key = new project key +1
And the final result of the new project key would be ABC1
And after to get the final key, I can launch API call to create project.
Do you know if I can have this kind of verification in jira automation?
Thank you