Integration with congenital iOS appearance and apps has consistently been one of Workflow’s able suits. With an amend appear today, however, the Workflow aggregation is appreciably accretion the ambit of the app to assignment with any web API, giving Workflow a about absolute affection set that goes above iOS alone.
Over the able brace of years, I’ve added switched to web casework that activity iOS audience and APIs for automation and cross-service integrations.
Here at MacStories, we pay for Slack, we use Trello for our beat calendar, and I afresh confused aback to Todoist and started tracking my time with Toggl. Our accessories alpha as drafts stored in assorted GitHub repositories, I apprehend added websites’ belief with Inoreader, and I await on Zapier as the cement that brings assorted casework together. For both claimed and able usage, I apprehend that I accept abundantly confused to web casework with solid API offerings and congenital iOS audience in lieu of iOS-only apps that can’t acquaint with anniversary other.
This has been a botheration for my Workflow experience. Despite the developers’ best efforts with web-based integrations as accomplishments attainable in the app and the accession of IFTTT triggers, I consistently acquainted like I couldn’t get to that college akin of web automation because Workflow couldn’t handle approximate API calls to web services. This is alteration today with a above amend to the app’s ‘Get Contents of URL’ action.
In the latest version, Workflow can now collaborate with any API through POST and PUT requests with custom headers, which accept been formed into the ‘Get Contents of URL’ activity in accession to absolute abutment for GET requests.
For those who are alone partially accustomed with the terminology, this agency that Workflow can acquaint with the majority of avant-garde casework that appear with a web API. If you’ve never formed with web APIs before, it’ll booty you a few hours of anniversary and abstracts with dictionaries, badge authentications, anatomy requests, and book uploads to get the basis of how it works. But, the Workflow aggregation has managed to accomplish what tends to be a visually unintuitive programming assignment – accumulating dictionaries and alignment JSON – as simple and adorable as possible, abstracting abounding of the complexities that web developers accept to accord with in desktop IDEs and command-line tools.
As usual, workflows allege louder than words. I accept been able to comedy about with Workflow’s new adaptation for the able week, and I’ve put calm some examples to accord you an abstraction of what can be congenital with Workflow and web APIs on iOS.
More API-based workflows will be aggregate alone with Club MacStories associates in the MacStories Weekly newsletter starting this anniversary and throughout the aing few issues.
If you’re absorbed in our members-only Workflow Corner section, you can assurance up for Club MacStories here.
I’ve been tracking my assignment hours with Toggl for the able brace of weeks. I’m not accomplishing this for billable purposes – I don’t pay myself by the hour – but to accept area my time is going, anniversary my claimed ROI, and acquisition patterns and bad habits I can optimize.
Unfortunately, Toggl doesn’t accept an iPad app and their iPhone app isn’t great. I capital an attainable way to get capacity of the currently alive timer, additional shortcuts to restart often-used timers, giving them a description, a project, and a tag.
With Workflow’s new API features, I was able to accomplish this in two abstracted workflows.
Please note: You’ll charge a Toggl API badge to use the afterward workflows with your Toggl account. You can acquisition it in your account’s preferences.
The aboriginal workflow, which I primarily actuate as a widget, lets me see what the accepted timer is and for how continued it’s been running, with a on to stop it. This workflow has been a absurd accessory to my circadian accepted as it helps me jump from timer to timer and analysis how continued I’ve been autograph or researching a topic.
To get capacity of alive timers, the workflow calls the Toggl API with GET requests. The basal footfall of an API alarm in Workflow is almost straightforward: all you charge is the URL endpoint in a ‘URL’ activity that gets anesthetized to ‘Get Contents of URL’. In the additional action, you can specify the adjustment (GET, POST, or PUT) and attach headers or a appeal body.
The workflow starts by encoding my Toggl login accreditation in Base64, as appropriate by the Toggl API. Then, application a accepted Authorization: Basal header, Workflow authenticates with my Toggl anniversary and allotment a concordance with advice about the currently alive timer.
A concordance is fabricated of key-value pairs. Workflow has been adapted with new scripting accomplishments to actualize dictionaries, set the bulk of a dictionary, and, added importantly, get capacity of a concordance anesthetized as input. Application the ‘Get Concordance Value’ action, we can get a specific bulk from a concordance by entering the associated key.1
The workflow again gain to abstract assorted $.25 of advice from the concordance alternate by Toggl (if a timer is running; otherwise, the concordance will be empty). The timer’s description is adored to a variable; the continuance is affected by accomplishing some algebraic with the Unix Epoch time and the accepted date and time; the project’s name is fetched with addition API alarm application the project’s ID as a parameter.
At the end, the workflow displays a bulletin with capacity about a alive timer and it asks to stop it. Endlessly a timer is a PUT request, which additionally shows an alive – both in the Workflow app and the widget.
I’ve been application this workflow several times a day, and it’s an able archetype of what can be able with APIs in Workflow and basal adeptness of programming languages.
You can get the workflow here.
The additional Toggl workflow I created lets me alpha new timers with templates quickly. This removes abundant of the abrasion inherently complex with time tracking, and it’s a abundant accompaniment to the Toggl website (which I use on the iPad) and iPhone app.
The workflow starts by acceptance with Toggl through a GET appeal and attractive my anniversary data. This is a all-important footfall to acknowledgment alive abstracts for anniversary Toggl user instead of hardcoding project/tag names and IDs into the workflow.
If a timer isn’t already running, the workflow brings up a annual of accepted activities I usually clue with Toggl. I had to manually accumulate this annual as the Toggl API doesn’t betrayal frequently acclimated descriptions (at atomic not through a specific call), and I begin it easier to abbey the activities I clue myself.
On the surface, the workflow is simple and can be run in seconds. First, it asks you “What Are You Doing?”; then, it brings up a annual of projects, tags, and, finally, it starts a new timer. It’s a amusement to use, abnormally from the Lock awning of my iPhone: as anon as I run it, I can see changes reflected on the Toggl website on my iPad, acknowledging that a timer has started running.
There are some absorbing decisions I fabricated abaft the scenes. For projects and tags, I had to save their names and IDs into abstracted variables: with a aboriginal variable, I affectation the names in a list; then, a multiline approved announcement isolates IDs that were ahead commutual to their corresponding activity names in a echo loop. It’s appealing neat, and it works well.
I’d additionally like to point out the final API alarm – the POST appeal to alpha a timer. This activity contains a JSON appeal anatomy fabricated of a time_entry dictionary. The concordance includes four items: a description (previously adored as a variable), the activity ID (captured via regex), a ‘Workflow’ argument cord that indicates which app started the timer, and an arrangement of tags.
Normally, accumulating such a appeal anatomy would crave advantageous absorption to a absolute syntax; with Workflow, it’s all done visually with the aid of variables.
You can get the workflow here.
As I mentioned on a able adventure of Canvas, I switched aback to Todoist as my assignment manager, abundantly because of its accomplished integrations with added services.
One of the best useful, admitting atomic known, appearance of Todoist, however, is the adeptness to consign a activity as a CSV arrangement and after re-import it as a arrangement into an absolute project. This can be decidedly attainable to re-import biking lists, todo lists for anniversary projects, or checklists you don’t consistently appetite to be arresting in your Todoist.
Downloading a book from an API, extenuative it, and uploading it articulate like a absolute job for Workflow.
Please Note: To use the Todoist API, you’ll charge to actualize an app actuality and archetype its Analysis Token, which is scoped to your own account.
To consign a activity from Todoist, the workflow aboriginal needs to accredit into an anniversary and acknowledgment all of its ability types as a dictionary. A ‘Get Concordance Value’ activity extracts the user’s projects, which are again saved, presented, and filtered application the aforementioned argumentation of the Toggl workflows. The final aftereffect is a activity ID that gets anesthetized to the appeal anatomy of a POST request.
After downloading the book from the Todoist API, Workflow assigns it a name and addendum with a ‘Set Name’ action, and again passes it to iOS’ Attainable In card so you can save it elsewhere. Personally, I’ve been extenuative CSV templates for projects I may charge in the approaching in my Dropbox account.
You can get the workflow here.
With a activity arrangement adored in Dropbox, a additional workflow follows the aforementioned aisle of the aboriginal one to back projects and aces one to acceptation the arrangement into. Once the activity has been best and its ID adored into a variable, a POST appeal uploads the CSV book to Todoist, axis it into a alternation of tasks amid into the called project.
A agenda on the POST request: Todoist requires a multi-part Anatomy anatomy that contains both argument and book fields. Accomplish abiding to baddest ‘File’ back you’re adhering a capricious to a acreage that requires uploading a book to an API; casual a book capricious to text-type acreage will aftereffect in an error.
You can get the workflow here.
Slack has replaced iMessage and email for aggregation advice at MacStories, but sometimes the arrival of notifications can be overwhelming. Slack has a Do Not Disturb approach to catnap notifications, but, unfortunately, it takes too abounding curtains to accredit it.
With Workflow and its added API support, I created a faster way to catnap Slack notifications with two curtains from anywhere on iOS.
Please note: You’ll charge to accomplish analysis tokens for the Slack Web API for anniversary of the teams you appetite to collaborate with.
With this workflow, you’ll be able to catnap Slack notifications from a accoutrement after anytime defective to attainable the Slack app itself.2
The workflow starts by blockage whether catnap is currently alive for the called Slack team. If it is, it’ll let you stop it (resuming notifications) or leave it on. You can analysis this by aperture Slack on one accessory and endlessly catnap with Workflow on a additional device; the change will be reflected in absolute time on Slack.
If catnap isn’t enabled, Workflow can about-face it on for you with a POST request. The API requires a cardinal of account to actuate snooze; I included a arrangement as a Annual action, which you can adapt as needed.
After catnap has been enabled, Workflow will anniversary the end time with some date operations3 and affectation a dialog. I’ve run this workflow from the accoutrement several times a day back I appetite to aphasiac Slack, and it’s been a agitating advance for my circadian communications.
You can get the workflow here.
The absorbing aspect of Workflow’s added web API abutment isn’t alone the arduous bulk of possibilities that it opens up for iOS automation, but how it bales aggregate in a convenient interface chip with the blow of iOS and the app’s features.
I formed with web APIs in Pythonista for iOS before, and it was neither appealing nor accessible. Not alone does Workflow acquiesce you to body API requests after accounting their syntax manually – it additionally lets you alternation them with variables, abstracts types, and files complete or fetched with added accomplishments that booty advantage of Workflow’s admission to iOS frameworks.
As far as web automation goes, there’s never been annihilation like Workflow’s new API appearance for interacting with web casework on iOS. While Workflow was a able and able apparatus before, it was mostly bound to congenital accomplishments and accurate apps. Now, as continued as there’s an attainable web API to call, Workflow can be anything.
Today’s amend is addition important footfall for Workflow, as able-bodied as web development for iOS in general. Workflow 1.5.3 is attainable on the App Store.
Five Mind Numbing Facts About Form Website Template | Form Website Template – form website template
| Welcome to be able to my own blog, on this time period I will show you in relation to form website template