Skip to content

Instantly share code, notes, and snippets.

@foeken
Created November 24, 2024 17:33
Show Gist options
  • Save foeken/f75eecdd8574882a4c01a10a376197aa to your computer and use it in GitHub Desktop.
Save foeken/f75eecdd8574882a4c01a10a376197aa to your computer and use it in GitHub Desktop.
Reflect examples
[
{
"id" : "222273F7-7F1D-4912-9BAD-8110B26D9AD1",
"icon" : "folder",
"type" : "folder",
"instructions" : "",
"variables" : [
],
"identifier" : "reflect",
"forceConfigurable" : false,
"description" : "",
"order" : 45,
"displayName" : "Reflect"
},
{
"displayName" : "Extract Tasks & Add",
"actions" : [
"10000000-0000-0000-0000-000000000001",
"2984E316-6AB5-4BA7-999D-BA5A008FEF3A"
],
"order" : 1,
"prompt" : "Today is {{ date.weekday }}, {{ date.today }} {{ time.now }}.\n\nExtract all tasks for {{ settings.name }} from the input below (and optionally the image), assume the input is directed at the receiver of the tasks. \n\nIf you see a name that you assume is the requester, include that. Include the source of the task if you can figure that out (i.e Mail, Slack). Tasks are ALWAYS in English, and NEVER contain newlines.\n\nRead the assignment again: Extract tasks, requester, and source. In English, no newlines.\n\nExample tasks:\n- Perform x for y (via Slack)\n- Read x\n- Sign document x (via Mail)\n\nALWAYS extract tasks AND send a notification with the name of the task(s)\n\nInput:\n{{ originalInput | process }}",
"folderId" : "222273F7-7F1D-4912-9BAD-8110B26D9AD1",
"type" : "askAI",
"output" : "ignored",
"description" : "This action extracts tasks and sends them to Reflect",
"modalities" : [
"text"
],
"id" : "B4188611-44D4-4F51-A981-4DAFA063CE1B",
"allowMultipleTurns" : false,
"variables" : [
],
"icon" : "brain",
"instructions" : "",
"identifier" : "extractTasksAdd",
"forceConfigurable" : false
},
{
"identifier" : "createTaskApi",
"url" : "https:\/\/reflect.app\/api\/graphs\/{{ graphId }}\/daily-notes",
"displayName" : "Create Task (API)",
"headers" : [
{
"value" : "Bearer {{ secretAccessToken }}",
"key" : "Authorization",
"id" : "E64E3893-FC61-4BB1-872F-9F4BCA5DACD7"
},
{
"id" : "F9B289ED-0325-4883-9CF9-28C49DA3C9BE",
"key" : "Content-Type",
"value" : "application\/json"
}
],
"variables" : [
{
"id" : "D60B9B60-C3BE-46B4-8A87-2771FB6F77FB",
"name" : "secretAccessToken",
"description" : "Your access token",
"required" : true,
"type" : "string",
"ai" : false,
"value" : "",
"label" : "Access Token"
},
{
"ai" : false,
"id" : "1AAE610B-4B1B-4E96-A03D-A42EB5169876",
"name" : "graphId",
"required" : true,
"description" : "The name of your graph",
"label" : "Graph ID",
"type" : "string",
"value" : ""
},
{
"name" : "list",
"label" : "List Name",
"ai" : false,
"value" : "",
"id" : "38C6C0FA-7085-44F7-BD43-C42142C794CB",
"type" : "string",
"required" : true,
"description" : "Name of the list to append to. To backlink, use the format [[List Name]]. (Optional)"
},
{
"ai" : true,
"label" : "Date",
"id" : "671E3A21-B3CB-49D2-A5BF-DB2799154EDA",
"description" : "Date of the daily note. ISO 8601 format. Defaults to today.",
"value" : "",
"type" : "string",
"name" : "targetDate",
"required" : true
},
{
"id" : "DAEACBAD-819F-413D-AF1B-7BD880559ECA",
"required" : true,
"type" : "array",
"description" : "The tasks",
"value" : "",
"label" : "Tasks",
"name" : "tasks",
"ai" : true
}
],
"type" : "makeAPIRequest",
"icon" : "network",
"method" : "PUT",
"payload" : "{\n {% if targetDate %}\"date\": \"{{ targetDate | jsonEscape }}\",{% endif %}\n \"text\": \"{% for task in tasks %} + {{ task | jsonEscape }}\\n{% endfor %}\",\n \"transform_type\": \"list-append\",\n \"list_name\": \"{{ list | jsonEscape }}\"\n}",
"forceConfigurable" : false,
"id" : "2984E316-6AB5-4BA7-999D-BA5A008FEF3A",
"description" : "Uses the Refect API to add a task to the daily note",
"order" : 3,
"instructions" : "Create a Reflect [access token](https:\/\/reflect.app\/developer\/oauth). First create the oAuth app, use https:\/\/inbox-ai.app as URLs.",
"folderId" : "222273F7-7F1D-4912-9BAD-8110B26D9AD1"
},
{
"displayName" : "Create Note (API)",
"order" : 5,
"identifier" : "createNoteApi",
"headers" : [
{
"key" : "Authorization",
"value" : "Bearer {{ secretAccessToken }}",
"id" : "E64E3893-FC61-4BB1-872F-9F4BCA5DACD7"
},
{
"id" : "F9B289ED-0325-4883-9CF9-28C49DA3C9BE",
"key" : "Content-Type",
"value" : "application\/json"
}
],
"forceConfigurable" : false,
"payload" : "{\n \"subject\": \"{{ subject | jsonEscape }}\",\n \"content_markdown\": \"{{ content | jsonEscape }}\"\n}",
"instructions" : "",
"description" : "Uses the Refect API to add a note",
"folderId" : "222273F7-7F1D-4912-9BAD-8110B26D9AD1",
"method" : "POST",
"icon" : "network",
"id" : "50DB39FE-A87F-4FCB-A059-05A910AAD370",
"url" : "https:\/\/reflect.app\/api\/graphs\/{{ graphId }}\/notes",
"variables" : [
{
"id" : "D60B9B60-C3BE-46B4-8A87-2771FB6F77FB",
"name" : "secretAccessToken",
"description" : "Your access token",
"required" : true,
"type" : "string",
"ai" : false,
"value" : "",
"label" : "Access Token"
},
{
"ai" : false,
"id" : "1AAE610B-4B1B-4E96-A03D-A42EB5169876",
"required" : true,
"name" : "graphId",
"value" : "",
"description" : "The name of your graph",
"label" : "Graph ID",
"type" : "string"
},
{
"ai" : true,
"label" : "Subject",
"name" : "subject",
"id" : "DAEACBAD-819F-413D-AF1B-7BD880559ECA",
"description" : "The subject of the note",
"value" : "",
"type" : "string",
"required" : true
},
{
"name" : "content",
"label" : "Content",
"ai" : true,
"value" : "",
"id" : "B00D4F31-9371-47BE-B549-AA45D217297A",
"type" : "string",
"required" : true,
"description" : "The content of the note in markdown"
}
],
"type" : "makeAPIRequest"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment