iOS Shortcut To Post Card

I like the embed feature in SuperNotes for YouTube videos. I created a shortcut that grabs the url and the title of a YouTube video and uses that information to make a new card with the video embedded.

Essentially I use the Get url shortcut method to grab the title for the video I’m sharing from YouTube and save it a variable named “title”.

I then get the url from the same method and stick that in a text method to creat the markdown necessary for embedding a YouTube video in a card.
@[youtube](link to video)
This markdown text is saved in a variable named “link”.

Then using the link https://api.supernotes.app/v1/cards/simple in a new get url method set to post along with my API key in the header and my variables in the body along with some tags I use, the necessay info is sent to my account and creates a new card that is titled after the YouTube video with the video embedded in the card.

I then use the open app method to open SuperNotes and my card should be the newest created.

I used the information from the thread below to translate all the JSON info into iOS shortcuts:

5 Likes

This is great @clefshanty, glad you were able to get this working!

Worth noting that we are actively working on improving our developer docs / integrations so that it should be much easier / clearer how to do things like this in the future.

1 Like

I’m currently working on a similar type shortcut using Tasker on Android.

Will post in the next couple of days.

@clefshanty could you share a link to this shortcut so I can one-tap add? Thanks for taking the time to make it!

Just got this to work except the cards created this way don’t get set to the default Priority I have set for new cards. They get created as Visible. Same happens for cards created via email to Supernotes. Is there a way to set the visibility via this API? Thanks.

Hi @rcavin, glad to hear you got it to work. Currently API / Email integrations don’t check your “New Card Visibility” preference – this is only a preference for the app itself, currently.

The simple create card endpoint you are using for this shortcut does support a visibility argument though, so if you set that to whichever you’d like it should work.

However it’s probably reasonable for the endpoint to respect your preference if a value for visibility is not specified, so we’ll see what we can do to improve this in an upcoming release.

@rcavin, we’ve just pushed an update to the developer docs as we recently added a Visibility pref to the Simple Create Card endpoint. You can view that here – Simple Create Card - Supernotes. Configuring it as so:

enum Visibility {
  INVISIBLE = -1,
  VISIBLE = 0,
  PRIORITY = 1,
}

i.e. Setting it to “1” would make the card Priority. We hope that helps and regarding Email to Supernotes, we’ve queued that to be added in a future release :slight_smile: