Developers · Zapier + Pipedrive

Send referrals to Thurgood from Pipedrive

About 10 minutes, one time. After that, when you mark a deal as referred to Thurgood, the way you already mark referrals to anyone else, the client's details reach us automatically and their CaseFile is started. Thurgood never emails the client. You need a Zapier account (a free one works) and your Thurgood API key.

Step 1

Add the Thurgood app to Zapier

Open this link while logged in to Zapier and accept the invite: add Thurgood to Zapier.

Step 2

Get your API key

Each firm has its own key, issued by Thurgood. It starts with tgk_. If you don't have one, email caseworker@askthurgood.com with your firm's name. Thurgood only stores a fingerprint of the key, so keep it somewhere safe; if it's lost, we revoke it and issue a new one.

Step 3

Mark referrals the way you already do

Do whatever your team does today when a lead is referred out: a stage, a "Referred to" field or a label. Then in Pipedrive go to Deals → Filters → New filter, set the condition that means "referred to Thurgood", and save it.

Step 4

Build the Zap

  1. 01

    Create a Zap

    In Zapier, create a new Zap.

  2. 02

    Pipedrive → Deal Matching Filter

    Connect your Pipedrive account when asked, and choose the filter from step 3.

  3. 03

    Thurgood → Send Referral

    Connect it with your Thurgood API key.

Step 5

Map the fields

Thurgood fieldMap from Pipedrive
Record IDDeal ID (required)
NameDeal Title (required). This becomes the client's name.
Email, PhoneYour client email and phone fields on the deal, if you have them
State, CompanyWhere the client worked, and their employer
Initial SummaryYour intake summary. Used to start the client's CaseFile.
Employer's stated reason, Believed reasonYour intake question fields
Dates of employment, Hourly or SalaryYour dates and pay fields
Documents or Links, Job Title, NotesAnything else you want Thurgood to have
Send only whenLeave blank. Your Pipedrive filter already picks the referred deals.

Leave blank anything you don't track. Pipedrive titles a new deal after its organization when one is set, so if you put the employer there, change the deal title to the client's name.

Step 6

Test and turn on

Testing sends a real referral: when you click Test step, Zapier sends the sample deal to Thurgood. Pick a deal you are actually referring to us, or skip the test. Then turn the Zap on.

What happens next

After the Zap is on

  • Thurgood creates the client's record, linked to your firm, and starts their CaseFile from the intake you sent.
  • Nothing is emailed to the client or to your firm. Once the Zap is on, you don't need to email referrals to Thurgood.
  • Your firm's lawyers can see the referral, and the intake you sent, on the client's profile.
  • Each deal is sent once, so editing it or moving it between stages afterwards won't create a duplicate.
  • Deals that already match your filter when you turn the Zap on aren't sent. Only deals you mark from then on are.
  • If the client's email already belongs to a Thurgood client, that client is left unchanged.
API reference

The API behind the Zap

You don't need this to use Zapier. It's here for your developers, or if you'd rather send referrals from your own system.

  1. Authentication

    Send your key in the X-Api-Key header on every request. Authorization: Bearer <key> is also accepted on POST, and an api_key field for senders that can't set headers. Use https://askthurgood.com, not www.: a redirect would drop the request body.

  2. Check a key

    GET https://askthurgood.com/api/thurgood/referrals/me
    X-Api-Key: tgk_your_key_here
    
    200 {"status": true, "lawfirm": "Your Firm Name"}
    401 {"status": false, "error": "Invalid API key"}
  3. Send a referral

    POST https://askthurgood.com/api/thurgood/referrals
    X-Api-Key: tgk_your_key_here
    Content-Type: application/json
    
    {
      "external_id": "4821",
      "name": "Jane Doe",
      "email": "jane@example.com",
      "state": "CA",
      "initial_summary": "I was fired two weeks after reporting unpaid overtime..."
    }

    JSON or form fields are both accepted. Fields not listed below are ignored.

FieldRequiredDescription
external_idRecommendedYour record id (e.g. Pipedrive deal id). Each id is accepted once per firm. pipedrive_deal_id also works.
nameYesClient's full name (or send first_name + last_name).
emailNoClient's email. If sent, it must be a valid address.
phoneNoClient's phone.
stateNoUS state the client worked in — CA or California.
companyNoEmployer.
initial_summaryNoThe client's account of what happened. Used to start their CaseFile.
employer_reasonNoWhat the employer said was the reason for the termination/separation.
believed_reasonNoWhy the client believes they were actually terminated/separated.
employment_datesNoDates of employment.
payNoHourly or salary.
drive_linksNoLinks to any client documents (Google Drive, Dropbox, etc.).
job_titleNoJob title.
notesNoAnything else for Thurgood.
ResponseBodyMeaning
202{"status": true, "referral_id": 123}Accepted. Processing finishes within a few minutes.
200{"status": true, "duplicate": true, "referral_id": 123}This external_id was already sent — nothing new created.
401{"status": false, "error": "Invalid API key"}Missing, wrong or revoked key.
422{"status": false, "error": "A name is required"}Missing name, or an email that isn't a valid address.
429More than 200 requests a minute.