Skip to main content

n8n

Available

Connecting n8n and creating webhooks requires the Premium plan.

Connect Frihet to n8n to automate workflows: automatic reminders, CRM synchronization, custom notifications, and more.

What is it for?​

With n8n integrated:

  • Automatic Reminders — Sends emails when an invoice is due
  • CRM Synchronization — New clients are created in Salesforce, Pipedrive, etc.
  • Custom Notifications — Slack, email, Telegram, custom webhook
  • Complex Workflows — Conditionals, loops, logical branching
  • Webhook endpoints — Other systems trigger actions in Frihet

Official community node​

Frihet publishes an official community node on npm: n8n-nodes-frihet. Install it from n8n without setting up manual HTTP requests:

  1. In n8n's settings, open Community Nodes and click Install
  2. Enter: n8n-nodes-frihet
  3. Confirm the installation

Or via CLI on self-hosted instances:

npm install n8n-nodes-frihet

The node appears in your n8n palette, authenticates with a Frihet API key and gives access to these resources:

ResourceOperations
InvoiceCreate, Get, List, Update, Delete, Send, Mark Paid
QuoteCreate, Get, List, Update, Delete, Send
ExpenseCreate, Get, List, Update, Delete
ClientCreate, Get, List, Update, Delete
ProductCreate, Get, List, Update, Delete
VendorCreate, Get, List, Update, Delete

List operations use cursor pagination. Tax fields cover IVA, IGIC, IPSI and IRPF.

Requirements​

  • n8n Account — Create one at n8n.io
  • Basic n8n knowledge — Or use pre-configured templates
  • Frihet API endpoint — Consult the REST API documentation
  • Premium plan — Connecting n8n and creating webhooks require it

Get Frihet credentials​

In the main menu, open Integrations. The page has four tabs: Integrations, Webhooks, API Keys and n8n.

  1. Open the API Keys tab and click "Create API Key"
  2. Copy the key (it starts with fri_); it is shown only once
  3. To receive events in n8n, open the Webhooks tab, click "Create Webhook" and paste the URL of the n8n Webhook node

Store the key in a safe place.

The n8n tab​

