Professional ClickUp task automation with state sync.
Project description
ClickFlow-Sync 🚀
ClickFlow-Sync is a professional, idempotent Python engine designed to bridge external data sources (Vulnerability Scanners, Monitoring Tools, or CI/CD pipelines) with ClickUp. Unlike a simple API wrapper, ClickFlow-Sync manages state. It ensures that if a scanner finds the same issue twice, it updates the existing ClickUp task instead of creating annoying duplicates.
📦 Installation
1. Clone the repository:
git clone https://github.com/jenilmistryhq/ClickFlow-Sync.git
cd clickflow-sync
2. Install Dependencies:
pip install -r requirements.txt
⚙ Configuration (.env)
The engine automatically looks for a .env file in your root directory. Create one with the
following variables:
# ClickUp Personal API Token (Settings > Apps)
CLICKUP_API_KEY=pk_your_api_key_here
# The Default List where tasks will be created
CLICKUP_LIST_ID=9012000000
# Default Assignee IDs (Comma-separated for multiple people)
CLICKUP_DEFAULT_ASSIGNEE=1234567,8901234
🛠 Usage Patterns
ClickFlow-Sync is designed to be imported into your existing projects. You do not need to modify the core library.
1. Simple Integration (Zero Config)
Uses the default settings and logging provided in your .env.
from src.engine import ClickFlowEngine
from src.models import ClickUpTask
# Initialize with .env defaults
engine = ClickFlowEngine()
# Define the task
# internal_id is the unique key from your scanner/source
task = ClickUpTask(
internal_id="CVE-2024-001",
title="Critical Vulnerability Found",
description="Found on Production Server-01",
priority=1
)
# Run Sync
engine.upsert_task(task)
2. Advanced Routing & Team Mapping
You can inject custom logic to route tasks to different teams (Security vs. DevOps) or different Folders/Lists.
from src.engine import ClickFlowEngine
from src.models import ClickUpTask
# 1. Map your own categories to ClickUp User IDs
MY_TEAM_MAP = {
"security": [111222, 333444],
"devops": [555666],
"general": [777888]
}
# 2. Initialize engine with your custom map and a default list
engine = ClickFlowEngine(
team_map=MY_TEAM_MAP,
default_list_id="9015000000"
)
# 3. Create a task for a specific team
# This will automatically assign the IDs in the 'security' map
new_task = ClickUpTask(
internal_id="SCAN-99",
category="security",
title="Unauthorized API Access",
target_list_id="9016000000" # Optional: Override destination list
)
engine.upsert_task(new_task)
🏗 Architecture & State
ClickFlow-Sync creates a sync_state.json file upon the first run.
- Creation: If
internal_idis not found insync_state.json, a new task is created and the ID is mapped. - Update: If
internal_idexists, the engine performs aPUTrequest to update the existing task details.
📝 Data Model (ClickUpTask)
| Field | Type | Default | Description |
|-----------------|------|--------------|-----------------------------------------------------------------|
| internal_id | str | Required | The unique ID from your source system. |
| title | str | Required | The ClickUp task name. |
| description | str | "" | The task body / content. |
| category | str | "general" | Used for looking up assignees in the Team Map. |
| priority | int | None | 1 (Urgent), 2 (High), 3 (Normal), 4 (Low). |
| tags | list | [] | List of strings to apply as ClickUp tags. |
| target_list_id | str | None | Send the task to a specific ClickUp list. |
🤝 Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clickflow_sync-1.1.0.tar.gz.
File metadata
- Download URL: clickflow_sync-1.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdc9c9ed878fca9f55ba9ddaefe54a9493ff6400b34cfe1e31d9cc22f5e045ac
|
|
| MD5 |
ea5fe05b209da078d1031ae5b178b1cc
|
|
| BLAKE2b-256 |
3fb20ff8d79e86a4c4f1d865d7f973b037e0945845adc5970922170ef515b85d
|
File details
Details for the file clickflow_sync-1.1.0-py3-none-any.whl.
File metadata
- Download URL: clickflow_sync-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f334172e42791d16df347df0a21162e649ab8d223f6702e3c6a1ea00178ba09
|
|
| MD5 |
d4959fbcebb7d1436d9d7398eff8df06
|
|
| BLAKE2b-256 |
4bb60a29fdcc62225dfeef4343fe5420ed3bd7fa7218765e274867ff84d5d006
|