Using Thomas Franks Voice to Text workflow

Heyy! Just today I referred to Thomas Frank’s tutorial on how to use chat GPT, Whisper AI and Pipedream with notion to create notes from voice to text referring to the below YouTube video- https://www.youtube.com/watch?v=A3pymMz0o-M&t=701s

It works great and I did upload a few videos. However for this one video the following error pops up and I am not sure how I can correct it.

Would someone be able to kindly help me out? I am very new to all this AI and code and so would really really appreciate a beginner level explanation
Thank you!

Hi @minuldolu1,

It appears that you’re encountering an error when trying to process a video using Pipedream, but the specific details of the error are not visible in the image provided. To assist you further, I’ll need some additional information about the error message and the steps you’re taking in your Pipedream workflow.

Could you please provide the following details?

  1. The exact error message you’re seeing.
  2. A brief description of the steps in your Pipedream workflow, especially the step where the error occurs.
  3. Any relevant code snippets from your Pipedream workflow that might be related to the error.

This information will help me understand the context of the issue and provide you with a more accurate solution. If you’re not comfortable sharing code or details here, you can also seek further assistance by visiting https://pipedream.com/support.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.

Hey @pi
Thank you so much for your interest in helping. Yes I will provide more information

TypeError
Cannot read properties of null (reading ‘0’)

    at null.executeComponent (/var/task/launch_worker.js:286:22)
    at MessagePort.messageHandler (/var/task/launch_worker.js:783:28)
