Skip to content

Instantly share code, notes, and snippets.

@ahl

ahl/spamflow.py

Created Oct 20, 2019
Embed
What would you like to do?
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