The n8n tab connects your n8n instance to Frihet. It asks for your n8n URL (for example https://n8n.yourdomain.com), an n8n API key (generated in the API section of n8n's settings) and, optionally, the Workflow ID. If you provide a workflow, Frihet creates a webhook to it on its own. This is not where Frihet keys are created: those are in the API Keys tab.

Connect Frihet to n8n​

Step 1: Create workflow in n8n​

  1. Go to n8n.io
  2. New workflow
  3. Add node: Frihet (search for it)

Step 2: Configure credentials​

  1. In the Frihet node, go to Credentials
  2. Click on "Create new credential"
  3. Paste the Frihet API Key
  4. Save

Step 3: Choose action​

In the node, choose what to do:

  • Create invoice
  • Create expense
  • Create client
  • Get client list
  • Get invoice list
  • Mark invoice as paid

Common use cases​

Due date reminder​

When: Every morning at 9am What it does: Searches for overdue invoices and sends email to the client

n8n workflow:
1. Trigger: Every day at 09:00
2. Frihet Node: Get overdue invoices
3. Loop: For each invoice
4. Email Node: Send reminder email
5. Update in Frihet: Mark "Reminder sent"

New client → CRM​

When: Client is created in Frihet What it does: Automatically adds it to Salesforce/Pipedrive

n8n workflow:
1. Trigger: Frihet Webhook (new client)
2. Frihet Node: Get client data
3. Salesforce Node: Create contact
4. Email Node: Notify the team

Invoice paid → Slack Notification​

When: An invoice is marked as paid What it does: Sends notification to Slack with details

n8n workflow:
1. Trigger: Frihet Webhook (invoice paid)
2. Frihet Node: Get invoice details
3. Slack Node: Send formatted message
4. Sheet Node: Register in Google Sheets (optional)

Create invoice from form​

When: Someone completes a form What it does: Automatically creates invoice in Frihet

n8n workflow:
1. Trigger: Form Webhook (TypeForm, Typebot, etc.)
2. Node: Process form data
3. Frihet Node: Create invoice
4. Email Node: Confirm to the client

Pre-configured templates​

n8n and Frihet offer ready-made templates:

  1. In n8n, go to Community → Templates
  2. Search for "Frihet"
  3. Choose a template
  4. Click on "Use this template"
  5. Just configure credentials

Available templates​

  • "Overdue invoice reminder"
  • "Sync clients to Airtable"
  • "Payment notifications in Slack"
  • "Create invoices from Typeform"
  • "Daily backup to Google Drive"

Use them as a base and customize.

Frihet Webhook​

Frihet automatically sends events to n8n. Consult the full webhooks documentation for details on HMAC-SHA256 signature, retries, and all event types.

Events that trigger webhook​

EventData sent
Invoice createdID, client, amount, due date
Invoice paidID, client, amount, payment date
Overdue invoiceID, client, amount, days overdue
Client createdID, name, email, phone
Expense createdID, category, amount, date
Payment receivedInvoice ID, client, amount

Configure webhook in Frihet​

  1. In Integrations, open the Webhooks tab
  2. Click "Create Webhook"
  3. Choose which events to trigger (recommended: all)
  4. Paste the URL of an n8n "Webhook" node set up as a trigger

Available actions in Frihet​

Create invoice​

Input:
- Client ID (or create new)
- Concept
- Amount
- Due date
- VAT

Output:
- Created invoice ID
- Document number
- Status

Create expense​

Input:
- Category
- Amount
- Date
- Vendor (optional)

Output:
- Expense ID
- Confirmation

Get list​

Input:
- Filter (date, client, status)
- Result limit

Output:
- Array of invoices/expenses/clients

Mark as paid​

Input:
- Invoice ID
- Amount (optional)
- Payment method (optional)

Output:
- Confirmation
- Update date

Full example: Daily reminder​

Objective​

Every morning at 8am, if there are overdue invoices, send an email to the client.

Workflow in n8n​

Step 1: Trigger

Scheduler: Every day at 08:00
Timezone: Europe/Madrid

Step 2: Get overdue invoices

Node: Frihet
Action: Get Invoices
Filter: State = "unpaid" AND Due Date < Today

Step 3: Loop over each invoice

Loop Node: For each invoice in the result
- Get client email
- Calculate days overdue

Step 4: Send email

Node: Gmail / SendGrid
To: client email
Subject: "Invoice #{{$node.Frihet.data.number}} to collect"
Body:
"Your invoice {{id}} for {{amount}} euros
is overdue by {{days_overdue}} days.
Please make the payment as soon as possible.
[Payment link]"

Step 5: Update in Frihet

Node: Frihet
Action: Update Invoice
Update: reminder_sent = true
Update: reminder_date = today

Bidirectional synchronization with CRM​

Create client in Frihet → Salesforce​

1. Trigger: Frihet Webhook (client created)
2. Frihet: Get client data
3. Salesforce: Create Account
4. Salesforce: Create Contact
5. Frihet: Save Salesforce ID in client

Create deal in Salesforce → Invoice in Frihet​

1. Trigger: Salesforce Webhook (deal won)
2. Salesforce: Get deal data
3. Frihet: Create client (if new)
4. Frihet: Create invoice with deal amount
5. Salesforce: Update deal with link to Frihet

Custom notifications​

Option 1: Email​

Node: Gmail / SendGrid
Custom template with:
- Your company logo
- Invoice details
- Payment link

Option 2: Slack​

Node: Slack
Message:
":moneybag: Invoice paid
Client: {{client}}
Amount: €{{amount}}
Status: Paid ✅"

Option 3: WhatsApp/Telegram​

Node: Telegram / WhatsApp (via Twilio)
Message:
"Hello {{name}},
Your invoice #{{id}} is due in 3 days.
[Pay here]"

Option 4: Custom webhook​

If you have your own system:

Node: HTTP POST
URL: https://your-system.com/frihet-webhook
Body:
{
"event": "invoice_paid",
"invoice_id": "...",
"amount": 1200,
"client": "..."
}

Your system processes as needed.

Conditions and logic​

You can add conditions:

IF invoice overdue MORE THAN 7 DAYS
THEN send email + create task
ELSE IF overdue LESS THAN 7 DAYS
THEN only send email
ELSE
THEN do nothing

Or more complex branching:

IF client is "Premium"
THEN call by phone
ELSE IF client is "Regular"
THEN send email
ELSE
THEN ignore

Testing and debugging​

Execute workflow manually​

  1. In n8n, click on "Execute"
  2. You see results step by step
  3. If there is an error, it shows it with details
  4. Adjust and re-execute

Logs and history​

  1. Go to Executions in your workflow
  2. You see each execution:
    • When it was executed
    • If it was successful
    • Execution time
    • Results of each node

Test with test data​

Before activating (scheduling), test:

  1. Edit the trigger to Manual
  2. Click on "Execute" several times
  3. Verify that each node works
  4. Then change to Automatic Trigger (scheduler)

Limits and costs​

In n8n​

  • Automatic Workflows: Depends on your plan
  • Executions: Free up to a certain limit
  • Nodes: Unlimited
  • Integrations: Hundreds available

In Frihet​

  • API calls: Available on all plans
  • Webhooks: Up to 20 per account
  • Data: No special limit for n8n

Troubleshooting​

"Webhook not triggering"​

  • Verify that the webhook is active in Frihet
  • The event must match the configuration
  • Check n8n logs: Executions → history
  • If there's an HTTP error, check webhook status

"Error: No credentials found"​

  • In n8n, verify that credentials are saved
  • Copy the Frihet API Key again
  • Recreate the credential

"How to debug if something is not working?"​

  1. Add a "Log" node between steps to see intermediate data
  2. Execute manually step by step
  3. Go to Executions → full history
  4. Search for the error in the logs

"Can I use multiple workflows?"​

Yes. You can have:

  • Workflow 1: Daily reminders
  • Workflow 2: CRM synchronization
  • Workflow 3: Automatic backups
  • All running in parallel

Next steps​


Previous: Revolut Business