In this page
How to generate and attach PDF documents to Jira issues?
Attach PDF documents to issues from a JQL query on a specified schedule
Attach PDF documents to issues on issue events (created, updated, commented, etc.)
Attach PDF documents to issues from a JQL query on a specified schedule
Attach PDF documents to issues on issue events (created, updated, commented, etc.)
How to generate and attach PDF documents to Jira issues?
Automatically generating PDF files and attaching them to Jira issues is a simple way to create a snapshot or an alternative presentation, but still keep the file in Jira.
You can implement this process by configuring a simple automation rule:
Every time the rule is executed, the PDF file will be attached to the selected issue:
To have this in minutes, just follow the step-by-step guides in the next sections!
Notes:
- Although the guides are written specifically for the Scheduled and the Issue Event (created, updated, etc.) triggers, you can choose any other trigger!
- Although the guides are written to implement the "bare minimum" rules, you can freely add further actions or conditions for altered logic!
- The email with the PDF file attachment is sent from the "no-reply@jpdfc.midori.systems" address. This is a verified email address and cannot be changed due to security reasons.
Attach PDF documents to issues from a JQL query on a specified schedule
Watch this short tutorial video, then follow the detailed steps under the video:
Configuration steps:
- Login to Jira as administrator.
- Go to Settings (cog icon "⚙" in the top right) → System (under Jira settings) → Global automation (in the left-bar under Automation).
- Click Create rule.
- Select the Scheduled trigger and configure the schedule. (Do not check Run a JQL search... as the JQL query will be configured via the next action.)
- Click Next → THEN: Add an action.
-
Select the Send web request action and:
- Enter "https://jpdfc.midori.systems/rest/v1/automation" as Web request URL.
- Select POST as HTTP method.
- Select Custom data as Web request body.
-
Copy this request body template to Custom data:
client: {{rule.name}} export: view: PDF viewContext: ISSUE_NAVIGATOR jql: project = FOO and created > startOfDay() # set your JQL query columnConfiguration: USER_DEFAULT actions: - name: Attach PDF to issue type: ATTACH toIssueKey: FOO-123 # set your target issue - name: Call back to Jira Cloud Automation type: CALL url: https://automation.atlassian.com/pro/hooks/123450abcde # set your callback rule's URL
-
Set the actual values for the fields marked with # set ...:
-
For the fields in the export: section:
- Open a new browser tab and generate the YAML fragment.
- Overwrite the whole export: section with the generated one.
- For the fields in the actions: section:
-
For the fields in the export: section:
- Make sure that the indentation still looks like above after your changes. (Wrong indentation will break the request body!)
- Check the Delay execution of subsequent rule actions... option. (Needed for the next action to be able to write the ID received in the response to the log.)
- Add the required request headers to Headers.
- Click Next → THEN: Add an action.
- Select the Log action (not Log work!) and copy this to Log message:
PDF automation started. (ID: {{webResponse.body.messageId}})
- For self-verification, compare the rule in the editor to this screenshot. (They must contain the same components in the same layout, but identifiers can be different.)
- Click Turn on rule at the top.
- Enter "Attach PDF on a specified schedule" to Rule name. (You can use any name as long as it is intuitive.)
- Click Turn on rule again → Return to rules.
- You're done!
Attach PDF documents to issues on issue events (created, updated, commented, etc.)
Watch this short tutorial video, then follow the detailed steps under the video:
Configuration steps:
- Login to Jira as administrator.
- Go to Settings (cog icon "⚙" in the top right) → System (under Jira settings) → Global automation (in the left-bar under Automation).
- Click Create rule.
- Select any of the Issue triggers.
- Click Next → THEN: Add an action.
-
Select the Send web request action and:
- Enter "https://jpdfc.midori.systems/rest/v1/automation" as Web request URL.
- Select POST as HTTP method.
- Select Custom data as Web request body.
-
Copy this request body template to Custom data:
client: {{rule.name}} export: view: PDF viewContext: SINGLE_ISSUE_VIEW jql: key = {{issue.key}} # set your JQL query columnConfiguration: USER_DEFAULT actions: - name: Attach PDF to issue type: ATTACH toIssueKey: FOO-123 # set your target issue - name: Call back to Jira Cloud Automation type: CALL url: https://automation.atlassian.com/pro/hooks/123450abcde # set your callback rule's URL
-
Set the actual values for the fields marked with # set ...:
-
For the fields in the export: section:
- Open a new browser tab and generate the YAML fragment.
- Overwrite the whole export: section with the generated one.
- For the fields in the actions: section:
-
For the fields in the export: section:
- Make sure that the indentation still looks like above after your changes. (Wrong indentation will break the request body!)
- Check the Delay execution of subsequent rule actions... option. (Needed for the next action to be able to write the ID received in the response to the log.)
- Add the required request headers to Headers.
- Click Next → THEN: Add an action.
- Select the Log action (not Log work!) and copy this to Log message:
PDF automation started. (ID: {{webResponse.body.messageId}})
- Click Turn on rule at the top.
- Enter "Attach PDF on issue event" to Rule name. (You can use any name as long as it is intuitive.)
- Click Turn on rule again → Return to rules.
- You're done!
Questions?
Ask us any time.