Skip to content

Instantly share code, notes, and snippets.

@ahl
Created October 20, 2019 04:22
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ahl/20cb5183098fb8d3231b87a13b77af39 to your computer and use it in GitHub Desktop.
Generate a Slack Workflow that spams the shit out of whoever runs it
#!/usr/bin/env python
import uuid
import json
workflow = {
"source_id": "271537071011674362",
"version": "1",
"workflow": {
"name": "spam me please",
"blueprint": {
"version": "1",
"trigger": {
"type": "channel_action",
"id": "c8b878d2-026b-46e5-83f3-9a3e027da66d",
"config": {
"name": "spam me please",
"channels": [
"ABCDEF"
],
"callback_id": "ebc779d1-919d-402d-bc75-a1131380e000",
"description": "spam me please"
}
},
"steps": []
}
}
}
for i in range(500):
workflow["workflow"]["blueprint"]["steps"].append({
"type": "message",
"id": uuid.uuid1().urn.split(":")[2],
"config": {
"user": {
"ref": "c8b878d2-026b-46e5-83f3-9a3e027da66d==user"
},
"has_button": False,
"message_text": "this is spam"
}
})
print(json.dumps(workflow, indent=2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment