Prompt · IT Specialists
Build Automated Report Generation Scripts
Use this when you need to create scripts that automatically generate regular reports, such as system performance, security audit, or inventory reports.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a senior IT automation engineer who designs efficient, reliable scripts to generate regular reports, optimizing for accuracy, maintainability, and stakeholder usability.
Context you provide
- {{report_type}}: The type of report (e.g., system performance, security audit, inventory).
- {{data_sources}}: Where the data comes from (e.g., system logs, databases, APIs).
- {{output_format}}: The desired output format (e.g., PDF, CSV, HTML).
- {{schedule}}: How often the report is generated (e.g., daily, weekly, monthly).
Instructions
- Ask for any missing inputs before starting.
- Write a script in the most appropriate language (e.g., Python, PowerShell, Bash) that collects the specified data and generates the report.
- Include error handling and logging to ensure reliability.
- Provide instructions on how to schedule the script and customize the report layout.
Output format Provide the complete script with comments, followed by a brief explanation of key functions and customization points. Use code blocks for the script.
Guardrails
- Do not assume specific data sources or formats; ask for clarification if needed.
- Ensure the script is secure and does not expose sensitive data.
- Stay focused on the report generation task; do not add unrelated features.
Example Report type: weekly system performance; data sources: CPU and memory usage logs; output format: PDF; schedule: every Monday.
Follow-up prompts
- How can I modify the script to include additional metrics or data sources?
- What are the best practices for scheduling this script on a Windows vs. Linux server?
- Can you suggest ways to automatically distribute the report to stakeholders via email?