Building HARO Filtering

Hoping to create an Active Piece system that can filter and organize text from HAROs, just like i have managed to set up for Zapier.

For those you don’t know, HAROs are an email you get from journalists every day with requests. It looks a bit like this (these are just a few in a list of hundreds)


  1. Summary: registered dietitian or medical doctor to comment on potential benefits of potassium supplements

Name: Alyssa Northrop Forbes Health

Category: Biotech and Healthcare

Email: query-fs3s@helpareporter.net

Media Outlet: Forbes Health

Deadline: 7:00 PM CST - 28 September

Query:

I’m writing an article for Forbes Health on the potential
benefits and side effects of potassium supplements. I’m looking
for a registered dietitian or medical doctor to answer the
following questions:

  • Who may benefit from taking potassium supplements? * What
    are the potential health benefits of potassium supplments? (all
    claims will need to be backed by research) * What is the
    recommended dosage for potassium supplements? * What should
    someone consider before purchasing a potassium supplement?

Please let me know how you’d like to be referred to in the
article (name, qualifications, where you’re based, and a link to
your professional “about” page).

Thank you! Alyssa

Requirements:

registered dietitian or medical doctor

Back to Top Back to Category Index


  1. Summary: Otolaryngologist needed for UnitedHealthcare articles

Name: Lauren Bedosky UnitedHealthcare

Category: Biotech and Healthcare

Email: query-fs4v@helpareporter.net

Media Outlet: UnitedHealthcare

Deadline: 10:00 AM EST - 28 September

Query:

I’m writing a few articles about hearing loss for the
UnitedHealthcare blog and I need an otolaryngologist who can
answer the following questions:

  • How do loud noises harm the ears and lead to hearing loss? -
    How loud does a noise have to be to cause hearing damage and
    loss? - Who faces the greatest risk for hearing damage and loss
    from loud noises? - What can people do to protect themselves
    from hearing damage and loss from noises?

Requirements:

Otolaryngologist

Back to Top Back to Category Index


  1. Summary: Vets Needed for Story on Reverse Sneezing in Dogs

Name: Brittany Natale Chewy

Category: Biotech and Healthcare

Email: query-fs69@helpareporter.net

Media Outlet: Chewy

Deadline: 12:00 PM EST - 29 September

Query:

Hi! I’m looking for vets who can help answer the below questions:

  • What is reverse sneezing in dogs? - Are there certain breeds
    who reverse sneeze more than others? - What does reverse
    sneezing in dogs sound like? - Why do dogs reverse sneeze? - How
    to stop reverse sneezing in dogs

Requirements:

Vets (DVM)


What I want to do is have ActivePieces is to format and split up all this text into:
Subject
Category
Journalist
Outlet
Email
DueDate
Query
Requirements

And then upload all ones that have “pet” in the subject or query, and upload those to a spreadsheet.

I have the Zap step screenshots I use here: Zapier HARO Uploads - Google Drive


I posted this topic a while back and @ashrafsam had the idea to ask ChatGPT to:

turn the following HARO items into a JSON array, for each item include the following props:
Subject
Category
Journalist
Outlet
Email
DueDate
Query
Requirements

That resulted in this:

But now I’m struggling to figure out how to get this data sent to Google Sheets and assorted into the appropriate columns. Any thoughts? This is all pretty new to me.

Hi @mmarrs,

You’re making good progress!

Firstly, a quick question: are the emails always formatted in the exact same way?

While the OpenAI step could work for parsing, I’d actually recommend using a code block for this purpose. This approach ensures your data doesn’t get sent to OpenAI, plus it potentially sidesteps any prompting errors.

If you’re inclined to continue with the OpenAI method, here’s a slightly adjusted set of steps:

  1. Create a Google Sheet with the following column headers to mirror the JSON properties:

    • Subject
    • Category
    • Journalist
    • Outlet
    • Email
    • DueDate
    • Query
    • Requirements
  2. To ensure you only process relevant HARO requests, add a branch step in your ActivePieces flow to check for the presence of the term “pet” in the Subject or Query.

  3. Subsequent to your filtering step, and once you’ve obtained the JSON array from your parsing method, introduce an “Insert Row” step for Google Sheets. This action feeds the data into your spreadsheet.

  4. While configuring the “Insert Row” action, you’ll come across a prompt inquiring if “the first row consists of headers?”. Enable this.

  5. Now map the JSON data output to the corresponding columns in Google Sheets. The process is relatively seamless since your JSON properties and sheet headers align.

Once everything is set, ActivePieces will autonomously relay the filtered HARO data to your Google Sheet.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.