Automate Qualys Report Retrieval and TheHive Case Creation with n8n

Struggling to manually track and archive Qualys vulnerability reports? This n8n workflow automates fetching finished scans, filtering new ones, and creating cases in TheHive with attached reports, saving you hours and eliminating errors in SOC processes.
httpRequest
theHiveProject
set
+9
Workflow Identifier: 1851
NODES in Use: Manual Trigger, Set, HTTP Request, XML, Split Out, Filter, If, Split In Batches, Wait, n8n, Execute Workflow, TheHive Project

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What this workflow does

This workflow automatically downloads new finished vulnerability scan reports from Qualys every hour.
It stops duplicate and old reports from being processed again by using a saved timestamp.
For each new report, the workflow creates a new case in TheHive and attaches the full PDF report.
This saves time, stops errors, and keeps security teams working faster and with fresh data.


Who should use this workflow

Anyone who works in a Security Operations Center (SOC) or handles vulnerability reports from Qualys.
It is best for users who want to avoid manual downloading and uploading of scan results.
It helps analysts who need quick, organized case creation and report attachments in TheHive.
Users with basic API knowledge and access to Qualys and TheHive accounts will benefit most.


Tools and services used

  • n8n workflow automation: Runs the whole process on schedule.
  • Qualys API: Provides the latest finished vulnerability scan reports.
  • TheHive API: Creates cases and uploads PDF reports into the incident response system.
  • XML node in n8n: Converts Qualys XML data to JSON for easier reading.

How the workflow works (Input → Process → Output)

Inputs

  • Hourly trigger from n8n to start the workflow automatically.
  • Qualys credentials and API URL for fetching scan reports.
  • Stored timestamp of last processed report to avoid duplicates.
  • TheHive credentials for case creation and report attachment.

Process steps

  • Fetch all finished reports from Qualys API via HTTP GET request.
  • Convert Qualys response from XML to JSON for easier handling.
  • Split all reports into individual items to process separately.
  • Filter out reports with timestamps older or equal to the stored last processed timestamp.
  • If new reports exist, split them in batches to process one by one safely.
  • Pause for 1 second between API calls to avoid rate limiting.
  • Create new cases in TheHive for each new report using report details.
  • Download full PDF report from Qualys using report ID.
  • Attach downloaded PDF to the corresponding TheHive case.
  • Update stored timestamp with current run time to know what was processed.

Outputs

  • New cases in TheHive with attached vulnerability scan PDF reports.
  • Saved timestamp updated to only process newer reports in the future.
  • Accurate and current vulnerability tracking without manual downloads or uploads.

Beginner step-by-step: How to use this workflow in n8n production

Import the workflow

  1. Click the Download button on this page to get the workflow file.
  2. Open n8n editor where you want to run the workflow.
  3. Use the menu option “Import from File” to upload the workflow file into n8n.

Configure credentials and details

  1. Go to the workflow settings and add your Qualys API credentials.
  2. Also add TheHive API credentials in the appropriate nodes.
  3. Check nodes that need IDs, emails, folder paths, or any other details and update them as your environment requires.

Test and activate

  1. Run the workflow once manually using the Execute button to confirm it works with your data.
  2. Fix any errors shown during test runs, especially credential or endpoint issues.
  3. Once confirmed, activate the workflow by enabling the Schedule Trigger node.
  4. Optionally, set up notifications for workflow success or failure alerts.

For more secure and private operation, consider running self-host n8n.


Inputs and outputs explained

  • Inputs: Hourly Schedule trigger, Qualys API credentials, stored last processed timestamp, TheHive API credentials.
  • Outputs: New cases created in TheHive with full PDF reports attached, updated timestamp saved for next run.

Edge cases and common errors

  • Unauthorized errors happen when API credentials for Qualys are wrong or missing. Double-check keys.
  • If old reports keep processing, the timestamp may not be saved or filtered properly; check the timestamp workflow and date formats.
  • Attachment fails if case ID is incorrect or the downloaded file is not valid PDF binary data. Confirm the downloaded file and case links are correct.

Customization ideas

  • Change how often the workflow runs by editing the Schedule Trigger to 30 minutes or daily.
  • Add filters to include or exclude certain report types or status values.
  • Add extra notification steps after each TheHive case creation, like sending Slack messages or emails.
  • Store downloaded reports in cloud storage services for backup, such as Google Drive or AWS S3.
  • Adjust TheHive case fields like severity, tags, or description to match team needs.

Summary of benefits and outcome

✓ Saves many hours of manual work weekly by handling Qualys reports automatically.
✓ Prevents errors from duplicate or missing reports by tracking timestamps.
✓ Creates organized, ready-to-investigate cases in TheHive with attached reports.
✓ Keeps vulnerability tracking current and reliable without manual downloads.


Frequently Asked Questions

Check that Qualys API credentials in n8n are correct. Verify API keys and ensure the account has needed permissions.
The timestamp used to filter processed reports may not update properly. Check if the timestamp workflow works and matches date formats.
Run the workflow manually in the n8n editor after importing and configuring credentials. Check for any errors and confirm reports and cases are created.
Yes, users can run this workflow with self-host n8n on a private server for better security and control.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free