Skip to main content

Parse WhatsApp invoice images with Gemini and sync payments to HubSpot and Slack

Workflow preview

Workflow preview
100%
Parse WhatsApp invoice images with Gemini and sync payments to HubSpot and Slack preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow captures invoice images/documents from WhatsApp, extracts structured invoice data with Google Gemini, and syncs the result to HubSpot by creating vendor payment tasks o...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.whatsapptrigger, n8n-nodes-base.if, n8n-nodes-base.whatsapp, n8n-nodes-base.switch, n8n-nodes-base.hubspot, n8n-nodes-base.httprequest, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by iamvaar.

Original n8n.io source

1.1 Workflow description

Title
Parse WhatsApp invoice images with Gemini and sync payments to HubSpot and Slack
Workflow name
Parse WhatsApp invoice images with Gemini and sync payments to HubSpot and Slack

Quick Overview

This workflow captures invoice images/documents from WhatsApp, extracts structured invoice data with Google Gemini, and syncs the result to HubSpot by creating vendor-payment tasks or closing matching deals, while sending confirmations back on WhatsApp and raising exceptions to Slack.

How it works

  1. Triggers when a new WhatsApp message is received.
  2. Checks that the message contains an image or document, then fetches the media URL and downloads the attachment.
  3. Converts the downloaded file to base64 and sends it to the Google Gemini API to extract structured invoice details as JSON.
  4. Validates that the attachment is an invoice and routes it based on the extracted invoice direction and status.
  5. For Payable invoices that are not marked as paid, searches HubSpot for a matching contact by WhatsApp phone number, creates a HubSpot task associated with that contact, sends a confirmation back via WhatsApp, and posts the invoice details to Slack.
  6. For Receivable invoices, searches HubSpot for deals linked to the contact and matching the extracted invoice_id, then closes the deal as won and thanks the sender on WhatsApp when a match is found.
  7. Posts alerts to Slack when the invoice status is unknown or when no HubSpot deal is found for a receivable invoice.

Setup

  1. Connect WhatsApp Business credentials for the WhatsApp Trigger and WhatsApp send actions, and set the correct phone number ID.
  2. Add Google Gemini (Google PaLM) API credentials and update the prompt/company name (currently "blankarray") to match your business.
  3. Connect HubSpot OAuth2 credentials and ensure your deals include an invoice_id property and your associations/contact phone fields support the workflow’s searches.
  4. Connect Slack credentials and select the target channel IDs for the Slack notification steps.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - When WhatsApp Message Received

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 10 - Check Message Type

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 11 - Get WhatsApp Media Metadata

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1.1

Block 12 - Route by Workflow Path

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 13 - Search HubSpot Contacts

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.2

Block 14 - Download WhatsApp Media

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 15 - Parse Invoice with Gemini

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 16 - Clean and Parse JSON Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - Create HubSpot Task

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 18 - Send WhatsApp Task Confirm

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1.1

Block 19 - Search HubSpot Deals

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.2

Block 20 - Fetch HubSpot Deal Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 21 - Send WhatsApp Deal Update

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1.1

Block 22 - If Deal Found

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 23 - Update HubSpot Deal

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.2

Block 24 - Post Alert to Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.5

Showing the first 24 of 29 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Parse WhatsApp invoice images with Gemini and sync payments to HubSpot and Slack
Complexity advanced
Nodes 29
Categories Invoice Processing, AI Summarization
Author iamvaar
Published 09 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16214/16214.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Parse WhatsApp invoice images with Gemini and sync payments to HubSpot and Slack do?

Quick Overview This workflow captures invoice images/documents from WhatsApp, extracts structured invoice data with Google Gemini, and syncs the result to HubSpot by creating vendor payment tasks o...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing, AI Summarization use case.