Send pdf to slack

From stevehuang0115/crewly · View interactive version

Send pdf to slack is an AI agent skill from the GitHub repository stevehuang0115/crewly. Convert a markdown file to PDF and upload it to a Slack channel.

How to use this skill

Skill file

Send PDF to Slack

Converts a markdown file to PDF using weasyprint (Python) and uploads it to a Slack channel via the /api/slack/upload-file endpoint.

Prerequisites

Usage

bash config/skills/agent/send-pdf-to-slack/execute.sh --channel C0123ABC --file /path/to/document.md --title "Weekly Report"

Parameters

| Parameter | Required | Description |

|-----------|----------|-------------|

| --channel, -c | Yes | Slack channel ID to upload the PDF to |

| --file, -f | Yes | Path to the markdown file to convert |

| --title, -T | No | Title for the uploaded PDF (defaults to filename) |

| --text, -t | No | Initial comment to include with the upload |

| --thread, -r | No | The Slack thread timestamp the PDF answers. Without it the harness picks the thread of your work, or the upload is refused (409 thread_unresolved) — it is never posted at the top level by default |

| --allow-new-thread | No | Post at the channel's top level on purpose (a new thread) |

Examples

# Basic upload
bash execute.sh --channel C0123ABC --file report.md

# Upload with title and comment
bash execute.sh --channel C0123ABC --file report.md --title "Q4 Report" --text "Here is the quarterly report"

# Upload in a thread
bash execute.sh --channel C0123ABC --file notes.md --thread 1707123456.789000

Output

JSON response from the upload API with fileId on success. Also emits a [NOTIFY] block for chat service integration.

Error Handling

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.