πŸ“Š Healthcare policy monitoring with ScrapeGraphAI, Pipedrive and Matrix alerts

⚑ 52 views Β· πŸ“Š Market Research & Insights

πŸ’‘ Pro Tip β€” HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it β€” it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

Medical Research Tracker with Matrix and Pipedrive

⚠️ COMMUNITY TEMPLATE DISCLAIMER: This is a community-contributed template that uses ScrapeGraphAI (a community node). Please ensure you have the ScrapeGraphAI community node installed in your n8n instance before using this template.

This workflow automatically monitors selected government and healthcare-policy websites, extracts newly published or updated policy documents, logs them as deals in a Pipedrive pipeline, and announces critical changes in a Matrix room. It gives healthcare administrators and policy analysts a near real-time view of policy developments without manual web checks.

Pre-conditions/Requirements

Prerequisites

Required Credentials

Specific Setup Requirements

VariableDescriptionExample
POLICY_SITESComma-separated list of URLs to scrapehttps://health.gov/policies,https://who.int/proposals
PD_PIPELINE_IDPipedrive pipeline where deals are created5
PD_STAGE_ID_ALERTStage ID for β€œReview Needed”17
MATRIX_ROOM_IDRoom to send alerts (incl. leading !)!policy:matrix.org

Edit the initial Set node to provide these values before running.

How it works

This workflow automatically monitors selected government and healthcare-policy websites, extracts newly published or updated policy documents, logs them as deals in a Pipedrive pipeline, and announces critical changes in a Matrix room. It gives healthcare administrators and policy analysts a near real-time view of policy developments without manual web checks.

Key Steps:

Set up steps

Setup Time: 15-20 minutes

  1. Install Community Node
    – In n8n, go to Settings β†’ Community Nodes β†’ Install and search for ScrapeGraphAI.

  2. Add Credentials
    – Create New credentials for ScrapeGraphAI, Pipedrive, and Matrix under Credentials.

  3. Configure Environment Variables
    – Open the Set (Initial Config) node and replace placeholders (POLICY_SITES, PD_PIPELINE_ID, etc.) with your values.

  4. Review Schedule
    – Double-click the Schedule Trigger node to adjust the interval if needed.

  5. Activate Workflow
    – Click Activate. The workflow will run at the next scheduled interval.

  6. Verify Outputs
    – Check Pipedrive for new deals and the Matrix room for alert messages after the first run.

Node Descriptions

Core Workflow Nodes:

Data Flow:

  1. scheduleTrigger β†’ code β†’ splitInBatches β†’ scrapegraphAi β†’ if β†’ merge β†’ set β†’ pipedrive β†’ matrix

Customization Examples

1. Add another data field (e.g., policy author)

// Inside ScrapeGraphAI node β†’ Selectors
{
  "title": "//h1/text()",
  "date": "//time/@datetime",
  "summary": "//p[1]/text()",
  "author": "//span[@class='author']/text()"   // new line
}

2. Switch notifications from Matrix to Email

// Replace Matrix node with β€œSend Email”
{
  "to": "policy-team@example.com",
  "subject": "New Healthcare Policy Detected: {{$json.title}}",
  "text": "Summary:\n{{$json.summary}}\n\nRead more at {{$json.url}}"
}

Data Output Format

The workflow outputs structured JSON data for each new policy article:

{
  "title": "Affordable Care Expansion Act – 2024",
  "url": "https://health.gov/policies/acea-2024",
  "date": "2024-06-14T09:00:00Z",
  "summary": "Proposes expansion of coverage to rural areas...",
  "source": "health.gov",
  "hash": "2d6f1c8e3b..."
}

Troubleshooting

Common Issues

  1. ScrapeGraphAI returns empty objects
    – Verify selectors match the current HTML structure; inspect the site with developer tools and update the node configuration.

  2. Duplicate deals appear in Pipedrive
    – Ensure the β€œFind or Create” option is enabled in the Pipedrive node, using the page hash or url as a unique key.

Performance Tips

Pro Tips:

πŸ”— Nodes Used

Pipedrive, Matrix, Schedule Trigger

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup