JIRA and ServiceNow Integration for Attachment
Requirement: Whenever there is an attachment addition on an Incident/Issue in ServiceNow, it should be automatically added to the associated issue in JIRA.
Development Steps
1. Connection:
• Generated the API key in JIRA using the following steps:
• Logged in to https://id.atlassian.com/manage-profile/security/api-tokens.
• Selected Create API token.
• Gave API token a name that describes what it does.
• Selected an expiration date for the API token.
• Selected Create.
• Selected Copy to clipboard, then pasted the token to our script
Go to Application registry and create new record with Client ID and Client Secret.
• Created Connection Alias in ServiceNow of type Connection and Credentials.
• On the connection form, provided JIRA account URL and Credential details.
• Credentials will be using username and password of JIRA Account.
Username: Email ID
Password: API Key
2. Action in Flow Designer – ServiceNow:
• Created new Action and Added Rest Step.
• Below are the fields information provided in Rest Step:
Connection Alias: Added the connection alias created in step1.
Resource Path: /rest/api/3/issue/<Issue Key>/attachments
HTTP Method: Post
Query Parameter: X-Atlassian-Token – no check
Request Type: Multipart
Content: Providing attachment sys ID in file part type.
3. Flow:
Flow has been created to utilize the Action created in Step 2 on Attachment table. As soon as new attachment is being created on Incident/Issue, related to JIRA, flow will be triggered to add it on JIRA