Jump to content
ppl4world

Request: Google Meet Workflow

Recommended Posts

Hi, could someone help me create a workflow which creates a new google meet, opens it (in Chrome) and copies the URL into the clipboard? I'm happy to make a PayPal donation in exchange. Thank you! Peter

Share this post


Link to post

Welcome, @ppl4world.

 

For anyone that may want to tackle this (I would gladly do it, but they require a G Suite account and I’d prefer to not associate the one I have), here’s the documentation. It seems you have to follow specific steps to start a meeting from the browser, which may require automating the webpage. That might be doable since we can send JavaScript to Chrome with AppleScript, but that doesn’t always work out fine.

 

But I’m open to helping someone who is only getting partly there and needs help getting to the finish line.

Share this post


Link to post
18 minutes ago, vitor said:

It seems you have to follow specific steps to start a meeting from the browser

 

Yeah. Looks like you have to click on a button that runs some JavaScript that does some stuff and eventually loads your new Hangout. There doesn't appear to be an actual "new Meet" URL you can simply open.

 

Share this post


Link to post

Thank you @vitor and @deanishe! I'll see if I can make heads or tails from the description, never written a workflow beforehand (but lots of other scripts). Will post progress and failure (probably not in that order) here. 

Thank you for your quick response!

Share this post


Link to post

@ppl4world The Workflow part is easy, and the last thing you should do. What you need to do first is build the necessary JavaScript to control the page and get the appropriate details.

Share this post


Link to post

@ppl4world

My solution is very trivial but it's required that meet with your expectations if I understood you correctly.

If you want to create a video meeting?

 

https://plus.google.com/hangouts/_

 

Workflow:

Workflow (drive.google.com)

 

Required:

make login in your Google account in Chrome browser to (create cookies)

 

Optional:

the configuration of WF - optional: setting the variable "delayForRequire" depending on your network speed: by default - 3 sec.

 

Collection of some useful links (by the results of searching this solution):

Zappier: Google Hangouts Chat Integrations [upcoming]

doc: Zapier for Alfred: Run Automated Workflows From Your Mac Keyboard

medium: OAuth2 and Google OAuth Playground

some blog: Creating Google Hangouts With Apps via URL

 

--------------------------

bikenik's PayPal

Edited by bikeNik
update workflow v1.0.2

Share this post


Link to post

Google Meet just had an update where you're able to create a new Google Meet room using "https://meet.google.com/new". So this workflow pretty much works as-is if you update the endPoint URL.

...
set endPoint to "https://meet.google.com/new"
...

The only issue I've run into (which I don't know how to fix) is the Copy to Clipboard step (where the workflow automatically copies the meet URL to the clipboard). If I only have one window open the workflow works correctly regardless of how many tabs are open. But if I have multiple windows open (which is always the case given I work from two monitors) the URL that is pasted to the clipboard isn't from the Active Window. It instead copies a URL from the active tab from another window (it seems to target the first Chrome window).

 

Hopefully that makes sense and someone is able to help out?

Share this post


Link to post
Posted (edited)

@richardsison, wow, that's great news! Just when I started to think how can I hack the Web UI via injecting JS and inspecting DOM :)

Here's what I came up with: GDrive Link. It also should handle cases when the Chrome isn't opened or when multiple windows of Chrome are present. That's my first Alfred Workflow though, so let me know if something is wrong or can be improved!

Now I'm bashing my head against the following issue: I want to have more control over windows focus. In particular, I'd like to be able to open Chrome (if needed) and then open URL in it without losing focus of the current window.
Scenario: I chat with my colleague in Slack, we decide that we should have a quick call in Meet, I invoke Alfred Workflow, everything is opened in background, URL is copied into clipboard, I immediately paste it into the chat box. Currently, workflow calls `activate`, so after invoking it you're switched to Chrome window, then URL is copied into the clipboard, and then I'd need to switch back to Slack. Yes, that's like one keystroke, but we're automating things here, right? ;)

I'd appreciate any tips here -- I've found that I can launch application in background through shell invocation `open -ga "Google Chrome"`, but it still steals the focus for me. This seems to be a Chrome(-ium) specific thing though, some of my applications (say, Sublime Text) launch in background perfectly with `-ga`.

Edited by dsavvinov

Share this post


Link to post

I've been able to do this by opening the "/new" URL in the default browser, and then using AS to query the current URL of the active browser and put it on the clipboard. I can't find any way to open a URL without bringing the browser to the foreground.

Share this post


Link to post
On 5/5/2020 at 3:54 AM, richardsison said:

it seems to target the first Chrome window

 

Scripts target the first window because window 1 should always be the active one.

Share this post


Link to post

@dsavvinov Wow that's pretty perfect mate!

 

Two things:

  • Multiple Google accounts
    • I am signed in to two Google accounts (personal and work). By default it creates a meet link for my personal account but I'd like to choose. If I change the URL to be "meet.google.com?authuser=1" it creates the meet from the correct account, but it breaks the Workflow somewhere. How can I fix this?
  • Automatic check on timeout failure
    • Out of the box I've had to increase the delay because I wasn't able to copy the URL successfully. At 5secs is fairly safe.
    • At a failure due to timeout, is there a way it could automatically check the active URL in Chrome for something that starts with "https://meet.google.com" but isn't "meet.google.com/new" and if it is, copy that URL and pass to Alfred?
    • If that's possible, would it be easy to ignore auto-generated URLs from google meet which happen to start with "/new" (example: meet.google.com/new-url-exa)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...