Shortcuts integration

JuCos
JuCos
Community Member

Hello everyone!

Are you thinking of integrating support for the Shortcuts app in the iOS and macOS versions (to offer the ability to open a particular item for example).
Every day when I arrive at work I open 1Password to check my 2FA code to log into my company account. We can imagine creating automations allowing to open an item at the arrival in a particular place for example.

Can't wait to see what you're up to ;)


1Password Version: 8.7.0 (80700045)
Extension Version: Not Provided
OS Version: iOS 15.4.1

Comments

  • Thanks for the feedback JuCos.

    That's an interesting use of automations. I would love to hear more ideas if anyone has them.

    The scenario you describe can be built using a URL scheme. We already support a number of URL schemes, so this should already be possible.

    Find the item in question in 1Password, and while viewing its details, tap the '...' menu in the upper right corner. Then tap "Copy Private Link". This will place a URL on your clipboard. When that URL is opened, 1Password will show you the item. You can paste it into the Safari address bar to test it.

    Now, build your geofenced Shortcut and have it open that link when you run it.

  • JuCos
    JuCos
    Community Member

    Wow, I didn't know that 1Password supports URL shemes, that's a very very good news !
    I'm going to test that ;)

  • JuCos
    JuCos
    Community Member

    Well, it works but:
    1. The URL first opens Safari
    2. Charges xxx.1Password.com
    3. Ask customer if he allows to open 1Password app
    4. Need to touch “Allow”
    5. Then opens the app on the wanted item…

    Not very fast at this time… :-/

  • That certainly is not ideal. I'll experiment and see if I find anything.

  • chadseld
    edited April 2022

    Here is the way to format the URL so that it opens directly in 1Password...

    onepassword://view-item/i?a=account_id&v=vault_id&i=item_id

    Thankfully, the account_id, vault_id, and item_id parts are filled in when you choose "Copy Private Link".

    The "Copy Private Link" URL looks something like this:
    https://start.1password.com/open/i?a=TAHGR7OUSNTUOU97&v=km7bssnth36dhnqy4353u&i=cgfsneothuoeu24q

    Change the first part from https://start.1password.com/open to onepassword://view-item.

    That should open the item directly in 1Password without going through Safari first.

  • JuCos
    JuCos
    Community Member

    😍

  • JuCos
    JuCos
    Community Member

    Great, thank you very much, it works really well!
    To go even further: do you know if it is possible, via an URL scheme, to access directly to one of the elements?
    The idea would be to ask for the "one-time password" item on this log, and display the result in a notification (with the "display result" action of the Shortcuts app)

  • I'm happy that works. Unfortunately, there is no URL scheme for accessing individual elements. That sort of thing can be done on the desktop or on a server using the command line interface (https://developer.1password.com/docs/cli/), but not on mobile.

  • cortig
    cortig
    Community Member

    @chadseld

    We already support a number of URL schemes, so this should already be possible.

    Now… if only that could be re-implemented as well in 1Password for Mac…………………
    ;-)

    Corentin

  • Hey @cortig

    This one actually does exist in 1Password 8 for Mac, at least on the nightly build I'm using. Is it not working for you? If so please feel free to start a thread in the Desktop category so we can take a look. 😃

    Ben

  • cortig
    cortig
    Community Member

    @Ben my issue is usually the other way around. URL schemes for other apps are not working from 1Password 8 for Mac (e.g. activation links for various apps).
    They work fine in 1Password 7 though.

    Corentin

  • Let's move this discussion over to the desktop category then, please. I don't think it relates to what the OP is asking for (opening 1Password to a particular item). It looks like there is already a recent thread on your situation.

    Ben

  • cortig
    cortig
    Community Member

    Indeed @Ben. Didn’t mean to highjack the thread here: I was just mentioning that the same feature wasn’t consistently supported on all platform. I sure wasn’t expecting a follow-up for the Mac issue here.
    Obviously I do care about URL schemes support in 1Password so I wanted to follow this thread as well.

    Corentin

  • Very good. 👍️ I've done some asking around on the other issue and hope to have answers to share soon.

    Ben

  • imaldonado
    imaldonado
    Community Member

    I have a shortcut that I use whenever I'm sending a private link, which automatically replaces the https:// portion with the onepassword:// direct protocol mentioned above. In 1PW 7, the "Copy Private Link" option opens the standard iOS Sharing dialog rather than how version 8 simply places the link on your clipboard, which allows me to then select my Shortcut and end up with the link I want (see below).

    Instead, I would now have to paste the copied link somewhere, select it, and hit Share to do the same thing which is definitely more of a hassle. Could we get the standard sharing dialog back?

    Per @chadseld's request for other uses of potential integration with Shortcuts, I have several.
    I regularly interact with SSH or various REST APIs through Shortcuts, providing API credentials which I'd love to be able to retrieve from 1PW. I envision being able to right click on an entry in 1PW to copy its UUID, and then passing that UUID to 1PW from Shortcuts to retrieve the secret during execution (obviously after 1PW authenticates me).

    Being able to programmatically create new 1PW entries would also be huge. I have Shortcuts which use APIs to create accounts for web services, or connect to a Mac via SSH and create new user accounts, and allowing me to create new 1PW entries similar to how 1PW CLI can but using variables generated during the Shortcut's run (such as Vault, Template, Username, Password, etc) would save me a ton of time manually putting all this info into 1PW.

    On the Mac, a lot of this could be accomplished within Shortcuts by running a bash script that invokes 1PW CLI, but since there's no CLI option on iOS this limits things dramatically. Shortcuts integration could essentially almost be "1PW CLI for non-developers", allowing regular users the ability to interact with 1PW in a powerful yet still user friendly way. It would appeal tremendously to the Shortcuts community as well since there's currently very poor support for managing sensitive data, leaving many users saving secrets in plain text within a shortcut or using very complicated work-arounds involving encrypting info using javascript libraries which are not at all user friendly.


  • JuCos
    JuCos
    Community Member

    Wow @imaldonado, very nice reflection on the possible uses of Shortcuts, it's impressive!
    This app is clearly underused while its potential is huge (and keeps growing with OS updates)

This discussion has been closed.