Editorial Workflows

Affiliate Link

public workflow

Install Workflow

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: A workflow to generate affiliate links for App Store apps using the new PHG affiliate program.

Given an affiliate token, a list of optional campaign tracking codes allows you to create an affiliate link with campaign parameters.

An iTunes link has to be in the clipboard before running the workflow. The affiliate link can be copied, inserted as Markdown link, or sent to URL Sharing Tools.

Shared by: @viticci

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
If No iTunes URL In Clipboard ?
Run the block if
Clipboard
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
itunes.apple.com
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
ON
Message
Copy an iTunes link first!
…End If
If iTunes URL In Clipboard ?
Run the block if
Clipboard
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
itunes.apple.com
Affiliate Token ?
Variable Name
token
Value
at=10l6nh
List: Campaign Tracking Codes ?
Title
Campaign Tracking
List (Lines)
None None Viticci Twitter ct=viticci_twitter Deals Twitter ct=deals_twitter MS Inline ct=ms_inline MS External ct=ms_externalLink Book ct=editorial_book
Multiple Selection
OFF
Show in Popover
ON
Set Variable ?
Variable Name
campaign
Value
Input
Generate Text ?
Text
Clipboard
Remove Whitespace ?
  • Trim leading/trailing whitespace
  • Remove empty lines
Cleaned Up URL ?
Variable Name
clip
Value
Input
Campaign Tracking ?
Run the block if
campaign
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
None
Set Variable ?
Variable Name
append
Value
clip&token&campaign
…End If
No Campaign ?
Run the block if
campaign
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
None
Set Variable ?
Variable Name
append
Value
clip&token
…End If
Show Alert ?
Title
Copy, Insert, Or Tweet?
Message
Choose what to do with your affiliate link.
Button 1
Copy
Output Value
copy
Button 2
Insert
Output Value
insert
Button 3
Share
Output Value
share
Show Cancel Button
ON
Copy To Clipboard ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
copy
Remove HTTPS ?
Run the block if
campaign
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
externalLink
Generate Text ?
Text
append
Find / Replace ?
Find
https://
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
http://
Set Variable ?
Variable Name
append
Value
Input
…End If
Generate Text ?
Text
append
Set Clipboard ?
Play Sound Effect ?
Effect
Woosh_1
Wait until Finished
OFF
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
OFF
Message
Stopped
…End If
Insert As Markdown Link ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
insert
Request Text Input ?
Title
What's the app's name?
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
appname
Value
Input
Replace Selected Text ?
Replacement Text
[Selected Text](append "appname")
…End If
Share Link ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
share
Generate Text ?
Text
append
URL Escape ?
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
editorial://?command=URL%20Sharing%20Tools&input=Input
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON
…End If
…End If