Optional calls
Shorten, Extend and Rephrase Agenda Items
Use the APIs below to generate shortened, extended, or rephrased suggestions for an agenda item. After selecting a perfect rephrase element, call updateAgendaItemById and insert the chosen text into the appropriate textList entry for the desired depth level.
To run the rephrasing of certain content there is a 3 steps process to follow:
- Call SHORTEN_AGENDA_ITEM, EXTEND_AGENDA_ITEM or REPHRASE_AGENDA_ITEM - This triggeres an asynchonous task in the backgroud which can take some time.
- Start pulling interval each 5 seconds on GET_REPHRASE_ELEMENT_BY_PROTOCOL_SLUG. If the refactoredSuggestion value is [] then make that call again in 5 seconds. Else use the value.
- Call UPDATE_AGENDA_ITEM_BY_ID with the values from the query.
Quick rules:
agendaItemId(String, required) — id of the agenda item to modify.userInput(String) — optional for Shorten/Extend, required for Rephrase. Use it to guide tone, length, and constraints (e.g., “formal”, “bullet points”, “max 30 words”).
ShortenAgendaItem
Generates shorter, more concise versions of an agenda item.
Example object structure of the input parameter
mutation ShortenAgendaItem($agendaItemId:String!, $userInput:String){
shortenAgendaItem(agendaItemId:$agendaItemId, userInput:$userInput){
rephraseElement{
id
status
userInput
rephraseType
}
}
}
Example object structure of the input parameter
{
"agendaItemId": "AGENDA_ITEM_ID",
"userInput": "Summarize in one concise sentence suitable for a meeting overview."
}
Example object structure of the input parameter
import axios from "axios";
const SHORTEN_AGENDA_ITEM = `
mutation ShortenAgendaItem($agendaItemId:String!, $userInput:String){
shortenAgendaItem(agendaItemId:$agendaItemId, userInput:$userInput){
rephraseElement{
id
status
userInput
rephraseType
}
}
}
`;
export async function shortenAgendaItem(agendaItemId, userInput = null) {
const dataObj = { query: SHORTEN_AGENDA_ITEM, variables: { agendaItemId, userInput } };
const res = await axios.post(process.env.VUE_APP_GRAPHQL_API, dataObj, {
headers: { "Content-Type": "application/json", "x-api-key": process.env.VUE_APP_API_KEY },
});
return res.data.data.shortenAgendaItem.summarySuggestions.suggestions;
}
ExtendAgendaItem
Creates expanded or more detailed versions of the agenda item.
Example object structure of the input parameter
mutation ExtendAgendaItem($agendaItemId:String!, $userInput:String){
extendAgendaItem(agendaItemId:$agendaItemId, userInput:$userInput){
rephraseElement{
id
status
userInput
rephraseType
}
}
}
Example object structure of the input parameter
{
"agendaItemId": "AGENDA_ITEM_ID",
"userInput": "Add background, rationale and next steps in 3 short bullet points."
}
Example object structure of the input parameter
import axios from "axios";
const EXTEND_AGENDA_ITEM = `
mutation ExtendAgendaItem($agendaItemId:String!, $userInput:String){
extendAgendaItem(agendaItemId:$agendaItemId, userInput:$userInput){
rephraseElement{
id
status
userInput
rephraseType
}
}
}
`;
export async function extendAgendaItem(agendaItemId, userInput = null) {
const dataObj = { query: EXTEND_AGENDA_ITEM, variables: { agendaItemId, userInput } };
const res = await axios.post(process.env.VUE_APP_GRAPHQL_API, dataObj, {
headers: { "Content-Type": "application/json", "x-api-key": process.env.VUE_APP_API_KEY },
});
return res.data.data.extendAgendaItem.summarySuggestions.suggestions;
}
RephraseAgendaItem
Rewrites the agenda item according to the instructions in userInput. userInput is mandatory here — the mutation will throw if it’s missing.
Example object structure of the input parameter
mutation RephraseAgendaItem($agendaItemId:String!, $userInput:String!){
rephraseAgendaItem(agendaItemId:$agendaItemId, userInput:$userInput){
rephraseElement{
id
status
userInput
rephraseType
}
}
}
Example object structure of the input parameter
{
"agendaItemId": "AGENDA_ITEM_ID",
"userInput": "Rewrite in a neutral professional tone, avoid names, and make it one paragraph."
}
Example object structure of the input parameter
import axios from "axios";
const REPHRASE_AGENDA_ITEM = `
mutation RephraseAgendaItem($agendaItemId:String!, $userInput:String!){
rephraseAgendaItem(agendaItemId:$agendaItemId, userInput:$userInput){
rephraseElement{
id
status
userInput
rephraseType
}
}
}
`;
export async function rephraseAgendaItem(agendaItemId, userInput) {
if (!userInput) throw new Error("userInput is required for rephraseAgendaItem");
const dataObj = { query: REPHRASE_AGENDA_ITEM, variables: { agendaItemId, userInput } };
const res = await axios.post(process.env.VUE_APP_GRAPHQL_API, dataObj, {
headers: { "Content-Type": "application/json", "x-api-key": process.env.VUE_APP_API_KEY },
});
return res.data.data.rephraseAgendaItem.summarySuggestions.suggestions;
}
Tips and examples for userInput
- Shorten: “Shorten to 12 words, keep key action and decision.”
- Extend: “Add rationale and two next steps in bullets.”
- Rephrase: “Neutral tone, remove personal references, use formal language.”
GetRephraseElementByProtocolSlug
import axios from "axios";
const GET_REPHRASE_ELEMENT_BY_PROTOCOL_SLUG = `
query GetRephraseElementByProtocolSlug($protocolSlug: String!){
getRephraseElementByProtocolSlug(protocolSlug: $protocolSlug){
agendaItemId
agendaItemDepth
refactoredSuggestion
}
}`
- refactoredSuggestion contains a list of strings based on the user input as well as the pre existing content of the agenda item
Have questions?
Still have questions? Talk to support.