diff --git a/packages/backend/src/apps/you-need-a-budget/triggers/category-overspent/index.js b/packages/backend/src/apps/you-need-a-budget/triggers/category-overspent/index.js index 9d4df8f7..be49a65a 100644 --- a/packages/backend/src/apps/you-need-a-budget/triggers/category-overspent/index.js +++ b/packages/backend/src/apps/you-need-a-budget/triggers/category-overspent/index.js @@ -10,7 +10,7 @@ export default defineTrigger({ async run($) { const categoryWithNegativeBalance = []; - const response = await $.http.get('/budgets/last-used/categories'); + const response = await $.http.get('/budgets/default/categories'); const categoryGroups = response.data.data.category_groups; categoryGroups.forEach((group) => { diff --git a/packages/backend/src/apps/you-need-a-budget/triggers/goal-completed/index.js b/packages/backend/src/apps/you-need-a-budget/triggers/goal-completed/index.js index edc5ce51..4ffb4124 100644 --- a/packages/backend/src/apps/you-need-a-budget/triggers/goal-completed/index.js +++ b/packages/backend/src/apps/you-need-a-budget/triggers/goal-completed/index.js @@ -9,7 +9,7 @@ export default defineTrigger({ async run($) { const goalCompletedCategories = []; - const response = await $.http.get('/budgets/last-used/categories'); + const response = await $.http.get('/budgets/default/categories'); const categoryGroups = response.data.data.category_groups; categoryGroups.forEach((group) => { diff --git a/packages/backend/src/apps/you-need-a-budget/triggers/low-account-balance/index.js b/packages/backend/src/apps/you-need-a-budget/triggers/low-account-balance/index.js index 68382bec..b7886cc5 100644 --- a/packages/backend/src/apps/you-need-a-budget/triggers/low-account-balance/index.js +++ b/packages/backend/src/apps/you-need-a-budget/triggers/low-account-balance/index.js @@ -21,7 +21,7 @@ export default defineTrigger({ const balanceBelowAmount = $.step.parameters.balanceBelowAmount; const formattedBalance = balanceBelowAmount * 1000; - const response = await $.http.get('/budgets/last-used/accounts'); + const response = await $.http.get('/budgets/default/accounts'); if (response.data?.data?.accounts?.length) { for (const account of response.data.data.accounts) { diff --git a/packages/backend/src/apps/you-need-a-budget/triggers/new-transactions/index.js b/packages/backend/src/apps/you-need-a-budget/triggers/new-transactions/index.js index 55d8bb5a..00aa4c02 100644 --- a/packages/backend/src/apps/you-need-a-budget/triggers/new-transactions/index.js +++ b/packages/backend/src/apps/you-need-a-budget/triggers/new-transactions/index.js @@ -7,7 +7,7 @@ export default defineTrigger({ description: 'Triggers when a new transaction is created.', async run($) { - const response = await $.http.get('/budgets/last-used/transactions'); + const response = await $.http.get('/budgets/default/transactions'); const transactions = response.data.data?.transactions; if (transactions?.length) { diff --git a/packages/docs/pages/apps/you-need-a-budget/connection.md b/packages/docs/pages/apps/you-need-a-budget/connection.md index 21f35a41..be7307d2 100644 --- a/packages/docs/pages/apps/you-need-a-budget/connection.md +++ b/packages/docs/pages/apps/you-need-a-budget/connection.md @@ -11,8 +11,9 @@ connection in Automatisch. If any of the steps are outdated, please let us know! 4. Click on the **New Application** under the **OAuth Applications** section. 5. Fill the new application form. 6. Copy **OAuth Redirect URL** from Automatisch and paste it in **Redirect URI(s)** section. -7. Click on the **Save Application** button. -8. Copy the **Client ID** value to the **Client ID** field on Automatisch. -9. Copy the **Client Secret** value to the **Client Secret** field on Automatisch. -10. Fill the **Screen Name** field on Automatisch. -11. Congrats! Start using your new You Need A Budget connection within the flows. +7. Enable the option **Enable default budget selection when users authorize this application**. +8. Click on the **Save Application** button. +9. Copy the **Client ID** value to the **Client ID** field on Automatisch. +10. Copy the **Client Secret** value to the **Client Secret** field on Automatisch. +11. Fill the **Screen Name** field on Automatisch. +12. Congrats! Start using your new You Need A Budget connection within the flows.