```(notion_voice_notes)

Message:Cannot read properties of null (reading '0')
Total Duration:17,069 ms
Compute Time:16,688 ms
Execution Start:2024-01-06T08:06:51.444Z
Execution End:2024-01-06T08:07:08.513Z
Steps Executed:2 / 2
Credits:1
Version:14 (d_4nsxZkWo)

2. The entire code is publicly available and explained at
https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/
 
This is a YouTube video by the code creator explaining the issue as well
https://www.youtube.com/watch?v=A3pymMz0o-M&t=701s

3. This is the code that didn't work
Notion Account:medmbbs191727@stu.cmb.ac.lk
OpenAI (ChatGPT) Account:NotionVoiceNote1
Previous Step Data (Set By Default): { "trigger": { "event": { "kind": "drive#file", "id": "1Y9mbnFVDhTrG-tgV_8NvA9use-C9rxFm", "name": "Ward round Abhayajeewa sir", "mimeType": "audio/x-m4a", "starred": false, "trashed": false, "explicitlyTrashed": false, "parents": [ "1xwPjUYzDdQ-2RCOilGF1w9yKgJ6yP3F7" ], "spaces": [ "drive" ], "version": "1", "webContentLink": "https://drive.google.com/uc?id=1Y9mbnFVDhTrG-tgV_8NvA9use-C9rxFm&export=download", "webViewLink": "https://drive.google.com/file/d/1Y9mbnFVDhTrG-tgV_8NvA9use-C9rxFm/view?usp=drivesdk", "iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/audio/x-m4a", "hasThumbnail": false, "thumbnailVersion": "0", "viewedByMe": true, "viewedByMeTime": "2024-01-06T08:06:46.417Z", "createdTime": "2024-01-06T08:06:46.417Z", "modifiedTime": "2024-01-06T08:06:46.417Z", "modifiedByMeTime": "2024-01-06T08:06:46.417Z", "modifiedByMe": true, "owners": [ { "kind": "drive#user", "displayName": "HaMi Sketchy", "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIwPHYg9tnDFy375glMjJ3KGdZ-BoBlZaPqwqOZ558I=s64", "me": true, "permissionId": "11756006971102319265", "emailAddress": "hamisketchy@gmail.com" } ], "lastModifyingUser": { "kind": "drive#user", "displayName": "HaMi Sketchy", "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIwPHYg9tnDFy375glMjJ3KGdZ-BoBlZaPqwqOZ558I=s64", "me": true, "permissionId": "11756006971102319265", "emailAddress": "hamisketchy@gmail.com" }, "shared": false, "ownedByMe": true, "capabilities": { "canAcceptOwnership": false, "canAddChildren": false, "canAddMyDriveParent": false, "canChangeCopyRequiresWriterPermission": true, "canChangeSecurityUpdateEnabled": false, "canChangeViewersCanCopyContent": true, "canComment": true, "canCopy": true, "canDelete": true, "canDownload": true, "canEdit": true, "canListChildren": false, "canModifyContent": true, "canModifyContentRestriction": true, "canModifyEditorContentRestriction": true, "canModifyOwnerContentRestriction": true, "canModifyLabels": false, "canMoveChildrenWithinDrive": false, "canMoveItemIntoTeamDrive": true, "canMoveItemOutOfDrive": true, "canMoveItemWithinDrive": true, "canReadLabels": false, "canReadRevisions": true, "canRemoveChildren": false, "canRemoveContentRestriction": false, "canRemoveMyDriveParent": true, "canRename": true, "canShare": true, "canTrash": true, "canUntrash": true }, "viewersCanCopyContent": true, "copyRequiresWriterPermission": false, "writersCanShare": true, "permissions": [ { "kind": "drive#permission", "id": "11756006971102319265", "type": "user", "emailAddress": "hamisketchy@gmail.com", "role": "owner", "displayName": "HaMi Sketchy", "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocIwPHYg9tnDFy375glMjJ3KGdZ-BoBlZaPqwqOZ558I=s64", "deleted": false, "pendingOwner": false } ], "permissionIds": [ "11756006971102319265" ], "originalFilename": "Ward round Abhayajeewa sir", "fullFileExtension": "", "fileExtension": "", "md5Checksum": "ef154bab279a9b7f26e9c6cdad3d0c0c", "sha1Checksum": "0c51213be55a1b937f711c6835d8dd7db7e4c7b7", "sha256Checksum": "d8ff7319e1f0639806abb325d0b6dea9e93d4229eef24aa1238ca75064fe4fcc", "size": "5897369", "quotaBytesUsed": "5897369", "headRevisionId": "0BwpKIlKfJFuYajVROW5rYkR0MllHV0VTOGt5UzNsTlZLVXJvPQ", "isAppAuthorized": false, "linkShareMetadata": { "securityUpdateEligible": false, "securityUpdateEnabled": true } }, "context": { "id": "2aZaAZXQ3oHFE0voJvqcSIdryCf", "ts": "2024-01-06T08:06:51.431Z", "pipeline_id": null, "workflow_id": "p_5VCMmvN", "deployment_id": "d_4nsxZkWo", "source_type": "COMPONENT", "verified": false, "hops": null, "test": false, "replay": false, "owner_id": "o_KgI8XqN", "platform_version": "3.46.4", "workflow_name": "Notion Voice Notes (Google Drive)", "resume": null, "emitter_id": "dc_eKu7e2v", "trace_id": "2aZaAT6PfukTIqiLQbokyn81bkT", "attachments": {} } }, "google_drive_download": { "$summary": "Successfully downloaded the file, \"Ward round Abhayajeewa sir\"", "$return_value": { "name": "Ward round Abhayajeewa sir", "mimeType": "audio/x-m4a" } } }

Summary Options: [ "Summary", "Main Points" ]
Notes Database:Notion Voice Notes (093f86fb-bf4d-4a58-8a0e-381b09f55b70)
Note Title (Required):Name
Note Duration:-
Note Cost:-
Note Tag:-
ChatGPT Model:
gpt-3.5-turbo
Transcript Language (Optional):-
Enable Advanced Options:false

I hope I sent the correct details

Thanks once again

Hi @minuldolu1,

Based on the error message you provided, it seems like there is an issue with accessing an element of an array or object that is null. The error is occurring at a specific line in your Pipedream workflow code, which is attempting to read the first element ('0') of something that is null.

The error message points to the file Notion-Voice-Notes.mjs at line 1848. Without the specific code at that line, it’s difficult to provide an exact solution, but the problem is likely related to an array or object that is expected to have a value at index 0, but is actually null or undefined.

Here are some steps you can take to troubleshoot this issue:

  1. Check the Data: Ensure that the data you’re trying to access is properly initialized and not null. This could mean checking the output of the previous step in your Pipedream workflow to make sure it’s providing the data as expected.

  2. Error Handling: Implement error handling to check if the data is null before trying to access its properties. For example:

if (myArray !== null && myArray.length > 0) {
  // Safe to access myArray[0]
} else {
  // Handle the case where myArray is null or empty
}
  1. Review the Workflow: Since you mentioned you followed a tutorial by Thomas Frank, it might be helpful to revisit the tutorial and ensure all steps were followed correctly, especially where the data is being set or retrieved.

  2. Seek Further Assistance: If you’re still having trouble, you might want to reach out for more personalized support. You can visit https://pipedream.com/support for more help.

Remember to check the data at each step of your workflow to ensure it’s what you expect before moving on to the next step. This can help prevent null reference errors like the one you’re experiencing.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.