Hello n8n community!
I’m building a workflow in n8n to compare invoice data with bank payments and determine whether they have been paid or received. However, I’m facing issues in the final step, where I want OpenAI GPT-4 (or please another better idea to make this posible)to perform the comparison correctly.
I’m also open to better alternatives if anyone has suggestions on how to improve the matching logic, especially for text descriptions that are similar but not identical.
Workflow Overview
The workflow pulls two sets of data from two different Google Sheets:
Invoices Sheet (contains):
- Invoice Number
- Company Name
- Amount (without signs + or -)
- Description of the transaction
Bank Transactions Sheet (contains):
- Amount (with a positive or negative sign: + or -)
- Company/Description of the transaction
- Transaction Date
What I’m Trying to Achieve
- Find matches between invoices and bank transactions based on the amount and company name.
- If the invoice amount matches a bank payment with a positive sign (+) ➝
"I received the payment"
- If the invoice amount matches a bank payment with a negative sign (-) ➝
"I paid the invoice"
- If the amount matches but the company name or description is not an exact match, try to find the closest match possible.
- Store the results in a Google Sheet.