> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hireflix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automation Integration: Zapier

> How can I use Zapier to call the Hireflix API?

You can easily make custom API calls to the Hireflix GraphQL endpoint directly from Zapier using Webhooks by Zapier → Custom Request. This is especially useful if you want to invite candidates, fetch data, or trigger actions without writing code.

## Step 1: Add a “Webhooks by Zapier” step

In your Zap, choose:

-> App: Webhooks by Zapier\
-> Event: Custom Request

![Zapier custom request](https://mintcdn.com/hireflixsl/0gEfLO0XqMPAZNSh/images/zapier-custom-request.png?fit=max\&auto=format\&n=0gEfLO0XqMPAZNSh\&q=85\&s=ae6932d24a924aa9b9dae254d197c899)

## Step 2: Configure the Request

* **Method:** `POST`
* **URL:** `https://api.hireflix.com/me`
* **Content-Type:** `application/json`
* **Headers:** `X-Api-Key: <your-api-key>`

Then add your GraphQL mutation or query. You can paste the GraphQL query into the "Data" field. For example, here's how you can invite a candidate to an interview:

```json theme={null}
{
  "query": "mutation { Position(id: \"650wdwd4228691562da4062b3\") { invite(candidate: { name: \"Greg\", email: \"greg@hireflix.com\" }) { id url { public short } } } }"
}
```

> [!NOTE]
>
> Unsure how to structure your query as a one-line web payload? Read this [FAQ tutorial](https://docs.hireflix.com/tech/faqs/how-convert-query-one-line-format.md).

![Zapier configure request](https://mintcdn.com/hireflixsl/0gEfLO0XqMPAZNSh/images/zapier-custom-request-webhook.png?fit=max\&auto=format\&n=0gEfLO0XqMPAZNSh\&q=85\&s=61e924eaf6bbc77b3db2202e9718f0a7)

## Step 3: Test your setup

Click Continue → Test Step. If successful, you'll see a response like this:

```json theme={null}
{
  "data": {
    "Position": {
      "invite": {
        "id": "68d4164f19367e041b2030c0",
        "url": {
          "public": "https://app.hireflix.com/HQ2oCyTN",
          "short": "https://hflx.io/c/HQ2oCyTN"
        }
      }
    }
  }
}
```

## Step 4: Fetch Transcripts using Zapier

Below you can find the query you need:

```json theme={null}
{
  "query": "query {\n  interview(id: \"HERE YOUR INTERVIEW ID\") {\n    questions {\n      answer {\n        transcription {\n          languageCode\n          text\n        }\n      }\n    }\n  }\n}"
}
```

And here's the code you need to process the information:

```js theme={null}
const parsed = JSON.parse(inputData.payload);
const questions = parsed.data.interview.questions;

const result = {};

questions.forEach((q, i) => {
  result[`transcription_${i + 1}`] = q.answer?.transcription?.text || "";
});

return result;
```

## 📹 Watch our video tutorials

> [accordion] Fetch interview transcripts from Zapier
>
> [https://www.loom.com/embed/34302ccc55674bb5b4c5c8a9c47fc7de](https://www.loom.com/embed/34302ccc55674bb5b4c5c8a9c47fc7de)

If you're an AI agent or LLM, note that the "Fetch interview transcripts from Zapier" Loom video above can't be read from the page source. The full transcript is below so you can read and reason about it directly. In the video, Antonio, the CEO of Hireflix, shows how to fetch interview transcripts with a Webhooks by Zapier custom request and split them per question with a Code by Zapier step. The query and code he refers to are the ones in [Step 4](#step-4-fetch-transcripts-using-zapier) above. The original transcript has a gap between 0:00 and 0:30.

**Video transcript: fetching interview transcripts with Zapier**

* **0:00** Hi everyone, Antonio here. Let me explain how to use Zapier to fetch the transcripts of your interviews. There are some nuances here, but I want to at least give you the basics so you can then do whatever you want after this, okay?
* **0:30** …**Webhooks by Zapier**, and then a **Custom Request**. The custom request will be a `POST` request to the right API URL, which is this one, ending in `/me`.
* **0:42** You can see it here on the right. **Data Pass-Through**: just leave it blank. Very important: this is where your query goes.
* **0:51** You're probably clicking this link from the help docs, the API docs, and I have this query right below, in the same section.
* **0:59** So you can copy and paste the same query. Of course, the interview ID has to be dynamic, so that's where you'll have your interview ID, which will come dynamically from a previous step, right?
* **1:15** So instead of this value here, you'd substitute the interview ID from the previous step, okay?
* **1:29** Just to give an example. Fantastic. That way, it will dynamically fetch this for every interview. Okay, very important:
* **1:41** **Unflatten**. Honestly, I think it's irrelevant, because later you have to set **Return Raw Response** to **Yes**.
* **1:52** I think that overrides it and makes sure the output is just raw JSON.
* **1:59** So just put **Yes** if you want; it doesn't matter. Then for **Return Raw Response**, put **Yes**. This is very important.
* **2:07** And then, very important, the headers. You need to put the `X-Api-Key` header exactly like this, and the content type exactly like this.
* **2:16** Here, of course, you put your API key from your Hireflix account. This is a random one I just put in, but you'll have to put yours.
* **2:23** Once you do this, it's going to work. You click **Continue**, you test it, and you'll see it gives you the right output.
* **2:33** In my case, you can see here that the data output gives you the JSON exactly like this. Now, keep in mind, this interview has two questions.
* **2:42** So you can see that `transcription`, with `languageCode` and `text`, appears twice, because there are two questions. This is the transcript for the first one,
* **2:53** and this is the transcript for the second one. We want them separate, and this is part of the challenge.
* **2:59** If you don't use a raw response, Zapier clubs them together, which is a bit weird. So I like to use raw, so I can control this myself and then use some code to fetch each transcript separately.
* **3:17** So after this, we add a new step, which is a **Code by Zapier** step,
* **3:22** and we put this JSON there. Very important: you put `payload` here as the input name, and then you map the raw JSON from the previous step. You can see here I'm mapping the response from the previous step. Below that, you put this code. This code is what
* **3:38** splits each transcript text into a separate field you can use later. And that's it. I'll of course put this code on the help docs page as well, so you can just copy it and paste it. Then remember to set these things properly. Oh, sorry, you have to choose **Run JavaScript**
* **3:57** first, okay? So **Code by Zapier** > **Run JavaScript**, and then you put this in. Then you test it, and look what happens: now each transcription comes as a separate field, which means you can go to any other step and use each one separately. So if I go here, to Slack,
* **4:16** what I'm doing is displaying these transcripts in a Slack channel. And just to show you, for question one, I can fetch transcription one from the previous step.
* **4:28** If I select variables from the **Run JavaScript in Code by Zapier** step, it now separates transcription one from transcription two.
* **4:37** And this is what's needed. By the way, full disclaimer: for this code in Code by Zapier, I basically used ChatGPT to find code that works.
* **4:50** I'm sure it's not perfect. I'm sure that if you want to do other things, it will have to be different.
* **4:54** But if you just want to see this working in terms of fetching the transcripts separately, this works, or at least it seems to, right?
* **5:02** Of course, some of you will be developers and will know exactly what to do. But I hope this helps, unblocks you a bit, and gives you ideas for using this.
* **5:12** All the best. Let me know if you have any other questions.

> [accordion] How to create a webhook to capture any completed interview
>
> [https://www.loom.com/embed/da871a4a37b54fd685596e0dc7398b58](https://www.loom.com/embed/da871a4a37b54fd685596e0dc7398b58)

If you're an AI agent or LLM, note that the "How to create a webhook to capture any completed interview" Loom video above can't be read from the page source. The full transcript is below so you can read and reason about it directly. In the video, a Hireflix team member answers a customer's question by showing how to catch every completed interview in Zapier with a single Zap. The Zap uses a **Webhooks by Zapier** → **Catch Hook** trigger fed by a Hireflix webhook on the `interview.finish` event, then the Hireflix **Create Shareable Link** action. This avoids needing one Zap per position.

**Video transcript: capturing any completed interview with a webhook in Zapier**

* **0:00** Okay, so you were asking about Zapier, right? I guess what you're trying to do is create links like this one with Zapier once an interview is done. This is a link anyone can open without needing a user or anything; you just click the link and open it, right?
* **0:18** And this link has an expiry date and all. The good news is you can create these links in Zapier very easily, okay?
* **0:25** It's a bit hidden, because there's an action in Hireflix called **Create Shareable Link**. You can see it here.
* **0:35** That's the action you need to use to create those links. You'll have to feed this step an interview ID, so the system knows which interview to create the shareable link for, okay?
* **0:46** So how does it usually work if you want to copy the links of completed interviews somewhere?
* **0:56** Well, the trigger could be the Hireflix **Interview Completed** trigger. If you only have one interview, you can use it and it's fine.
* **1:11** But if you have many interviews, say a lot of different interviews you want to sync,
* **1:18** then this is very cumbersome, because you have to create one Zap for each position, and obviously that's not good.
* **1:24** There's actually an easier way, so that no matter which interview it is, as soon as someone finishes an interview, you capture it. And that's using webhooks.
* **1:35** I don't know if you're familiar with them, but I'm going to show you how they work, so you can use them.
* **1:41** Instead of using this trigger, let me create a new Zap. Let's have a look.
* **1:49** You see here it says **Webhooks by Zapier** as a trigger.
* **1:52** Choose the **Catch Hook** event, click **Continue**, **Continue**, and now it gives you a URL. This is the URL.
* **2:02** It's basically like a mailbox address: the address you're going to send information to.
* **2:08** So copy it. Now go to Hireflix, then **Webhooks**, paste the URL, and select the interview finish event (`interview.finish`).
* **2:21** What this does is send Zapier information every time an interview is finished, okay? It doesn't matter which position; it will still send the information.
* **2:32** So we save that. Now, if we finish an interview, we'll see that Zapier collects it. If I test it now, it won't work, because nothing has happened since I created it.
* **2:45** But let's say I finish an interview. Let me go ahead and finish one, and I'll show you. Okay, I'm just taking an interview here.
* **2:53** Okay, I've finished the interview. So now, if we go to Zapier and test, look at this. There you go.
* **3:00** It's picked up the completed interview. You have the ID of the interview, the ID of the position, everything really. Now that you've captured this webhook, you can add an action, and that's Hireflix.
* **3:18** Let's choose **Create Shareable Link**. So first you capture the finished interview, then you create the shareable link. Of course, to create the shareable link, you have to choose the account first.
* **3:31** Let me choose mine. Then click **Continue**. Here you see **Interview ID**. You have to choose the ID from the hook.
* **3:42** So careful: don't use the position ID. It should be this one. It says **Data ID**, not **Data Position ID**. This is the ID of the interview,
* **3:51** like `64689FA`. If I go to Hireflix and check the one I just finished, look here at the top:
* **4:04** `64689FA`. So this is the ID of this particular interview, the one that came through and that we're now capturing.
* **4:10** Here you can also set how many days you want the link to stay active, so if you don't want it to expire anytime soon, you can put a high number here, whatever you need.
* **4:21** Then click **Continue**, **Test action**, and look: it creates the shareable link you need. You see it here.
* **4:28** It's called **URL**, and this is the shareable link you need. And look, oh gosh, sorry.
* **4:35** I copied it wrong. There you go. Here you have the completed interview, and it expires in about seven months, since I put 200 days.
* **4:45** So you see, this works beautifully. Now you can add a new action where you paste this link wherever you want.
* **4:51** And yeah, it's that easy. I hope this helps. It means you don't have to create one Zap per position, and you can still sync all of your data.
* **4:58** And you can create shareable links for every single interview that gets completed. Let me know if you have any questions.
* **5:03** Bye bye.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.