How to automate Relations with Siri Shortcuts [Notion API Tutorial]
HTML-код
- Опубликовано: 21 янв 2023
- To get quick help on your shortcuts join my Discord server - / discord
Support my work through PayPal - zhm.nazar@gmail.com or Patreon - www.patreon.com/NazarNotionAu...
Welcome to my next comprehensive Notion API no-code tutorial. Today's video will be all about automating relations. We are going to learn how to select one of the pages from the related database and apply the relation to it in the process of adding a new entry.
Be sure to check my other projects on the Gumroad page:
nazarzhmurko.gumroad.com/
Shortcut Demo Link:
www.icloud.com/shortcuts/d134...
Here's the link for the additional software I used in this video:
Jayson - apps.apple.com/ua/app/jayson/...
My Social Media:
Twitter - @NazarZhm
Instagram - @nazar_zhm
Pressing the "like bottom" is not enough to express the amazing job that you did here, Nazar. I've been looking for this explanation for a while and you just covered everything. Thank you a lot for sharing your know-how, and please continue sharing more!!
Glad it was helpful!
Amazing! thx bro
You are the man!
Amazing
How can I do if I have the same relation property but one its for a column "from" and the other its for a column "to"?
why the system tell me it cannot find the related database id ? actully i have been checked the correct id and connect the correct integrations.;(
Amazing!! Can we create two relation dictionary ? One for Account and another one for the budget ?
Yes, that’s possible. Then, you can repeat the same sequence of actions with each of the related databases to choose the desired page.
@@nazarzhmurko6461- From which action to which action must the section be in order for me to add further Relation Dictionary?
Thanks
@@JayMaxwell666Hi, Jay! Sorry for the late answer. Here is a shortcut that covers multiple relations(it may not work for you because of properties' names): www.icloud.com/shortcuts/a04c45a5c396452ca92c81da213b0814
This is exactly what I was looking for! Thanks for your tutorial!
I am running into an issue though.. For the step "Get Value for Chosen Item in Text" (Combined Text) I seem to receive no ouptut. (step after Choose from Key" >> The error message says, no key was selected. Any idea? Appreciate your help.
Hi, could you please join my Discord server so I could help you with your problem in a more convenient way.
I have the same issue, what can I do to make it work, looks like the output its empty, I tried to join the Discord but appear as invite invalid@@nazarzhmurko6461
Hi there. I have an error: {"status":401,"object":"error","code":"unauthorized","message":"API token is invalid."} I checked all the setting, as the intergration, conncetion, database id, api token, I even tried refresh and start over. this error keeps showing, would you mind helping me on addressing this issue?
it happened to me as well, try refresh you notion API and use the new one. It worked for me.
It doesn’t work for me. After the loop ( specifically the block at 20:28 ) it says no key has been found/asked. Why is that ?
Hi! Could you please join my Discord server so I could help you to solve your issue in a more convenient way(in case, you haven’t solved it yet). Sorry for the super late reply.
Check if the correct variable for text/dictionary is set. I had a similar issue and this was the fix.
this tutorial worked amazing for me! I was able to even get three relational databases in and after a four day trial and error. The last hiccup I’m facing is my list is not coming up in alphabetical order. Where should I add that chain?
Hi, glad it helped you. You can put “Filter files” action and fill in the dictionary with Page title:Page ID pairs. You’ll only need the “Keys” from that dictionary as in choose from list action.
@@nazarzhmurko6461 WORKED BEAUTIFULLY! THANK YOU!!
@@nazarzhmurko6461 IT WORKED BEAUTIFULLY! THANK YOU!!
This doesn’t seem to work when I select multiple pages to add, is it a different process to add multiple? If so, how do I do that? Also your discord links are broken
Ok I managed to get it working. Idk if this is the most effecient way but it works. The issue is actually with the formatting.
Start right below "Get Value for Chosen Item in Text"
Add:
Repeat with each item in Dictionary Value
Text : {"id":"Repeat Item"}
End Repeat
Combine Repeat Results with Custom ,
Replace what it says in the video with:
Set Variable related_page_id to Combined Text
The area where you call the relation variable in the code originally looked like this:
"Accounts": {
"relation": [{
"id": "related_page_id"
}]
}
But since we already have one of the brackets, quotations and the id part in the variable you need to change it to:
"Accounts": {
"relation": [
related_page_id
]
}
Hi, sorry for a delayed reply. Here’s a shortcut for you to take a look at. This allows for choosing multiple pages to set relation to. www.icloud.com/shortcuts/7970da460eb248078bfbea09bad32ee7
Hi sir, I am trying to use this short cut but I can't seem to find the first Get Value for Notion API in my shortcuts search.. May I know how can we do that or if that is necessary? thanks
Hi! Get Value action is specific for keys stored in Data Jar app. If you want to use this action you need to install this app first.
@@nazarzhmurko6461 I see I see, thanks so much for your reply! I managed to get most of the short cut working, but I got an "status:400,"object":"error","code":validation_error,"message":body failed validation: body.parent should be defined, instead was `undefined`", could I get some help on this please?
where i can found the relation id in notion?
Hi. The id value for relation property is simply the ID of the database set in that relation.
appreciate it my man@@nazarzhmurko6461
Wow 🔥😮 can you link the example shortcut?
I'm gettting this error at setting the page_id at 16:58:
In 'properties.Name.title', the index you specified was outside of the possible range for the array (you asked for item 0, and the array has only 0).
Can anyone help 😄
Hi, sure, I’ll put a link in the description of the video.
Did you solve your problem?
Yes I was able to solve it 😄 you are brilliant 💡
@@nazarzhmurko6461 Is it possible to alphabetize the relations (Cash, Mastercard, PayPal, Visa), or to search through them when selecting from list? For a database with a lot of relations this would be incredibly useful 😅
Do you know if it is possible to add a multi select function? I have successfully programmed my add to Notion DB command to add the task and due date; however, I’d like to select the priority - high, medium, low.
Yes, multi-select is possible. I can give you an example later. However, the priority is single-select, right?
@@nazarzhmurko6461 that would be fantastic! Yes single select only.
Hi, here's the example with single-select and multi-select: www.icloud.com/shortcuts/92be66b6d63e46079243b3c87477b616
@@nazarzhmurko6461 Thank you very much, I appreciate you getting back to me. I will let you know how I go.
Do you still use Discord? I have a problem at the point that properties.Name.title.1.plain_text. I get the error In 'properties' no value was found for dictionary key 'Name'. Can you help my?
Hi! Check the title property name in your Notion database. Make sure it’s really “Name” there and not anything else.
Hai, It is the same but still i get the error at the same place @@nazarzhmurko6461
Hi i had the following error ; {"status":400,"object":"error","code":"invalid_json","message":"Error parsing JSON body."}
The most common problem in this case is the issue with JSON syntax. For example, you may have forgotten to complete quotation marks or commas. Try to put a “Stop and Output” action right after the final text with information filled. Then, copy this output and check it for validity on this website: jsonformatter.curiousconcept.com/#