Last active
February 5, 2019 16:30
-
-
Save leggsimon/7e9f3988b32de63257e1cc645d4c4bac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>WFWorkflowActions</key> | |
| <array> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.count</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>UUID</key> | |
| <string>DD7D254A-A13A-4DBB-8D75-25DAD44CA738</string> | |
| <key>WFCountType</key> | |
| <string>Items</string> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.conditional</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>GroupingIdentifier</key> | |
| <string>DA54D3F8-8BC3-4A7A-B7AB-CAE7F01E6575</string> | |
| <key>WFCondition</key> | |
| <string>Is Greater Than</string> | |
| <key>WFControlFlowMode</key> | |
| <integer>0</integer> | |
| <key>WFNumberValue</key> | |
| <real>0.0</real> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.getvariable</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>WFVariable</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>Type</key> | |
| <string>ExtensionInput</string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenAttachment</string> | |
| </dict> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.conditional</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>GroupingIdentifier</key> | |
| <string>DA54D3F8-8BC3-4A7A-B7AB-CAE7F01E6575</string> | |
| <key>WFControlFlowMode</key> | |
| <integer>1</integer> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.exit</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict/> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.conditional</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>GroupingIdentifier</key> | |
| <string>DA54D3F8-8BC3-4A7A-B7AB-CAE7F01E6575</string> | |
| <key>UUID</key> | |
| <string>FC668EB0-A78B-43FF-AAFC-599512A156BA</string> | |
| <key>WFControlFlowMode</key> | |
| <integer>2</integer> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.runworkflow</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>UUID</key> | |
| <string>B1B4C320-E5E8-4248-8A88-453B26418F8F</string> | |
| <key>WFShowWorkflow</key> | |
| <false/> | |
| <key>WFWorkflowName</key> | |
| <string>SLACK_AUTH_TOKEN</string> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.url</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>UUID</key> | |
| <string>A6D783FC-268D-4D75-B3FA-6FC2DD6E8B64</string> | |
| <key>WFURLActionURL</key> | |
| <string>https://slack.com/api/reminders.add</string> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.downloadurl</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>Advanced</key> | |
| <true/> | |
| <key>ShowHeaders</key> | |
| <true/> | |
| <key>UUID</key> | |
| <string>ACDB4ADF-A627-4086-B092-1867CAA62A5C</string> | |
| <key>WFHTTPHeaders</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>WFDictionaryFieldValueItems</key> | |
| <array> | |
| <dict> | |
| <key>WFItemType</key> | |
| <integer>0</integer> | |
| <key>WFKey</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict/> | |
| <key>string</key> | |
| <string>Content-Type</string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| <key>WFValue</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict/> | |
| <key>string</key> | |
| <string>application/json; charset=utf-8</string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFItemType</key> | |
| <integer>0</integer> | |
| <key>WFKey</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict/> | |
| <key>string</key> | |
| <string>Authorization</string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| <key>WFValue</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict> | |
| <key>{7, 1}</key> | |
| <dict> | |
| <key>OutputName</key> | |
| <string>Run Shortcut</string> | |
| <key>OutputUUID</key> | |
| <string>B1B4C320-E5E8-4248-8A88-453B26418F8F</string> | |
| <key>Type</key> | |
| <string>ActionOutput</string> | |
| </dict> | |
| </dict> | |
| <key>string</key> | |
| <string>Bearer </string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| </dict> | |
| </array> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFDictionaryFieldValue</string> | |
| </dict> | |
| <key>WFHTTPMethod</key> | |
| <string>POST</string> | |
| <key>WFJSONValues</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>WFDictionaryFieldValueItems</key> | |
| <array> | |
| <dict> | |
| <key>WFItemType</key> | |
| <integer>0</integer> | |
| <key>WFKey</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict/> | |
| <key>string</key> | |
| <string>text</string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| <key>WFValue</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict> | |
| <key>{18, 1}</key> | |
| <dict> | |
| <key>Type</key> | |
| <string>ExtensionInput</string> | |
| </dict> | |
| </dict> | |
| <key>string</key> | |
| <string>Read this article </string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFItemType</key> | |
| <integer>0</integer> | |
| <key>WFKey</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict/> | |
| <key>string</key> | |
| <string>time</string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| <key>WFValue</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict/> | |
| <key>string</key> | |
| <string>in 1 second</string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| </dict> | |
| </array> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFDictionaryFieldValue</string> | |
| </dict> | |
| </dict> | |
| </dict> | |
| <dict> | |
| <key>WFWorkflowActionIdentifier</key> | |
| <string>is.workflow.actions.showresult</string> | |
| <key>WFWorkflowActionParameters</key> | |
| <dict> | |
| <key>Text</key> | |
| <dict> | |
| <key>Value</key> | |
| <dict> | |
| <key>attachmentsByRange</key> | |
| <dict> | |
| <key>{0, 1}</key> | |
| <dict> | |
| <key>OutputName</key> | |
| <string>Contents of URL</string> | |
| <key>OutputUUID</key> | |
| <string>ACDB4ADF-A627-4086-B092-1867CAA62A5C</string> | |
| <key>Type</key> | |
| <string>ActionOutput</string> | |
| </dict> | |
| </dict> | |
| <key>string</key> | |
| <string></string> | |
| </dict> | |
| <key>WFSerializationType</key> | |
| <string>WFTextTokenString</string> | |
| </dict> | |
| </dict> | |
| </dict> | |
| </array> | |
| <key>WFWorkflowClientRelease</key> | |
| <string>2.1.2</string> | |
| <key>WFWorkflowClientVersion</key> | |
| <string>754</string> | |
| <key>WFWorkflowIcon</key> | |
| <dict> | |
| <key>WFWorkflowIconGlyphNumber</key> | |
| <integer>59649</integer> | |
| <key>WFWorkflowIconImageData</key> | |
| <data> | |
| </data> | |
| <key>WFWorkflowIconStartColor</key> | |
| <integer>4282601983</integer> | |
| </dict> | |
| <key>WFWorkflowImportQuestions</key> | |
| <array/> | |
| <key>WFWorkflowInputContentItemClasses</key> | |
| <array> | |
| <string>WFSafariWebPageContentItem</string> | |
| <string>WFURLContentItem</string> | |
| </array> | |
| <key>WFWorkflowMinimumClientVersion</key> | |
| <integer>411</integer> | |
| <key>WFWorkflowTypes</key> | |
| <array> | |
| <string>NCWidget</string> | |
| <string>WatchKit</string> | |
| <string>ActionExtension</string> | |
| </array> | |
| </dict> | |
| </plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const http = require('https'); | |
| function remindMeLater(url) { | |
| const count = arguments.length; | |
| if (count > 0) { | |
| const options = { | |
| method: 'POST', | |
| hostname: 'slack.com', | |
| path: 'api/reminders.add', | |
| headers: { | |
| 'Content-Type': 'application/json; charset=utf-8', | |
| Authorization: `Bearer ${process.env.SLACK_AUTH_TOKEN}`, | |
| }, | |
| }; | |
| const req = http.request(options, function(res) { | |
| const chunks = []; | |
| res.on('data', function(chunk) { | |
| chunks.push(chunk); | |
| }); | |
| res.on('end', function() { | |
| const body = Buffer.concat(chunks); | |
| console.log(body.toString()); | |
| }); | |
| }); | |
| req.write( | |
| JSON.stringify({ | |
| text: `Read this article ${url}`, | |
| time: 'in 1 second', | |
| }) | |
| ); | |
| req.end(); | |
| } else { | |
| return; | |
| } | |
| } | |
| module.exports = remindMeLater; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment