AutomationFlowsGeneral › Automated Politician Research Pipeline

Automated Politician Research Pipeline

Original n8n title: Politician Research Pipeline

Politician Research Pipeline. Uses httpRequest, emailSend. Scheduled trigger; 9 nodes.

Cron / scheduled trigger★★★☆☆ complexity9 nodesHTTP RequestEmail Send
General Trigger: Cron / scheduled Nodes: 9 Complexity: ★★★☆☆ Added:

This workflow follows the Emailsend → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Politician Research Pipeline",
  "nodes": [
    {
      "id": "Schedule",
      "type": "n8n-nodes-base.cron",
      "parameters": {
        "triggerTimes": [
          {
            "mode": "everyHour"
          }
        ]
      }
    },
    {
      "id": "Congress.gov Fetch",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://www.congress.gov/search",
        "queryParametersUi": {
          "parameter": [
            {
              "name": "q",
              "value": "{\"source\":\"legislation\",\"member\":\"{{$json.politicianId}}\"}"
            }
          ]
        }
      }
    },
    {
      "id": "GovInfo Fetch",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://api.govinfo.gov/collections/CHRG",
        "queryParametersUi": {
          "parameter": [
            {
              "name": "api_key",
              "value": "={{$env.GOVINFO_API_KEY}}"
            }
          ]
        }
      }
    },
    {
      "id": "OpenStates Fetch",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://v3.openstates.org/bills",
        "queryParametersUi": {
          "parameter": [
            {
              "name": "jurisdiction",
              "value": "={{$json.state}}"
            },
            {
              "name": "sponsor",
              "value": "={{$json.politicianName}}"
            },
            {
              "name": "apikey",
              "value": "={{$env.OPENSTATES_API_KEY}}"
            }
          ]
        }
      }
    },
    {
      "id": "OpenLegislation Fetch",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://legislation.nysenate.gov/api/3/bills/advanced_search",
        "queryParametersUi": {
          "parameter": [
            {
              "name": "term",
              "value": "*"
            },
            {
              "name": "fullText",
              "value": "={{$json.politicianName}}"
            },
            {
              "name": "sort",
              "value": "lastUpdate"
            },
            {
              "name": "key",
              "value": "={{$env.OPENLEGISLATION_API_KEY}}"
            }
          ]
        }
      }
    },
    {
      "id": "Deduplicate",
      "type": "n8n-nodes-base.set",
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "documentHash",
              "value": "={{$json[\"url\"] ? $json[\"url\"].hash() : $json[\"id\"]}}"
            }
          ]
        }
      }
    },
    {
      "id": "LangChain Agent",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "httpMethod": "POST",
        "path": "langchain/politician-analysis",
        "responseMode": "onReceived",
        "responseData": "={{$json}}"
      }
    },
    {
      "id": "Langfuse Trace",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://cloud.langfuse.com/api/public/ingest",
        "method": "POST",
        "jsonParameters": true,
        "options": {
          "bodyContentType": "json"
        },
        "bodyParametersJson": "={\"projectId\": \"opendiscourse\", \"payload\": $json}"
      }
    },
    {
      "id": "Notify",
      "type": "n8n-nodes-base.emailSend",
      "parameters": {
        "fromEmail": "alerts@opendiscourse.ai",
        "toEmail": "research@opendiscourse.ai",
        "subject": "New Politician Update",
        "text": "={{$json.summary}}"
      }
    }
  ],
  "connections": {
    "Schedule": {
      "main": [
        [
          {
            "node": "Congress.gov Fetch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Congress.gov Fetch": {
      "main": [
        [
          {
            "node": "GovInfo Fetch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GovInfo Fetch": {
      "main": [
        [
          {
            "node": "OpenStates Fetch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenStates Fetch": {
      "main": [
        [
          {
            "node": "OpenLegislation Fetch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenLegislation Fetch": {
      "main": [
        [
          {
            "node": "Deduplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deduplicate": {
      "main": [
        [
          {
            "node": "LangChain Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LangChain Agent": {
      "main": [
        [
          {
            "node": "Langfuse Trace",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Langfuse Trace": {
      "main": [
        [
          {
            "node": "Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Politician Research Pipeline. Uses httpRequest, emailSend. Scheduled trigger; 9 nodes.

Source: https://github.com/cbwinslow/opendiscourse-sdk/blob/6b074fff2a62361814e0315292b241c138830149/templates/n8n/politician_research_canvas.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Arenza — Monthly Competitor Comparison Email. Uses httpRequest, emailSend. Scheduled trigger; 6 nodes.

HTTP Request, Email Send
General

API Health Check. Uses httpRequest, emailSend. Scheduled trigger; 5 nodes.

HTTP Request, Email Send
General

backup. Uses googleDrive, httpRequest. Scheduled trigger; 15 nodes.

Google Drive, HTTP Request
General

Smart google indexing: sitemap filter and url inspection. Uses httpRequest, xml, splitOut, scheduleTrigger. Scheduled trigger; 13 nodes.

HTTP Request, XML
General

Yourang - Complete Workflow Example. Uses n8n-nodes-yourang, httpRequest. Scheduled trigger; 10 nodes.

N8N Nodes Yourang, HTTP Request