DICTIONARY

Dictionary
SCRIPTING
Get
Value
for
url
in
Dictionary

Dictionary Value
SCRIPTING
If
dict_url
does not have any value
SCRIPTING
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
SCRIPTING
Get
Value
for
personal_token
in
Dictionary

Dictionary Value
SCRIPTING
If
dict_token
does not have any value
SCRIPTING
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
VARIABLES
Set variable
config
to
Dictionary
NUMBER
0

Number
VARIABLES
Set variable
budget_id
to
Number
TEXT
(none)

Text
TEXT
asset

Text
SCRIPTING
Set
accounts_type
to
accounts_type
in
Dictionary

Dictionary
SHORTCUTS

Shortcut Result
LIST

List
SCRIPTING

Chosen Item
TEXT
Change
Chosen Item
to
lowercase

Updated Text
VARIABLES
Set variable
transaction_type
to
Updated Text
SCRIPTING
If
transaction_type
is
deposit
TEXT
revenue

Text
SCRIPTING
Set
accounts_type
to
accounts_type
in
Dictionary

Dictionary
SHORTCUTS

Shortcut Result
VARIABLES
Set variable
source_account
to
Revenue Accounts
VARIABLES
Set variable
dest_account
to
Asset Accounts
SCRIPTING
Otherwise
VARIABLES
Set variable
source_account
to
Asset Accounts
SCRIPTING
If
transaction_type
is
withdrawal
TEXT
expense

Text
SCRIPTING
Set
accounts_type
to
accounts_type
in
Dictionary

Dictionary
SHORTCUTS

Shortcut Result
VARIABLES
Set variable
dest_account
to
Expense Account
SCRIPTING
Otherwise
VARIABLES
Set variable
dest_account
to
Asset Accounts
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
Choose from
source_account

Chosen Item
SCRIPTING
Choose from
dest_account
Prompt
Destination Account

Chosen Item
SCRIPTING
If
transaction_type
is
withdrawal
SHORTCUTS
Run
List Budgets
Input
config

Shortcut Result
VARIABLES
Set variable
budgets
to
res_budgets
SCRIPTING
If
budgets
has any value
VARIABLES
Set variable
budgets_list
to
(none)
VARIABLES
Add
budgets
to
budgets_list
SCRIPTING
Choose from
budgets_list

Chosen Item
SCRIPTING
If
budget
is not
(none)
SCRIPTING
Get
Value
for
budget
in
budgets

Dictionary Value
VARIABLES
Set variable
budget_id
to
Dictionary Value
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING

Provided Input
SCRIPTING

Provided Input
SHORTCUTS
Run
List Categories
Input
config

Shortcut Result
VARIABLES
Set variable
categories
to
(none)
VARIABLES
Add
res_categories
to
categories
SCRIPTING
Choose from
categories

Chosen Item
DICTIONARY

Dictionary
VARIABLES
Set variable
payload
to
Dictionary
SCRIPTING
If
budget_id
is greater than
0
SCRIPTING
Set
budget_id
to
budget_id
in
Dictionary

Dictionary
VARIABLES
Set variable
payload
to
Dictionary
SCRIPTING
End If

If Result
SCRIPTING
If
category_text
is
(none)
SCRIPTING
Otherwise
VARIABLES
Set variable
category
to
category_text
SCRIPTING
End If

If Result
SCRIPTING
If
source_acc_text
is
none
SCRIPTING
Otherwise
TEXT
Match
^(.+)( \()
in
source_acc_text

Matches
SCRIPTING
If
Matches
has any value
TEXT
Get
Group At Index
1
in
Matches

Text
VARIABLES
Set variable
source_acc
to
Text
SCRIPTING
Otherwise
VARIABLES
Set variable
source_acc
to
source_acc_text
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
If
dest_acc_text
is
none
SCRIPTING
Otherwise
TEXT
Match
^(.+)( \()
in
dest_acc_text

Matches
SCRIPTING
If
Matches
has any value
TEXT
Get
Group At Index
1
in
Matches

Text
VARIABLES
Set variable
dest_acc
to
Text
SCRIPTING
Otherwise
VARIABLES
Set variable
dest_acc
to
dest_acc_text
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
If
category
has any value
SCRIPTING
Set
category_name
to
category
in
Dictionary

Dictionary
VARIABLES
Set variable
payload
to
Dictionary
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
SCRIPTING
If
source_acc
has any value
SCRIPTING
Set
source_name
to
source_acc
in
Dictionary

Dictionary
VARIABLES
Set variable
payload
to
Dictionary