Searching for a decent flight can be a time-consuming process. Ideally, we would all have assistants helping us with this. Alas, we're not all that lucky.

The good news is you can make your own, and you don't even have to know how to code to do it. In this tutorial, I'll walk you through how to use Make.com (a.k.a. Make) and SerpApi's Google Flights API to track flight prices for you. We'll also connect Make with Google Sheets and Gmail along the way.

If you're not familiar with Make, it's a no-code integration platform enabling the connection of multiple apps and the exchanging of data between them. As Make puts it themselves, "You don't need to be a coder to share data across apps."

Initial Setup

Before we get started, we'll need accounts with both SerpApi and Make. Follow the links below to sign up for these two services:

  1. https://serpapi.com/users/sign_up
  2. https://www.make.com/en/register

Make a note of your SerpApi API Key. After you register, you'll be able to find it here: https://serpapi.com/manage-api-key

You'll also need a Google account, but I trust you have one of those already.

Scraping with the Google Flights API

First, we'll construct our Google Flights API query in our API Playground. This is the most user-friendly way to design a search and get real response data.

We'll be looking to fly from London to Rome for the first two weeks of December. We only want a direct flight. Here are the params I would include to search for this in our Google Flights API:

engine=google_flights
departure_id=LHR
arrival_id=FCO
outbound_date=2024-12-01
return_date=2024-12-15
stops=1 # 1 here indicates non-stop flights only

More detail about these query params can be found in our Google Flights API documentation. I've pre-filled these params in this Playground link if you want to run the search yourself.

Note that we could also set a max_price param to only return flights below a certain price. We'll take a slightly different approach to filter for flights within budget while still grabbing all the best flight options regardless of price. More on that later.

Our results will look like this:

We'll use the data in the best_flights array to take advantage of Google's logic to identify acceptable flight options. In this instance, Google has two "Best departing flights." I've included sample data for one of them below:

 {

    "flights":
    [
        {
            "departure_airport":
            {
                "name": "Heathrow Airport",
                "id": "LHR",
                "time": "2024-12-01 07:00"
            }
            ,
            "arrival_airport":
            {
                "name": "Leonardo da Vinci–Fiumicino Airport",
                "id": "FCO",
                "time": "2024-12-01 10:35"
            }
            ,
            "duration": 155,
            "airplane": "Airbus A320",
            "airline": "British Airways",
            "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/BA.png",
            "travel_class": "Economy",
            "flight_number": "BA 548",
            "legroom": "29 in",
            "extensions":
            [
                "Below average legroom (29 in)",
                "Wi-Fi for a fee",
                "In-seat USB outlet",
                "Carbon emissions estimate: 133 kg"
            ]
        }
    ]
    ,
    "total_duration": 155,
    "carbon_emissions":
    {
        "this_flight": 133000,
        "typical_for_this_route": 102000,
        "difference_percent": 30
    }
    ,
    "price": 147,
    "type": "Round trip",
    "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/BA.png",
    "departure_token": "WyJDalJJTTNGNWVFbHFVbWN5UzBGQlN6Z3dhVkZDUnkwdExTMHRMUzB0TFhCcVluQnBORUZCUVVGQlIyRldSMVpuVDBsemMybEJFZ1ZDUVRVME9Cb0tDSTV5RUFJYUExVlRSRGdjY0k1eSIsW1siTEhSIiwiMjAyNC0xMi0wMSIsIkZDTyIsbnVsbCwiQkEiLCI1NDgiXV1d"

}

Now that we have our data, we'll continue onto handling this data in Make.

Connecting SerpApi with Make.com

In Make, we'll create a Scenario to link up multiple actions using Make's no-code interface.

Assuming you've created a Make account and have logged in, select the "Scenarios" option in the sidebar menu. Then click "Create a new scenario".

Make Scenarios are comprised of Modules. These are individual actions or steps.

Our first step will be to make an HTTP request to our Google Flights API. We'll search for "http" and click "Make a request" within the "HTTP" module.

We'll then be presented with a blank HTTP request ready to configure.

First, we'll set the base URL to https://serpapi.com/search.json

We then have a long list of params to add individually. We'll add the list below which we saw earlier. I've updated it to include api_key.

api_key=YOUR_API_KEY_HERE
engine=google_flights
departure_id=LHR
arrival_id=FCO
outbound_date=2024-12-01
return_date=2024-12-15
stops=1 # 1 here indicates non-stop flights only

Use the UI editor to input each query param like so:

And here is the rest of the list:

Set it to parse response and then click "OK".

We need to manually run it once to allow Make to understand the response content. It's a good idea to run it once as a test anyway. Click the "Run once" button" in the bottom left.

After it runs, click the "1" in the bubble up and to the right.

This will open the results of the last API call. Make sure the status code is 200 and there's a best_flights array present.

Iterating Through Flights

best_flights is an array so we need to tell Make to iterate through each best flight and add it to a Google Sheet. We'll do this by adding an "Iterator" module.

Click "Add another module."

Search for and select "Iterator."

