Airtable

Automatisation

Generate a Pennylane draft invoice from Airtable

Add an automation to your existing Airtable base that generates your Pennylane draft invoices from your billable items, without any intermediary tools.

Adapted from an automation deployed as part of a HyperOps client implementation.

Required tools

Airtable

Pennylane

Nadir BOUSSETTA

Published on

LinkedIn

Pennylane Airtable Billing

Receive the automation

Enter your email address to receive the Airtable script ready to adapt to your database.

CONTENT

What the resource contains

What you are going to receive

The configurable Airtable script

The fields to map in your database

The step-by-step installation tutorial

Overview

Discover the result

From a client's record in Airtable, generate a draft Pennylane invoice in one click from their billable items.

Installation tutorial

How to use this resource?

Install the model

Prerequisites

An Airtable base already containing your clients and your billable lines.

An active Pennylane API key and the downloaded HyperOps script.

1

Check your Airtable structure

Your database must already contain the information required for billing:

  • Clients / Companies
    Name · SIREN · Pennylane ID of the client

  • Lines to bill
    Client · Label · Quantity · Unit price excl. tax · Pennylane invoice ID

The VAT, unit, Pennylane product, and billing status fields are optional and can be configured in the script.

2

Create the Airtable automation

In Automations, create a new automation with the trigger:

  • When a button is clicked

    Select the table containing your Clients / Companies.

This automation will then be linked to the "Generate Pennylane Draft" button in your Airtable Interface.

3

Add a button to the Interface

In the detail sheet of your Clients / Companies, add a button with the action:

  • Run automation

    Select the automation created in the previous step.

  • Recommended button name
    Generate Pennylane draft

Add a confirmation before execution to prevent accidental triggers.

4

Select the lines to bill

Add a Find records action on the table containing your lines to invoice.
Filter only the lines that should be included in the next draft, for example:

  • Client = button client

  • To invoice = Yes

  • Invoiced = No

Adapt these conditions to your business logic: the goal is to return only the lines to be invoiced.

5

Add the Airtable script

Add a Run a script action, then paste the script.
Then add a secret named:

  • PENNYLANE_API_TOKEN

Enter your Pennylane API key there.

Never store your API key directly in the script or in an Airtable field.

6

Configure the script

Add the two input variables:

  • clientRecordId

    Client ID passed by the button

  • lineRecordIds

    Line IDs returned by Find records

Then adapt USER_CONFIG with the names of your Airtable tables and fields.

You should only modify this configuration block, not the rest of the script.

7

Generate your draft invoice

From a customer's record in your Airtable Interface, check the lines to be invoiced and then click on:

  • Generate Pennylane draft

    The script creates the draft in Pennylane and then saves its ID in Airtable.

If a draft already exists for these lines, the script avoids creating a second one.

Created by

Nadir BOUSSETTA

Airtable & Attio Expert · Founder of HyperOps

I help businesses structure their CRM and business tools using Airtable, Attio, and AI. Simple, automated systems that are actually adopted.

Need a tailored solution?

This resource meets a specific need. To structure a system tailored to your processes, your tools, and your teams, let's discuss your requirements.