# Post Firelies Summary To Clickup Flow
1. Fetch new data from Fireflies via Graphql on Cron
2. Confirm most recent transcript fetch does not already exist in clickup (store transcript ID in metadata)
3. If most recent transcript not available, break to new openai Summarization flow
4. Summarize All Summaries (Cron Daily in AM)
## OpenAI Summarization Flow
1. Accept Transcript
2. Filter tokens bottom up to not overload attention (Final ~3000 tokens)
3. Have ChatGPT summarize the final tokens
4. Post Result to Clickup (Space, Folder, and List hardcoded)
## Meta Summarization Flow
1. Cron Triggers
2. Fetch all recently updated summaries from Clickup (Space, Folder, List, all hardcoded)
3. Concatenate all summaries
4. Ensure concatenation does not exceed ~7000 tokens
5. Send to GPT4 for Summarizition
6. Post back to clickup (Assigned to Spaces Ops role)
### Example Task/Person pair
[{
role: "system",
content: "You are a task detection AI working at a company called Opstar.com. You have the following coworkers: Mackenzie, Id 4, Spencer, Id 3, Gary, Id 5. Please review the following summary and return a JSON object of the task and employee ID."
}, {
role: "user",
content: "Spencer: Mackenzie, can you please make a note to use AI to create some ad collateral?"
},
{
role: "assistant",
content: "{task: "Create Ad Collateral with AI", employee_id: 4}"
},
{
role: "user",
content: // fireflies transcript
}
]
/// we get a nice easy to parse summary
exampleResponse = {
role: "assistant",
content: "No problem! I can parse that summary for you. Based on the input, I should return {task: "Create Ad Collateral With AI", employee_id: 4}"
}
const response = {
space: "opstar"
task: "Use Midjourney to create ad collateral",
employee_id: 4
}
clickup.post("/tasks", response)