Login About Gallery
Notion Note v2 (public)
Accepts
App Store Apps, Articles, Contacts, Dates, Email Addresses, Files, Images, iTunes Products, Locations, Map Links, Media, PDFs, Phone Numbers, Rich Text, Safari Web Pages, Text and URLs
TEXT
<Notion API>
TEXT
Text
TEXT
<YouTube Data API (optional)>
SCRIPTING
Get name of
Shortcut Input
SCRIPTING
If
Name
contains
youtube
COMMENT
If this is a YouTube link, get the video’s title from the YouTube API
TEXT
Match
\?.*$
in
Shortcut Input
Case Sensitive
DOCUMENTS
Replace
&feature=share
with
in
Matches
Case Sensitive
Regular Expression
DOCUMENTS
Replace
?v=
with
World
in
Second
Case Sensitive
Regular Expression
DOCUMENTS
Replace
with
World
in
Video ID
Case Sensitive
Regular Expression
VARIABLES
Set variable
URL
to
Video ID 2
URL
https://www.googleapis.com/youtube/v3/videos?id=
Video ID 2
&key=
Youtube Key
&fields=items(id,snippet(channelId,title,categoryId),statistics)&part=snippet,statistics
NETWORK
Get contents of
URL
Options Under Construction
SCRIPTING
Get dictionary from
Contents of URL
SCRIPTING
Get
Value
for
items
in
Youtube API Response
SCRIPTING
Get
Value
for
snippet
in
Items
SCRIPTING
Get
Value
for
title
in
Snippet
VARIABLES
Set variable
Title
to
Title
VARIABLES
Set variable
URL
to
Name
Otherwise
SCRIPTING
Count
Items
in
Name
COMMENT
Sharing a web link can have multiple outcomes. If Shortcut input = 1 -> need to use “Get URLs from …” If Shortcut input = 2 -> index 1 is title and index 2 is URL If Shortcut input = 3 -> index 3 is title and index 2 is URL
SCRIPTING
If
Count
is
1
SCRIPTING
Get
Item At Index
1
from
Name
VARIABLES
Set variable
Title
to
Title
WEB
Get URLs from
Shortcut Input
VARIABLES
Set variable
URL
to
URLs
Otherwise
SCRIPTING
If
Count
is
2
SCRIPTING
Get
Item At Index
1
from
Name
VARIABLES
Set variable
Title
to
Title
SCRIPTING
Get
Item At Index
2
from
Name
VARIABLES
Set variable
URL
to
URL
Otherwise
SCRIPTING
Get
Item At Index
3
from
Name
VARIABLES
Set variable
Title
to
Title
SCRIPTING
Get
Item At Index
2
from
Name
VARIABLES
Set variable
URL
to
URL
End If
End If
End If
DOCUMENTS
Replace
"
with
\"
in
Title
Case Sensitive
Regular Expression
VARIABLES
Set variable
Title
to
Updated Text
COMMENT
Ask for user input
SCRIPTING
Ask
Notes to Notion
Input Type
Text
Default Answer
Text
COMMENT
Check every line to see if there are ‘#’ which indicates a paragraph if there isn’t a
TEXT
Split
User Input
by
New Lines
SCRIPTING
Repeat with each item in
Split Text
TEXT
Match
#
in
Repeat Item
Case Sensitive
SCRIPTING
Count
Items
in
Matches
SCRIPTING
If
Count
is greater than
0
DOCUMENTS
Replace
#
with
World
in
Repeat Item
Case Sensitive
Regular Expression
TEXT
{ "object": "block", "type": "heading_
Count
", "heading_
Count
": { "rich_text": [{ "type": "text", "text": { "content": "
Updated Text
", "link": null } }], "color": "default" } }
Otherwise
TEXT
{ "object": "block", "type": "numbered_list_item", "numbered_list_item": { "rich_text": [{ "type": "text", "text": { "content": "
Repeat Item
", "link": null } }] } }
End If
End Repeat
TEXT
Combine
Repeat Results
with
Custom
,
TEXT
{ "filter": { "and": [{"property": "URL", "url": { "equals": "
URL
" } } ] }, "sorts": [ { "property": "Review Stage", "direction": "ascending" } ] }
SCRIPTING
Get dictionary from
Text
NETWORK
Get contents of
https://api.notion.com/v1/databases/
Database Id
/query
Options Under Construction
SCRIPTING
Get dictionary from
Contents of URL
SCRIPTING
Get
Value
for
results
in
Dictionary
SCRIPTING
If
Dictionary Value
does not have any value
COMMENT
If there is NOT a existing page (by matching url)-> Post
TEXT
URL
SCRIPTING
If
Text
contains
youtube
DOCUMENTS
Replace
youtube.com
with
www.youtube.com
in
Text
Case Sensitive
Regular Expression
DOCUMENTS
Replace
&feature=share
with
World
in
Updated Text
Case Sensitive
Regular Expression
DOCUMENTS
Replace
watch?v=
with
embed/
in
Updated Text
Case Sensitive
Regular Expression
DOCUMENTS
Replace
/
with
\/
in
Updated Text
Case Sensitive
Regular Expression
TEXT
"children":[ { "object": "block", "type": "heading_1", "heading_1": { "rich_text": [{ "type": "text", "text": { "content": "Notes", "link": null } }], "color": "default", "children": [
Combined Text
] }}, { "object": "block", "type": "divider", "divider": {} }, { "type": "video", "object": "block", "video": { "type": "external", "external": { "url": "
Escaped URL
" } } } ]
Otherwise
SAFARI
Get article from
URL
DOCUMENTS
Replace
[\u202F\u00A0]
with
World
in
Article
Case Sensitive
Regular Expression
DOCUMENTS
Replace
[""”“'\t]
with
'
in
Updated Text
Case Sensitive
Regular Expression
TEXT
Split
Updated Text
by
New Lines
SCRIPTING
Repeat with each item in
Split Text
TEXT
{ "type": "paragraph", "object": "block", "paragraph": { "rich_text": [{ "type": "text", "text": { "content": "
Repeat Item
", "link": null } }], "color": "default", } }
End Repeat
TEXT
Combine
Repeat Results
with
Custom
,
TEXT
"children":[ { "object": "block", "type": "heading_1", "heading_1": { "rich_text": [{ "type": "text", "text": { "content": "Notes", "link": null } }], "color": "default", "children": [
Combined Text
] }}, { "object": "block", "type": "divider", "divider": {} },
paragraphs
]
End If
TEXT
{ "parent": { "database_id": "
Title
" }, "properties": { "Name": { "title": [ { "text": { "content": "
URL
" } } ] }, "URL": { "url":"
If Result
" }, "Database": { "select": { "name": "Links" } }, "Status": { "select": { "name": "Review" } } },
Database Id
}
SCRIPTING
Get dictionary from
Text
NETWORK
Get contents of
https://api.notion.com/v1/pages
Options Under Construction
Otherwise
COMMENT
If there is a existing page (by matching url) -> Append
SCRIPTING
Get
First Item
from
Dictionary Value
SCRIPTING
Get
Value
for
id
in
Item from List
NETWORK
Get contents of
https://api.notion.com/v1/blocks/
Page ID
/children
Options Under Construction
SCRIPTING
Get dictionary from
Contents of URL
SCRIPTING
Get
Value
for
results
in
Dictionary
SCRIPTING
Repeat with each item in
Dictionary Value
SCRIPTING
Get
Value
for
id
in
Repeat Item
SCRIPTING
Get
Value
for
has_children
in
Repeat Item
SCRIPTING
If
Dictionary Value
is
<value>
VARIABLES
Set variable
Note Toggle
to
Dictionary Value
End If
End Repeat

Showcuts

Magic Vars

Screenshot

Submitted Anonymously 8 days ago

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

0

4 more actions