Workflow Double Dip

I have a simple workflow that is triggered by incoming funds into my bank account. I have it grab a list of scheduled transactions from YNAB for my utilities bills due within the next 7 days and it then sends the total amount to my fintech app which then initiates a bank transfer to my utilities account. That works fine if i get paid weekly but i got an unexpected deposit the next day after my workflow ran and it double dipped any scheduled transactions that hadn’t cleared yet. Any thoughts on how to handle this?

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Albidrez !
Do you store somewhere the paid transactions so track which YNAB transactions have already been processed using Redis (or a database) as a deduplication layer?

Heres what i would do:

  1. Store processed transaction IDs in Redis with a TTL (e.g., 14 days)
  2. Before initiating transfers, check if each transaction has already been processed
  3. Only process new transactions that haven’t been seen before
  4. Mark transactions as processed after successful transfer

An example fliw here using Redis as storagge :

Cheers!

Hi, I apologize for not responding sooner. Thank you for your thoughtful response. I had tried flagging the processed transactions via PUT requests but YNAP has a date window that makes this problematic. Your solution might be the way. I’m wondering in n8n’s new data table would be useful here.

It should be fast enough!

Since data storage is internal(maybe even in workflow memory), it’s about milliseconds and not hundreds of milliseconds for a Google Sheet write/read…

I think you got that !

Cheers! And Happy n8n-ing :blush:!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.