Hi Lara,
While Mac Automator and AppleScript don't have native support for Microsoft OneNote or Planner, you can still create a shortcut workflow using a combination of third-party tools like Keyboard Maestro, Zapier, or Microsoft Power Automate.
Here's a workflow to create a task in Microsoft Planner from a selected text in OneNote (or any other application) using Keyboard Maestro and Microsoft Power Automate:
Download and install Keyboard Maestro: https://www.keyboardmaestro.com/main/
Set up a new Flow in Microsoft Power Automate: https://flow.microsoft.com/
a. Click on 'Create' and choose 'Instant Cloud Flow'.
b. Name your flow and choose the trigger as 'Manually trigger a flow'.
c. Click 'New step' and add an action for 'Planner - Create a task'.
d. Fill in the necessary fields (i.e., Plan Id, Bucket Id, and Title).
e. Save the flow and copy the HTTP POST URL for the flow. You will find it in the "When an HTTP request is received" action under "HTTP POST URL."
Create a new macro in Keyboard Maestro:
a. Click on 'File' > 'New Macro' and give it a name.
b. Add a 'Hot Key Trigger' and define your desired shortcut.
c. Add a 'Copy to Clipboard' action to copy the selected text.
d. Add a 'Pause' action and set it to 0.5 seconds to give the clipboard time to update.
e. Add an 'Execute Shell Script' action with the following code (replace YOUR_HTTP_POST_URL with the URL from step 2e):
curl -X POST -H "Content-Type: application/json" -d "{\"Title\": \"$(pbpaste)\"}" "YOUR_HTTP_POST_URL"
Save the macro.
Btw. We have a community for English here: discussions.apple.com.
Since you’ve posted in English, we’d be happy to see you join us there.
Thanks!