Sync Tango Card jobs when funds return

Recipe ToolsMarketing

What it does

When this automation runs every 5 minutes, it checks the Tango Card account balance. If funds are sufficient, it reruns jobs that failed due to insufficient funds.

Who it's for

Finance teams who need to automatically retry reward payouts once budget is restored to a Tango Card account.

How teams use this

Automatically retry rewards after budget refresh

When a Tango Card account is replenished, this automation detects the new balance and reruns all pending reward jobs without manual intervention. The team sees failed rewards processed as soon as funds are available.

Monitor multiple Tango Card accounts

Set up separate instances of this automation for different Tango Card accounts or departments, each with its own low balance threshold. Each instance runs independently on the same 5-minute schedule.

Adjust retry logic by error type

Extend this automation to check for additional error codes beyond 402.001, or add conditions to filter jobs by date range or reward type. Only jobs matching the specified criteria will be rerun.

Alert the team when retries succeed

Include a notification step that sends a summary to Slack or email after each run, showing how many jobs were rerun and the new account balance. The team stays informed without checking manually.

How it works

  1. Check every 5 minutes. This automation runs on a 5-minute interval to monitor the Tango Card account and retry failed reward jobs.
  2. Get account balance. Retrieve the current balance from the specified Tango Card account and compare it against the low balance threshold set by the team.
  3. Search for failed jobs. Find all jobs that failed because of insufficient funds error code 402.001, then loop through each one to identify which can now be rerun in Tango Card.
  4. Rerun eligible jobs. For each failed job with error code 402.001, rerun it now that the account balance meets the reward amount requirement.
  5. Resume monitoring when done. Once all eligible jobs have been rerun, turn the main workflow back on if no jobs remain in the retry queue.