Editorial Workflows

Shared Monthly Update

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the 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: This workflow is designed to send an email to a large number of people using the BCC field (This is why it requires the Drafts action to actually send it. Otherwise, the whole thing could be done within Editorial.) It depends on a text file with a list of emails, one per line in your file browser. I use an Automator script running on a Mac to create mine. My Mac mini is set to run this script every day very early in the morning. That way, I always have an updated list of emails.

This workflow makes liberal use of conditional blocks for the purpose of being able to 'fold' repeated actions out of the way and thereby make the workflow less unwieldy.

It has the following parameters that should be changed to fit your particular situation:
- The name of your text file with your list of emails in it. This should be set in the action 'Get Email List' located right after the first block of conditionals.
- The number of emails per variable (or Small List). This is set by the 'interval' parameter in the 'Split Email List Into Small Lists By "interval":' action. Remember, there are up to 11 variables in this workflow so plan accordingly. It will only use the variables that have emails in them. But it can not create more on the fly.
- In the 'Set Subject of Email' action within the 'Prepare Text' block you can enter the subject of your email. This assumes it will be the same subject every time you send this email. I put the current month in mine so that it's not exactly the same subject every month.
- The body of the email will be the full text of the current document. I write the email in Markdown and often include pictures and links. The workflow will convert it to HTML.
- The last few actions prepare a template for the next time you will send this email. You'll want to set the 'Number', 'Unit' and 'Output Format' in the 'Date Math' action to line up with your plans.
- Set the value in the 'Next Month's Name' action to match what you want the template to be named. I use date math to pre-name it for next month.
- In the last action, 'Next Month's Name', set the template for the body of the next occurrence's email. I include this month's text at the bottom so I can see what I wrote last month.
- You'll also want to click [the following link](drafts://x-callback-url/import_action?type=email&name=MonthlyMail&to=&cc=&bcc=%5B%5Bclipboard%5D%5D&subjecttype=0&subject=%5B%5Btitle%5D%5D&markdown=1&background=0&fromprefix=&template=%5B%5Bbody%5D%5D) to create the corresponding Drafts action:

drafts://x-callback-url/import_action?type=email&name=MonthlyMail&to=&cc=&bcc=%5B%5Bclipboard%5D%5D&subjecttype=0&subject=%5B%5Btitle%5D%5D&markdown=1&background=0&fromprefix=&template=%5B%5Bbody%5D%5D

You can rename the Drafts action anything you like, just be sure to change the name of the Drafts action you call in each of the urls in the 'Cascade Through Short Lists' block to match the name of the Drafts action, if you do change it.

Note: You will have to press the send button once per 'Short List' in Drafts. This can be changed to send automatically, but it will not come from your email, it will come from drafts-mail@agiletortoise.com instead. I prefer to send it from my own email address.

Note 2: This workflow has not been thoroughly tested and debugged. I believe it to be relatively free of trouble, so let me know if you have any issues by starting a thread in the forum. :-)

Thanks to Ole for creating the date math script and helping to nail down the script that splits the long list into smaller ones!

Enjoy!

Shared by: Minnepicker (Dan)

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Set Up Variables ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Variable ?
Variable Name
emails_01
Value
Set Variable ?
Variable Name
emails_02
Value
Set Variable ?
Variable Name
emails_03
Value
Set Variable ?
Variable Name
emails_04
Value
Set Variable ?
Variable Name
emails_05
Value
Set Variable ?
Variable Name
emails_06
Value
Set Variable ?
Variable Name
emails_07
Value
Set Variable ?
Variable Name
emails_08
Value
Set Variable ?
Variable Name
emails_09
Value
Set Variable ?
Variable Name
emails_10
Value
Set Variable ?
Variable Name
emails_11
Value
…End If
Get Email List ?
File Name
/Monthly Emails/Monthly Email Addresses.txt
In Dropbox
ON
If File Does Not Exist
  • Empty Output
  • Stop Workflow
Check If List Contains Addresses ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
ON
Message
Monthly Email Addresses.txt is empty.
…End If
Split Email List Into Small Lists By "interval": ?
Clean Up Small Lists ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
x
Generate Text ?
Text
emails_01
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_01
Value
Input
…End If
Generate Text ?
Text
emails_02
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_02
Value
Input
…End If
Generate Text ?
Text
emails_03
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_03
Value
Input
…End If
Generate Text ?
Text
emails_04
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_04
Value
Input
…End If
Generate Text ?
Text
emails_05
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_05
Value
Input
…End If
Generate Text ?
Text
emails_06
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_06
Value
Input
…End If
Generate Text ?
Text
emails_07
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_07
Value
Input
…End If
Generate Text ?
Text
emails_08
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_08
Value
Input
…End If
Generate Text ?
Text
emails_09
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_09
Value
Input
…End If
Generate Text ?
Text
emails_10
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_10
Value
Input
…End If
Generate Text ?
Text
emails_11
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
[
Find / Replace ?
Find
u'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
emails_11
Value
Input
…End If
…End If
Prepare Text ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Subject of Email ?
Variable Name
subject
Value
Place Your Subject Here!
Document Text ?
Folded Text
  • Include
  • Replace with:
Set Variable ?
Variable Name
body
Value
Input
Set Variable ?
Variable Name
draft
Value
subject body
…End If
Cascade Through Short Lists ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
List 01 ?
Run the block if
emails_01
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_01
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 02 ?
Run the block if
emails_02
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_02
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 03 ?
Run the block if
emails_03
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_03
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 04 ?
Run the block if
emails_04
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_04
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 05 ?
Run the block if
emails_05
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_05
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 06 ?
Run the block if
emails_06
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_06
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 07 ?
Run the block if
emails_07
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_07
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 08 ?
Run the block if
emails_08
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_08
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 09 ?
Run the block if
emails_09
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_09
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 10 ?
Run the block if
emails_10
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_10
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
List 11 ?
Run the block if
emails_11
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Generate Text ?
Text
emails_11
Set Clipboard ?
Open x-callback URL ?
URL
drafts://x-callback-url/create?text=draft&action=MonthlyMail
x-success
editorial://workflow-callback
Output
  • First Parameter of x-success URL
  • Raw x-success URL
…End If
…End If
Date Math ?
Set Variable ?
Variable Name
next_months
Value
Input - Monthly Update.txt
Set File Contents ?
File Name
%var:next_months
In Dropbox
ON
New Text
Place your template for your monthly Update here!
If File Does Not Exist
  • Create
  • Stop Workflow