Back to Catalog

πŸ›οΈ Daily US Congress members stock trades report via Firecrawl + OpenAI + Gmail

Automate With MarcAutomate With Marc
3027 views
2/3/2026
Official Page

πŸ“¬ What This Workflow Does This workflow automatically scrapes recent high-value congressional stock trades from Quiver Quantitative, summarizes the key transactions, and delivers a neatly formatted report to your inbox β€” every single day.

It combines Firecrawl's powerful content extraction, OpenAI's GPT formatting, and n8n's automation engine to turn raw HTML data into a digestible, human-readable email.

Watch Full Tutorial on how to build this workflow here: https://www.youtube.com/watch?v=HChQSYsWbGo&t=947s&pp=0gcJCb4JAYcqIYzv

πŸ”§ How It Works πŸ•’ Schedule Trigger Fires daily at a set hour (e.g., 6 PM) to begin the data pipeline.

πŸ”₯ Firecrawl Extract API (POST) Targets the Quiver Quantitative β€œCongress Trading” page and sends a structured prompt asking for all trades over $50K in the past month.

⏳ Wait Node Allows time for Firecrawl to finish processing before retrieving results.

πŸ“₯ Firecrawl Get Result API (GET) Retrieves the extracted and structured data.

🧠 OpenAI Chat Model (GPT-4o) Formats the raw trading data into a readable summary that includes:

Date of Transaction

Stock/Asset traded

Amount

Congress member’s name and political party

πŸ“§ Gmail Node Sends the summary to your inbox with the subject β€œCongress Trade Updates - QQ”.

🧠 Why This is Useful Congressional trading activity often reveals valuable signals β€” especially when high-value trades are made. This workflow:

Saves time manually tracking Quiver Quant updates

Converts complex tables into a daily, readable email

Keeps investors, researchers, and newsrooms in the loop β€” hands-free

πŸ›  Requirements Firecrawl API Key (with extract access)

OpenAI API Key

Gmail OAuth2 credentials

n8n (self-hosted or cloud)

πŸ’¬ Sample Output: Congress Trade Summary – May 21

Nancy Pelosi (D) sold TSLA for $85,000 on April 28

John Raynor (R) purchased AAPL worth $120,000 on May 2 ... and more

πŸͺœ Setup Steps Add your Firecrawl, OpenAI, and Gmail credentials in n8n.

Adjust the schedule node to your desired time.

Customize the OpenAI system prompt if you want a different summary style.

Deploy the workflow β€” and enjoy your daily edge.

Daily US Congress Members Stock Trades Report

This n8n workflow automates the process of fetching the latest stock trades made by members of the U.S. Congress, summarizing them using AI, and sending a daily email report. It simplifies staying informed about these financial activities by delivering a concise summary directly to your inbox.

What it does

  1. Schedules Daily Execution: The workflow is triggered daily at a specified time to ensure regular updates.
  2. Fetches Stock Trades Data: It makes an HTTP request to an external API (likely a Firecrawl API, based on the directory name hint) to retrieve the most recent stock trades by U.S. Congress members.
  3. Checks for New Data: It verifies if the API call returned any data. If no trades are found, the workflow stops.
  4. Prepares Data for AI: If data is present, it formats the raw stock trade information into a structured text input suitable for an AI model.
  5. Summarizes with OpenAI: It sends the formatted stock trade data to OpenAI to generate a concise summary of the trades.
  6. Sends Email Report: Finally, it compiles the AI-generated summary into an email and sends it to a specified recipient via Gmail.

Prerequisites/Requirements

  • Firecrawl API Key: (Inferred from directory name, not explicit in JSON) An API key for a service like Firecrawl to fetch the raw stock trade data.
  • OpenAI API Key: An API key for OpenAI to utilize its language model for summarization.
  • Gmail Account: A configured Gmail credential in n8n to send the daily reports.

Setup/Usage

  1. Import the workflow: Import the provided JSON into your n8n instance.
  2. Configure Credentials:
    • HTTP Request (Firecrawl): Configure the HTTP Request node (Node ID 19) with your Firecrawl API endpoint and any necessary authentication.
    • OpenAI: Set up your OpenAI credential within the OpenAI node (Node ID 1250) using your API key.
    • Gmail: Configure your Gmail credential in the Gmail node (Node ID 356).
  3. Set Email Recipient: In the Gmail node (Node ID 356), specify the recipient email address where you want to receive the daily reports.
  4. Adjust Schedule (Optional): Modify the "Schedule Trigger" node (Node ID 839) to change the daily execution time if needed.
  5. Activate the Workflow: Once all credentials and configurations are set, activate the workflow. It will then run automatically according to its schedule.

Related Templates

Automate Dutch Public Procurement Data Collection with TenderNed

