Set up the Harvest iOS Shortcut
Use this guide to create an iOS Shortcut that sends links to Harvest from the share sheet.
1) Get your access token
- Go to Profile -> Settings -> API Access -> Personal API Token.
- Open -> Copy Token.
Shortcut values you’ll need
Production URL
https://harvest.thecollectiveapp.xyz/api/shortcuts/add-eventDevelopment URL
https://b1c9ae59-f059-4f7a-8f8f-06b9b9659fc0.web.createdevserver.com/api/shortcuts/add-eventAuthorization: Bearer <YOUR_TOKEN>2) Create the Shortcut on iPhone
- Open the Shortcuts app -> tap the + to create a new Shortcut.
- Add the Get URLs from Input action and select Shortcut Input as the input.
- Add the Get Items from List action and select First Item and URLs as the inputs.
- Add the Set Variable action and select Shared URL and item from List as the inputs.
- Add the Dictionary action and add new item "url" as the key and Shared URL as the value.
- Add the Get Contents of URL action with input https://harvest.thecollectiveapp.xyz/api/shortcuts/add-event.
- Drop down the Get Contents of URL action and change the Method to POST. Add header Content-Type with value application/json. Add header Authorization with value Bearer <YOUR_TOKEN>.
- Set Request Body to JSON and add field url with value Dictionary.
- Scroll down in the Dictionary value from Step 8 and enter "url" in the Get Value for Key input.
- Add the Show Notification action and enter input "Link added to Harvest!". Add Title "Harvest". Set the attachment to Contents of URL.
- Click the (i) -> enable Show in Share Sheet.
- Give the shortcut a name like Add to Harvest and save.
Add to the Share Sheet
In the Shortcut’s settings, make sure Show in Share Sheet is turned on.
Tip
If your token is ever shared, go to Profile → Settings → API Access → Personal API Token and generate a new token. Then update the Authorization header in your Shortcut.