Click in the "Array" form field to get the pop up with all the response data from our API call. Click on best_flights[].

Ensure the form field is populated with 1. data: best_flights[].

Adding Flights to Google Sheets

Now we'll configure our Scenario to add data to Google Sheets.

First, navigate to Google Sheets and create a new Google Sheet to store your flight results. Name it something descriptive like "Flight Price Tracker" and add the column headers as I've listed in the screenshot below.

Coming back to Make.com, add another module after the Iterator and search for "Google Sheets." Select the "Add a Row" option.

Click on the Google Sheets module in the Scenario editor to bring up the menu. Click 'Add' or select an existing connection to Google Sheets.

Follow the "Sign in with Google" flow and connect Google Sheets with Make.

Once the connection is set, hit 'Click here to choose file' and then select the spreadsheet we created earlier.

Select which sheet you want the data to be added to. I left the default "Sheet1" so we'll go with that.

Also, select "Yes" to tell Make the table contains headers. This should auto-populate the form fields with the appropriate column header from our Google Sheet (e.g. "Search Time (A) because column A's header is Search Time). If it didn't do that, try clicking "Refresh".

Now we begin the somewhat tedious task of clicking each field we want to add to the Google Sheet. Fortunately, Make is pretty intuitive here.

We'll start by adding the time the search executed. Click the form field for "Search Time (A)" and then click the little black arrow next to search_metadata to expand that object.

Within search_metadata, click created_at to populate the search time.

It should look like this:

Next, we'll select the fight data from the green section. This is the result of our Iterator module. It's crucial we don't select from the blue section for the flights because that is non-iterated data.

Click the next form field "Airline (B)" to get the selector menu and then click the little black arrow next to flights[] to expand it.

You should also expand the departure_airport and arrival_airport objects because we'll need that data as well.

Click airline to pull in the name of the operating airline. Continue one-by-one for each field we're looking for. The screenshot below has the full mapping.

Hit the "Run once" button again in the Scenario editor to test it. You should see data appear in your Google Sheet.

Emailing Flight Options

Next, we'll configure our Scenario to email us whenever it finds a flight within our budget. Add another module and search for "gmail send". Then select the "Send an Email" option under Gmail.

Similar to the Google Sheets connection, you'll need to add a connection to Gmail or use an existing one. Follow the Google authorization steps the same way you did for Google Sheets.

We can then input the details of our email as described and shown in the screenshot below.

I'll put in my own email to get these notifications.

For the subject, I'll put "Found a flight a within budget".

For the content, I'll simply list out the same details found in the Google Sheet row and also include a link to the Google Flights URL at the bottom. This way I can click that link to re-run the search in Google Flights and book the flight if I'm ready.

The content I've input is too long for the screenshot so here's the text version of the full content. You can copy and paste this into the content box in Make.

The following flight is priced within budget: <br /><br />

Airline: {{2.flights[].airline}}<br />
Price: ${{2.price}}<br />
Departure Airport: {{2.flights[].departure_airport.name}} - {{2.flights[].departure_airport.id}}<br />
Departing At: {{2.flights[].departure_airport.time}}<br />
Arrival Airport: {{2.flights[].arrival_airport.name}} - {{2.flights[].arrival_airport.id}}<br />
Arriving At: {{2.flights[].arrival_airport.time}}<br /><br />

Follow the link below to see if it's still available:
{{1.data.search_metadata.google_flights_url}}

We'll hit "Run once" again to test our email.

If all went well, we should have an email notification in our inbox for each best flight Google Flights found.

When I ran this, I received two emails for two flights; priced at $146 and $150. Recall that we only want emails for flights within budget. We could have filtered for this in the Google Flights API query, but I wanted to have a log of flights in the Google Sheet even if they didn't fit my budget.

We can configure Make to conditionally send emails by clicking the wrench icon between the Google Sheets and Gmail modules. Then click "Set up a filter".

I'll set my budget for $150 by setting a condition to send an email if the price is less than 150.

This way only flights with a price less than $150 will be emailed to us.

Run another test to see if it filters out flights above our budget. You may need to adjust the price budget depending on the flights you're searching for. Ensure flights above your budget are not emailed and flights under your budget are emailed.

Scheduling Searches

Finally, we need to set how often our search should run. By default, Make runs every 15 minutes. That's too aggressive for a flight price tracker. Instead, let's have it run once a day at 9am.

Click where there is the clock icon and it says "Every 15 minutes."

Set it to run "Every day" at 9am.

Flip the scheduling toggle to "ON".

We're all set.

Now you'll get an email when a flight pops up in your budget. If you don't get any emails, check your spreadsheet to see what prices are like. You may need to adjust your budget or keep waiting patiently for a good deal to arrive.

Want to Import This?

The blueprint of this Scenario is available to download below. This allows you to skip all the manual configuration and simply import the whole setup into Make.

You can import a blueprint by clicking on the "..." button to show more controls and then select "Import Blueprint." Then select the blueprint JSON file.

You'll need to add your own API key to the HTTP Module before you can run the Scenario successfully.