DICTIONARY

Dictionary
DICTIONARY

Dictionary
LIST

List
TEXT
Combine
List
with
Custom
|

Combined Text
VARIABLES
Set variable
Bulk Function List
to
Combined Text
DICTIONARY

Dictionary
VARIABLES
Set variable
inputinfo
to
Dictionary
TEXT
Text

Text
DOCUMENTS
Replace
(?m)^\s*\n
with
World
in
Shortcut Input

Updated Text
TEXT
Combine
[Shortcut Input]
with
New Lines

Combined Text
TEXT
Split
[Combined Shortcut Input]
by
New Lines

Split Text
TEXT
Split
[Combined Shortcut Input]
by
Custom
bulk_separator

Split Text
TEXT
Split
[Combined Shortcut Input]
by
Custom
function_separator

Split Text
SCRIPTING
Get
Value
for
function_separator
in
config

Dictionary Value
SCRIPTING
If
Dictionary Value
is
New Lines
VARIABLES
Set variable
elements
to
split by New Lines
SCRIPTING
Otherwise
SCRIPTING
Repeat with each item in
split by func config

Repeat Results
DOCUMENTS
Replace
(?m)\n
with
World
in
Repeat Item

Updated Text
VARIABLES
Add
Updated Text
to
elements
NOTHING
Nothing
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
End If

If Result
SCRIPTING
Get
First Item
from
elements

Item from List
VARIABLES
Set variable
Function Name
to
Item from List
SCRIPTING
Set
function_name
to
Function Name
in
Dictionary

Dictionary
VARIABLES
Set variable
inputinfo
to
Dictionary
SCRIPTING
Get
Value
for
bulk_separator
in
config

Dictionary Value
SCRIPTING
If
Dictionary Value
is
New Lines
VARIABLES
Set variable
Element Groups
to
split by New Lines
SCRIPTING
Otherwise
SCRIPTING
Repeat with each item in
split by bulk config

Repeat Results
SCRIPTING
If
Dictionary Value
is
New Lines
TEXT
Split
Repeat Item
by
New Lines

Split Text
VARIABLES
Set variable
groupargs
to
Split Text
SCRIPTING
Otherwise
TEXT
Split
Repeat Item
by
Custom
function_separator

Split Text
VARIABLES
Set variable
groupargs
to
Split Text
SCRIPTING
End If

If Result
COMMENT
Get function_name and remove it from list
SCRIPTING
Get
Items in Range
1
to
End Index
from
groupargs

Item from List
DOCUMENTS
Replace
Function Name
with
World
in
Item from List

Updated Text
SCRIPTING
Repeat with each item in
Updated Text

Repeat Results
SCRIPTING
If
Repeat Item 2
has any value
VARIABLES
Add
Repeat Item 2
to
REAL
SCRIPTING
End If

If Result
SCRIPTING
End Repeat

Repeat Results
TEXT
Combine
REAL
with
New Lines

Combined Text
VARIABLES
Add
Combined Text
to
Element Groups
VARIABLES
Set variable
REAL
to
Input
NOTHING
Nothing
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
End If

If Result
SCRIPTING
Repeat with each item in
elements

Repeat Results
COMMENT
Function elements includes the function name so it has to check whether its an argument or function name. Reminder to change this into elements and include everything
MATHS
Repeat Index
-
1
Options Under Construction

Calculation Result
SCRIPTING
If
Calculation Result
is not
0
SCRIPTING
Get dictionary from
inputinfo

Dictionary
SCRIPTING
Set
arg
Calculation Result
to
Repeat Item
in
Dictionary

Dictionary
SCRIPTING
Get
Items in Range
Repeat Index
to
End Index
from
elements

Item from List
SCRIPTING
Set
arg
Calculation Result
toEnd
to
Item from List
in
Dictionary

Dictionary
SCRIPTING
End If

If Result
VARIABLES
Set variable
inputinfo
to
If Result
NOTHING
Nothing
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
Repeat with each item in
Element Groups

Repeat Results
COMMENT
-0 this time since the Element Groups variable doesnt contain a function name
MATHS
Repeat Index
+
0
Options Under Construction

Calculation Result
SCRIPTING
Set
group
Calculation Result
to
Repeat Item
in
Dictionary

Dictionary
SCRIPTING
Get
Items in Range
Calculation Result
to
End Index
from
Element Groups

Item from List
SCRIPTING
Set
group
Calculation Result
toEnd
to
Item from List
in
Dictionary

Dictionary
VARIABLES
Set variable
inputinfo
to
Dictionary
SCRIPTING
If
Dictionary Value
is
New Lines
TEXT
Split
Repeat Item
by
New Lines

Split Text
SCRIPTING
Otherwise
TEXT
Split
Repeat Item
by
Custom
function_separator

Split Text
SCRIPTING
End If

If Result
SCRIPTING
Repeat with each item in
If Result

Repeat Results
SCRIPTING
Set
group
Calculation Result
arg
Repeat Index 2
to
Repeat Item 2
in
Dictionary

Dictionary
SCRIPTING
Get
Value
for
group
Calculation Result
arg
Repeat Index 2
in
Dictionary

Dictionary Value
SCRIPTING
Get
Items in Range
Repeat Index 2
to
End Index
from
If Result

Item from List
SCRIPTING
Set
group
Calculation Result
arg
Repeat Index 2
toEnd
to
Item from List
in
Dictionary

Dictionary
VARIABLES
Set variable
inputinfo
to
Dictionary
NOTHING
Nothing
SCRIPTING
End Repeat

Repeat Results
NOTHING
Nothing
SCRIPTING
End Repeat

Repeat Results
SCRIPTING
Show
inputinfo
COMMENT
Changing the function argument seperators could cause some issues
SCRIPTING
If
Function Name
is
NotionAPI
COMMENT
NotionAPI
API_KEY
Method
json
TEXT
Combine
inputinfo
with
New Lines

Combined Text
NETWORK
Get contents of
https://api.notion.com/v1/pages
Options Under Construction

Contents of URL
VARIABLES
Set variable
Return
to
Contents of URL
SCRIPTING
End If

If Result
SCRIPTING
If
Function Name
is
RemoveFromDictionary
COMMENT
RemoveFromDictionary
(dictionary)
keys
SCRIPTING
Get dictionary from
inputinfo

Dictionary
VARIABLES
Set variable
removedict
to
Dictionary
COMMENT
split by New Lines
includes the name of the function too, so we have to get the 3rd instead of the second argument