TenderNed Public Procurement What This Workflow Does This workflow automates the collection of public procurement data from TenderNed (the official Dutch tender platform). It: Fetches the latest tender publications from the TenderNed API Retrieves detailed information in both XML and JSON formats for each tender Parses and extracts key information like organization names, titles, descriptions, and reference numbers Filters results based on your custom criteria Stores the data in a database for easy querying and analysis Setup Instructions This template comes with sticky notes providing step-by-step instructions in Dutch and various query options you can customize. Prerequisites TenderNed API Access - Register at TenderNed for API credentials Configuration Steps Set up TenderNed credentials: Add HTTP Basic Auth credentials with your TenderNed API username and password Apply these credentials to the three HTTP Request nodes: "Tenderned Publicaties" "Haal XML Details" "Haal JSON Details" Customize filters: Modify the "Filter op ..." node to match your specific requirements Examples: specific organizations, contract values, regions, etc. How It Works Step 1: Trigger The workflow can be triggered either manually for testing or automatically on a daily schedule. Step 2: Fetch Publications Makes an API call to TenderNed to retrieve a list of recent publications (up to 100 per request). Step 3: Process & Split Extracts the tender array from the response and splits it into individual items for processing. Step 4: Fetch Details For each tender, the workflow makes two parallel API calls: XML endpoint - Retrieves the complete tender documentation in XML format JSON endpoint - Fetches metadata including reference numbers and keywords Step 5: Parse & Merge Parses the XML data and merges it with the JSON metadata and batch information into a single data structure. Step 6: Extract Fields Maps the raw API data to clean, structured fields including: Publication ID and date Organization name Tender title and description Reference numbers (kenmerk, TED number) Step 7: Filter Applies your custom filter criteria to focus on relevant tenders only. Step 8: Store Inserts the processed data into your database for storage and future analysis. Customization Tips Modify API Parameters In the "Tenderned Publicaties" node, you can adjust: offset: Starting position for pagination size: Number of results per request (max 100) Add query parameters for date ranges, status filters, etc. Add More Fields Extend the "Splits Alle Velden" node to extract additional fields from the XML/JSON data, such as: Contract value estimates Deadline dates CPV codes (procurement classification) Contact information Integrate Notifications Add a Slack, Email, or Discord node after the filter to get notified about new matching tenders. Incremental Updates Modify the workflow to only fetch new tenders by: Storing the last execution timestamp Adding date filters to the API query Only processing publications newer than the last run Troubleshooting No data returned? Verify your TenderNed API credentials are correct Check that you have setup youre filter proper Need help setting this up or interested in a complete tender analysis solution? Get in touch πŸ”— LinkedIn – Wessel Bulte

Wessel BulteBy Wessel Bulte
247

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

πŸŽ“ How to transform unstructured email data into structured format with AI agent

This workflow automates the process of extracting structured, usable information from unstructured email messages across multiple platforms. It connects directly to Gmail, Outlook, and IMAP accounts, retrieves incoming emails, and sends their content to an AI-powered parsing agent built on OpenAI GPT models. The AI agent analyzes each email, identifies relevant details, and returns a clean JSON structure containing key fields: From – sender’s email address To – recipient’s email address Subject – email subject line Summary – short AI-generated summary of the email body The extracted information is then automatically inserted into an n8n Data Table, creating a structured database of email metadata and summaries ready for indexing, reporting, or integration with other tools. --- Key Benefits βœ… Full Automation: Eliminates manual reading and data entry from incoming emails. βœ… Multi-Source Integration: Handles data from different email providers seamlessly. βœ… AI-Driven Accuracy: Uses advanced language models to interpret complex or unformatted content. βœ… Structured Storage: Creates a standardized, query-ready dataset from previously unstructured text. βœ… Time Efficiency: Processes emails in real time, improving productivity and response speed. *βœ… Scalability: Easily extendable to handle additional sources or extract more data fields. --- How it works This workflow automates the transformation of unstructured email data into a structured, queryable format. It operates through a series of connected steps: Email Triggering: The workflow is initiated by one of three different email triggers (Gmail, Microsoft Outlook, or a generic IMAP account), which constantly monitor for new incoming emails. AI-Powered Parsing & Structuring: When a new email is detected, its raw, unstructured content is passed to a central "Parsing Agent." This agent uses a specified OpenAI language model to intelligently analyze the email text. Data Extraction & Standardization: Following a predefined system prompt, the AI agent extracts key information from the email, such as the sender, recipient, subject, and a generated summary. It then forces the output into a strict JSON structure using a "Structured Output Parser" node, ensuring data consistency. Data Storage: Finally, the clean, structured data (the from, to, subject, and summarize fields) is inserted as a new row into a specified n8n Data Table, creating a searchable and reportable database of email information. --- Set up steps To implement this workflow, follow these configuration steps: Prepare the Data Table: Create a new Data Table within n8n. Define the columns with the following names and string type: From, To, Subject, and Summary. Configure Email Credentials: Set up the credential connections for the email services you wish to use (Gmail OAuth2, Microsoft Outlook OAuth2, and/or IMAP). Ensure the accounts have the necessary permissions to read emails. Configure AI Model Credentials: Set up the OpenAI API credential with a valid API key. The workflow is configured to use the model, but this can be changed in the respective nodes if needed. Connect the Nodes: The workflow canvas is already correctly wired. Visually confirm that the email triggers are connected to the "Parsing Agent," which is connected to the "Insert row" (Data Table) node. Also, ensure the "OpenAI Chat Model" and "Structured Output Parser" are connected to the "Parsing Agent" as its AI model and output parser, respectively. Activate the Workflow: Save the workflow and toggle the "Active" switch to ON. The triggers will begin polling for new emails according to their schedule (e.g., every minute), and the automation will start processing incoming messages. --- Need help customizing? Contact me for consulting and support or add me on Linkedin.

DavideBy Davide
1616