1. Home
  2. 8: How-to Guides

How to Generate Real-Time PDF Reports with AI in Rayven.io

Rayven.io allows you to automatically generate PDF reports in real time by combining AI Agents with incoming data and live workflows

Overview

Rayven.io allows you to automatically generate PDF reports in real time by combining AI Agents with incoming data and live workflows. These reports can be created instantly from streaming events, new table rows, or sensor inputs — ideal for status updates, incident logs, compliance documentation, or customer-facing summaries.

This feature turns raw data into polished documents with no manual input, using AI to generate dynamic, natural language content and Rayven’s PDF builder to format and deliver it.


Use Cases

  • Auto-generate incident reports when sensor data exceeds a threshold

  • Create a formatted summary of a machine event for operators or compliance

  • Send PDF logs of maintenance actions or user-submitted forms

  • Generate a customer-facing summary when a job or task is completed

  • Use AI to narrate what happened and PDF to formalize the output


How It Works

This process uses a real-time workflow that includes:

  1. Trigger Node: Activated by data input (stream, row, update)

  2. AI Agent Node: Converts structured data into human-readable text or HTML

  3. PDF Generator Node: Formats AI output into a downloadable report

  4. Delivery Node: Sends the PDF via email, API, or saves it to a table/storage


Step-by-Step Instructions

Step 1: Create a Generative AI Agent

  1. Go to AI AgentsNew Agent.

  2. Select Generative Agent.

  3. Write a prompt like:
    “Summarize this temperature alert. Mention the device name, value, and recommended action.”

  4. Set output format to HTML or Plain Text.

  5. Save and test with sample data.


Step 2: Build a Real-Time Workflow

  1. Open the Workflow Builder → Create a new workflow.

  2. Add a Trigger Node:

    • Options: New Row in Table, Streaming Data, Sensor Input, etc.

  3. Add any required Table Lookups to enrich the input (e.g., device metadata).


Step 3: Add the AI Agent Node

  1. Drag in the AI Agent Node.

  2. Select the agent you created.

  3. Map fields from the input and/or linked tables to the prompt.

  4. Set output as HTML if you want formatted PDFs.


Step 4: Add the PDF Generator Node

  1. Drag in the PDF Generator node.

  2. Use the AI response as the content.

  3. Customize:

    • File name (e.g., Incident_Report_[device_id]_[timestamp].pdf)

    • Header/footer if needed

    • Page size & layout options


Step 5: Output the PDF

Choose one or more delivery options:

  • 📧 Email Node → Send PDF as an attachment

  • 💾 Save to Table → Store PDF link or content in a table

  • 🌐 Webhook/API Node → Send to external system

  • ☁️ Cloud Storage → Push to Dropbox, S3, etc.


Best Practices

  • Use short, structured prompts for more reliable AI output.

  • Design prompt responses as clean HTML or Markdown for better PDF formatting.

  • Add error handling in case of blank/missing data.

  • Use naming conventions for generated files to ensure traceability.

  • Keep file size small for mobile/low-bandwidth recipients.


Examples

Use Case Trigger AI Prompt PDF Output
Sensor alert Sensor threshold crossed "Summarize this event and suggest next steps." PDF alert with explanation
Maintenance complete Row added to job log "Write a job completion report from these fields." PDF sent to supervisor
Chatbot report User submits form "Convert this chat log into a formal support summary." PDF with transcript & notes

Troubleshooting

  • PDF is blank?
    Check that the AI Agent is generating valid HTML/text content.

  • Formatting issues?
    Review the prompt output — avoid raw data tables unless styled.

  • PDF not attached?
    Make sure the file is being passed correctly between nodes.

  • No file name or incorrect file?
    Use variables like [device_id] and [timestamp] for dynamic naming.


Next Steps

👉 Using AI Agents in Real-Time Workflows
👉 Creating Scheduled PDF Reports
👉 Using the PDF Generator Node
👉 How to Log and Store Generated Reports