1. Purpose of the Flow
This flow automatically creates a Jira ticket based on an incoming HTTP request from smenso. It integrates the source system smenso with Atlassian Jira and automates ticket creation including field mapping, validation, and error handling.
Target audience: developers and technical administrators.
2. Architecture Overview
Components
- Platform: Microsoft Power Automate (Cloud Flow)
- Source system: smenso (sends HTTP request)
- Target system: Atlassian Jira (REST API via Jira Connector)
Main Flow
- smenso sends an HTTP request to the flow
- The flow validates and normalizes the input data
- Mapping of smenso fields to Jira fields
- Creation of a Jira issue
- Optional response back to smenso
- Error handling and logging
3. Trigger: HTTP Request from smenso
Trigger type: When an HTTP request is received
The flow starts as soon as smenso sends an HTTP POST to the provided endpoint.
Typical properties:
- HTTP method:
POST - Content-Type:
application/json - Authentication:
- e.g. Shared Access Signature or Azure AD
Example request body from smenso:
{
"title": "Export fails",
"description": "Export stops after 30 seconds",
"priority": "High",
"reporter": "smenso-system"
}Notes:
- The JSON schema must exactly match the trigger definition.
- Missing required fields will stop the flow before Jira creation.
4. Initialization and Validation
After receiving the request, variables are initialized and required fields are validated.
Typical variables:
| Variable | Type | Description |
| projectKey | String | Jira project key |
| issueType | String | Jira issue type (e.g. Bug, Task) |
| sourceSystem | String | Constant: smenso |
Validations:
titlemust not be emptydescriptionmust not be emptyprioritymust match a valid Jira value
On validation errors:
- No Jira ticket is created
- An error response is returned to smenso (HTTP 400)
5. Field Mapping: smenso → Jira
Incoming data from smenso is mapped to Jira fields.
Example mapping:
| smenso field | Jira field |
title | fields.summary |
description | fields.description |
priority | fields.priority.name |
Constant Bug | fields.issuetype.name |
projectKey | fields.project.key |
Constant smenso | fields.customfield_xxx |
Notes:
- Custom fields must be addressed as
customfield_XXXXX. - Field names must match the Jira REST API names, not the UI labels.
6. Jira Issue Creation
Action: Create Issue (Jira Connector)
REST endpoint used:
POST /rest/api/2/issue
Example request payload:
{
"fields": {
"project": { "key": "ABC" },
"summary": "Export fails",
"description": "Export stops after 30 seconds",
"issuetype": { "name": "Bug" },
"priority": { "name": "High" }
}
}Successful Jira response:
key(e.g.ABC-123)id
These values can then be:
- returned to smenso
- used for logging or notifications
7. Response Back to smenso
After successful creation, the flow can return an HTTP response to smenso.
Example response:
{
"status": "created",
"jiraKey": "ABC-123"
}On errors:
- HTTP status code != 200
- structured error message in the body
8. Error Handling
The flow uses dedicated scopes with Run after: has failed.
Typical error cases:
| Code | Cause |
| 400 | Invalid smenso input data |
| 401 | Invalid Jira connection |
| 403 | Missing Jira permissions |
| 404 | Project or field not found |
Recommendations:
- Log the full Jira response
- Correlate runs using a request ID from smenso
9. Dependencies and Connections
Connections:
- Jira Connector
- Authentication: API token or Basic
- User: dedicated service account
Required Jira permissions:
- Browse Project
- Create Issue
10. Deployment and Operations
Transport:
- Export as ZIP package
- Import into target environment
After import, verify:
- Rebind connections
- Distribute the new HTTP endpoint to smenso
- Keep trigger disabled for initial testing
11. Maintenance and Monitoring
Recommended:
- Regularly review failed runs
- Version the flow when mappings change
- Document all used custom fields
Comments
0 comments
Please sign in to leave a comment.