TomFrankly / pipedream-notion-voice-notes

Take notes with your voice and send them to Notion
94 stars 49 forks source link

Set up process snag #68

Closed seeinghuman closed 4 months ago

seeinghuman commented 5 months ago

Describe the bug Not a bug, but a lack of knowledge on my part I guess. In step 7, what is my notes database referring to exactly?

Which cloud storage app are you using? (Google Drive, Dropbox, or OneDrive) Dropbox

Have you tried updating your workflow? Please follow the steps here, and ensure you've tested the latest version of the workflow: https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/#update

Does the issue only happen while testing the workflow, or does it happen during normal, automated runs?

Please paste the contents of your Logs tab from the notion_voice_notes action step.

TomFrankly commented 5 months ago

@seeinghuman any Notion database will work! I just labeled that field "Notes Database" since most people use this workflow to take voice notes.

Here's my guide to Notion databases: https://thomasjfrank.com/notion-databases-the-ultimate-beginners-guide/

Hope that helps!

seeinghuman commented 5 months ago

Thanks for the quick reply! My first test failed and I'm not sure how to proceed.

It came back with "Failed to create Notion page."

TomFrankly commented 5 months ago

Not sure why that'd be happening, but if you can provide the info the bug post template asks for, it'll help me debug the issue!

seeinghuman commented 5 months ago

I found this at the end. Understand you're speaking to someone quite ignorant when it comes to all of this stuff. I get that I didn't make these fields, but having never used any of these programs before, I'm not sure how to create them.

@notionhq/client warn: request fail { code: 'validation_error', message: 'Duration (seconds) is not a property that exists. AI Cost is not a property that exists.

seeinghuman commented 5 months ago

I added the field and got another error

@notionhq/client warn: request fail { code: 'validation_error', message: 'Duration (seconds) is expected to be rich_text. AI Cost is expected to be rich_text.'

I went back to Notion and don't see an option for rich text

TomFrankly commented 5 months ago

@seeinghuman ah, that's a bit odd! Did you select values for those fields in the Pipedream action?

You can leave them blank, but I think they're supposed to only allow you to select properties of the right type. Both of those should be number-type properties.

If you change their type to Number in Notion, things should work.

I'd also recommend using this process to check if your workflow is updated, and updating if not: https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/#update

As for "rich_text", that's the API's name for the "Text" property type that you can see in Notion. It's the default type for new properties.

seeinghuman commented 5 months ago

Yes, I added the field names you used in your example, because they looked useful.

I had "text" (was the default) selected and there was no "rich-text" option, but changing it to #numbers worked! So thank you for you quick and efficient help!

Oh, I tried to look into the update status / process and am not finding a screen that looks the same. I didn't see "workflows" on the sidebar menu, so I'm not exactly sure what you have selected there.

seeinghuman commented 5 months ago

Maybe there's no edit option because it says "deploy pending"

TomFrankly commented 5 months ago

@seeinghuman if you're in the editor and refresh the page, you should be able to see if there are any updates available by looking here:

CleanShot 2024-02-05 at 15 48 45@2x

Glad the property change worked for you!

seeinghuman commented 5 months ago

I "updated" to most recent version and tried to run it by placing new files in the Dropbox folder. It came back with an error on the "notion-voice-notes" pane.

Error Failed to create Notion page.

DETAILS at Object.createNotionPage (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:1677:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.run (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:2163:30) at null.executeComponent (/var/task/launch_worker.js:294:22) at MessagePort.messageHandler (/var/task/launch_worker.js:791:28)

TomFrankly commented 5 months ago

Can you post a screenshot of your Logs tab? Or copy and paste the last few lines?

The actual error from Notion should be there.

seeinghuman commented 5 months ago

Here's a PDF from a link that was emailed to me [Uploading screencapture-pipedream-seeinghuman-event-history-2by54kqSRlTnmkVU1CguIcNUaqd-2024-02-05-15_12_15.pdf…]()

TomFrankly commented 5 months ago

You may have submitted that last message too quickly, as that link just links to this Github issue!

seeinghuman commented 5 months ago

[Uploading screencapture-pipedream-seeinghuman-event-history-2by54kqSRlTnmkVU1CguIcNUaqd-2024-02-05-15_12_15.pdf…]()

TomFrankly commented 5 months ago

Same issue, unfortunately!

CleanShot 2024-02-05 at 16 52 21@2x

You can simply copy the last few rows of the Logs tab to your clipboard and paste them if that's easier.

seeinghuman commented 5 months ago

Sorry about all that. Here's the end of the log:

@notionhq/client warn: request fail { code: 'validation_error', message: 'body failed validation. Fix one:\n' + 'body.icon.emoji should be defined, instead was undefined.\n' + 'body.icon.external should be defined, instead was undefined.' }

2/5/2024, 3:05:46 PM Error creating Notion task: at null.buildRequestError (/pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/node_modules/.pnpm/@notionhq+client@2.2.14/node_modules/@notionhq/client/build/src/errors.js:162:16) at Client.request (/pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/node_modules/.pnpm/@notionhq+client@2.2.14/node_modules/@notionhq/client/build/src/Client.js:378:54) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at null.retry.retries (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:1660:19) at Object.createNotionPage (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:1656:5) at Object.run (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:2163:30) at null.executeComponent (/var/task/launch_worker.js:294:22) at MessagePort.messageHandler (/var/task/launch_worker.js:791:28) { name: 'APIResponseError', code: 'validation_error', status: 400, headers: Headers { [Symbol(map)]: [Object: null prototype] { date: [Array], 'content-type': [Array], 'content-length': [Array], connection: [Array], 'x-powered-by': [Array], 'x-notion-request-id': [Array], etag: [Array], vary: [Array], 'cf-cache-status': [Array], 'set-cookie': [Array], server: [Array], 'cf-ray': [Array] } }, body: '{"object":"error","status":400,"code":"validation_error","message":"body failed validation. Fix one:\nbody.icon.emoji should be defined, instead was undefined.\nbody.icon.external should be defined, instead was undefined.","request_id":"2d755172-73f1-45c2-8418-bd62e028aa94"}' }

TomFrankly commented 5 months ago

For that, you should just need to set the page icon setting! It should have been set to an emoji of a robot by default.

seeinghuman commented 5 months ago

I changed it and tried again, There's a different error in Pipedream. After the first occurrence of the error, I deleted the file from Dropbox and then replaced it with another copy. Same error:

Error Failed to download file: Response code 410 (Gone) at Object.downloadToTmp (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:331:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.run (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:1973:5) at null.executeComponent (/var/task/launch_worker.js:294:22) at MessagePort.messageHandler (/var/task/launch_worker.js:791:28)

seeinghuman commented 5 months ago

From the log db["dropbox_state"] ⭅ {"path":"/Public/NotionVoiceTranscribe","recursive":false,"cursor":"AAHm8QwO2jhsAifn6ffSqeJHVCpOj7T9NfgyTSVVy07MNkM6b_BFy0k_6q1yAlULLNieIjr4IzQ3yq2Njq1RrE86rDg8iZfHPH971Y_msM-KHLCw5drgL5sn8kXi-TGFV2o9TLk5fjodF5tvGIuC0w7TNsSwGHBHbhWzS8zaVSpX2QDxA9WJd9I8ll9El0iA59g7LAWxjh9LdGNszT5e7loPTyI2OP285ch3a11ThSy9vcV6vmYdmfyfBEBTvydNmtT48ihQUsO4LILTCA6MhOXE"}

TomFrankly commented 5 months ago

Dropbox expires their links after a couple hours. If you upload the file again (rename it), it should work.

seeinghuman commented 5 months ago

I tried with a different file and it's still "failing to crate notion page" (whatever that means)

Error Failed to create Notion page. at Object.createNotionPage (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:1677:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.run (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:2163:30) at null.executeComponent (/var/task/launch_worker.js:294:22) at MessagePort.messageHandler (/var/task/launch_worker.js:791:28) (notion_voice_notes) details Message: Failed to create Notion page. Total Duration: 48,664 ms Compute Time: 48,336 ms Execution Start: 2024-02-06T04:27:56.854Z Execution End: 2024-02-06T04:28:45.518Z Steps Executed: 1 / 1 Credits: 2 Version: 20 (d_Zds6xRjy)

seeinghuman commented 5 months ago

2/5/2024, 8:28:45 PM @notionhq/client warn: request fail { code: 'validation_error', message: 'body failed validation. Fix one:\n' + 'body.icon.emoji should be defined, instead was undefined.\n' + 'body.icon.external should be defined, instead was undefined.' }

2/5/2024, 8:28:45 PM Error creating Notion task: at null.buildRequestError (/pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/node_modules/.pnpm/@notionhq+client@2.2.14/node_modules/@notionhq/client/build/src/errors.js:162:16) at Client.request (/pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/node_modules/.pnpm/@notionhq+client@2.2.14/node_modules/@notionhq/client/build/src/Client.js:378:54) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at null.retry.retries (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:1660:19) at Object.createNotionPage (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:1656:5) at Object.run (file:///pipedream/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:2163:30) at null.executeComponent (/var/task/launch_worker.js:294:22) at MessagePort.messageHandler (/var/task/launch_worker.js:791:28) { name: 'APIResponseError', code: 'validation_error', status: 400, headers: Headers { [Symbol(map)]: [Object: null prototype] { date: [Array], 'content-type': [Array], 'content-length': [Array], connection: [Array], 'x-powered-by': [Array], 'x-notion-request-id': [Array], etag: [Array], vary: [Array], 'cf-cache-status': [Array], 'set-cookie': [Array], server: [Array], 'cf-ray': [Array] } }, body: '{"object":"error","status":400,"code":"validation_error","message":"body failed validation. Fix one:\nbody.icon.emoji should be defined, instead was undefined.\nbody.icon.external should be defined, instead was undefined.","request_id":"c3bf7477-5886-436a-b77f-4092d101eddf"}' }

seeinghuman commented 5 months ago

Is this what you meant by icon?

Screenshot 2024-02-05 at 8 34 59 PM
TomFrankly commented 5 months ago

It's this setting here, in Pipedream:

image

seeinghuman commented 5 months ago

You're being so helpful I hate to keep coming with more issues. There were no options there, and the instructions said I could type it in, I typed "robot" and now I have this error and no idea to get out of it.

Screenshot 2024-02-05 at 9 35 56 PM
TomFrankly commented 5 months ago

Hmm, honestly at this point I think you should click the link again and set the workflow up from scratch: https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/#copy-my-workflow

I just haven't seen this number of issues come up before, so perhaps something went wrong during the workflow duplication process.

I've created a video for you showing every step of this setup process in detail, ending with a successful test: https://www.loom.com/share/c6db525dcb114145a1674d4c05855a75?sid=7fe3d80f-eafa-4dc0-b7fc-fa847008dcd3

seeinghuman commented 4 months ago

Hi Frank,

I agree it mades sense to start over. I’ve just around to this now and it went ok - except at the test stage I got a “failed to download" error. Here’s the error contents, and I’m hoping you can see what I need to do to make it work.

Thanks! Darryl

Error Failed to download file: getaddrinfo ENOTFOUND ud78r9s3t6c6s7afa545778b4100.dl.cloudstorageusercontent.com DETAILS at Object.downloadToTmp (file:///tmp/pdg/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:331:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.run (file:///tmp/pdg/dist/code/1f555395881e5b79fbe9431588e45c7f9763b0394fdc7e0eaabc4ff53300ac5d/code/Notion-Voice-Notes.mjs:1973:5) at null.executeComponent (/var/task/launch_worker.js:294:22) at MessagePort.messageHandler (/var/task/launch_worker.js:791:28)

Exports

Inputs

Logs

Details

Detailed/code mode OpenAI (ChatGPT) Account DropboxNotionVoice Transcribe Notion Account @.*** Previous Step Data (Set by Default) { "trigger": { "event": { ".tag": "data", "client_modified": "2030-01-22T20:39:35Z", "content_hash": "99018994bda76c25de2613871a6c354f1059f879b03786284924ee5568145674", "id": "id:BCd78_dtB7AAAAAAAAAAm2", "is_downloadable": true, "link": "https://ud78r9s3t6c6s7afa545778b4100.dl.cloudstorageusercontent.com/cd/0/get/C-64shEc-r56kB0jBeGPoKnGTbQtlliGe8kZds_3ZXZOcCaXYfMxyd9zLaZ1eaQWDTu1BgQriOM_hxup6T39aCzc8juqf7ftEr4Y0SCwTGdEZcXbnOyPp4aQ9EfryE3p8_N3W2eNUc_WdZQhUfVOpdfZGsQ8fce7p_ynCV71KwB9Dx2cBQkKb4EJ7FZRVmtYUl/file", "name": "sound-sample-10mins.mp3", "path_display": "/Users/sample-sound-10mins.mp3", "path_lower": "/users/sample-sound-10mins.mp3", "rev": "025de20479j6e65000000150r508q9r", "server_modified": "2030-01-22T20:39:35Z", "size": 5200935 }, "context": { "id": "2cbk8IOd7P3uz57Mb3nGFZvDFdv", "ts": "2024-02-20T00:05:04.829Z", "pipeline_id": null, "workflow_id": "p_YyCNrAL", "deployment_id": "d_ybsMK3p1", "source_type": "TRACE", "verified": false, "hops": null, "test": true, "replay": false, "owner_id": "o_MMIoWlW", "platform_version": "3.47.4", "workflow_name": "Notion Voice Notes 2 Workflow(Dropbox)", "resume": null, "emitter_id": "dc_jkuE1Eb", "trace_id": "2cbk8IOd7P3uz57Mb3nGFZvDFdv", "JIT": true, "attachments": {} } } } Summary Options [ "Summary", "Main Points", "Action Items", "References" ] Notes Database Voice Transcriptions 50b25427-911b-4cb2-9496-bcfc938e3491 Note Title (Required) Name Note Duration Duration Note Cost AI Cost Note Tag Tags Note Page Icon 🤖 Note Tag Value voice note ChatGPT Model gpt-3.5-turbo Enable Advanced Options false

Test

Test to deploy

On Feb 6, 2024, at 8:23 AM, Thomas Frank @.***> wrote:

Hmm, honestly at this point I think you should click the link again and set the workflow up from scratch: https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/#copy-my-workflow

I just haven't seen this number of issues come up before, so perhaps something went wrong during the workflow duplication process.

I've created a video for you showing every step of this setup process in detail, ending with a successful test: https://www.loom.com/share/c6db525dcb114145a1674d4c05855a75?sid=7fe3d80f-eafa-4dc0-b7fc-fa847008dcd3

— Reply to this email directly, view it on GitHub https://github.com/TomFrankly/pipedream-notion-voice-notes/issues/68#issuecomment-1930225539, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BCQC6VVWP33JAHYZET5QLYSJKHTAVCNFSM6AAAAABC24LOQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZQGIZDKNJTHE. You are receiving this because you were mentioned.

TomFrankly commented 4 months ago

@seeinghuman can you specifically post the logs? I can't really help if I can't see the logs.

Please also try setting the workflow up from scratch and uploading the exact audio file I used in the video, which you can download here: https://www.dropbox.com/scl/fi/htbnh86xvqevzznhzgej6/testaudio.m4a?rlkey=l4w8mhlqgds2khwjrllvekqbp&dl=0

One of two things is true; either you're doing something different than I did in the video, or you're uploading audio files that are somehow different. Using my audio file will help to rule out the latter issue.

seeinghuman commented 4 months ago

I ran it again, using the “generate test file” option. The error from logs is here:

This step was still trying to run code when the step ended. Make sure you promisify callback functions and await all Promises. (Reason: FSReqCallback, Learn more: https://pipedream.com/docs/code/nodejs/async/)

On Feb 20, 2024, at 9:00 AM, Thomas Frank @.***> wrote:

@seeinghuman https://github.com/seeinghuman can you specifically post the logs? I can't really help if I can't see the logs.

Please also try setting the workflow up from scratch and uploading the exact audio file I used in the video, which you can download here: https://www.dropbox.com/scl/fi/htbnh86xvqevzznhzgej6/testaudio.m4a?rlkey=l4w8mhlqgds2khwjrllvekqbp&dl=0

One of two things is true; either you're doing something different than I did in the video, or you're uploading audio files that are somehow different. Using my audio file will help to rule out the latter issue.

— Reply to this email directly, view it on GitHub https://github.com/TomFrankly/pipedream-notion-voice-notes/issues/68#issuecomment-1954650679, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BCQC46I5AS3F5QYQG6SQLYUTJDTAVCNFSM6AAAAABC24LOQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUGY2TANRXHE. You are receiving this because you were mentioned.

TomFrankly commented 4 months ago

Generate Test File won't work, and the program should throw an error letting you know – you'll need to upload a real audio file! And it needs to be a newly uploaded file. Dropbox only exposes download links for a couple hours.

seeinghuman commented 4 months ago

I got it working but have a question about an issue. Instead of retaining the audio file name for the Name field in Notion, it appears to be creating its own title / Name based on the general essence of the recording. This is going to make it terribly difficult to keep track of which audio files have been transcribed…

Do you know I can alter the way this is working?

Thanks!

On Feb 20, 2024, at 10:15 AM, Thomas Frank @.***> wrote:

Generate Test File won't work, and the program should throw an error letting you know – you'll need to upload a real audio file! And it needs to be a newly uploaded file. Dropbox only exposes download links for a couple hours.

— Reply to this email directly, view it on GitHub https://github.com/TomFrankly/pipedream-notion-voice-notes/issues/68#issuecomment-1954799984, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BCQCYAXWMOJPW2ZTI5MWDYUTR4PAVCNFSM6AAAAABC24LOQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUG44TSOJYGQ. You are receiving this because you were mentioned.

TomFrankly commented 4 months ago

Yes, you should be able to add an Update Page step after the final step: https://pipedream.com/apps/notion/actions/update-page

Then you can find the filename from the first step, hit Copy Path, and set that as the title:

CleanShot 2024-02-20 at 13 01 57@2x

I won't be able to provide additional support for this though, as it's an extension of functionality. I can only support the app as it's currently built – we'll be adding future improvements to this workflow to our upcoming Flylighter mobile app.

seeinghuman commented 4 months ago

Thanks for the reply. First, I’m no coder so I’m not following this very well. It looks like you’re suggesting a change in the Trigger Component?

Before I attempt something that I don’t understand at all, I wonder if you can provide some quick replies:

Isn’t this file name creation something that has been built as part of your workflow?

Or does it come from something that already existed that you incorporated?

If I do manage to figure out how to make the change, will updates from you in the future overwrite that change?

If making adjustments is the way forward, would it be easier to add a field that uses the original name and still allow this name process to occur as it is now? (I could add an “Original File Name” field in Notion - and might accept that doing this manually is the safest, though not most efficient solution.)

On Feb 20, 2024, at 12:03 PM, Thomas Frank @.***> wrote:

Yes, you should be able to add an Update Page step after the final step: https://pipedream.com/apps/notion/actions/update-page

Then you can find the filename from the first step, hit Copy Path, and set that as the title:

@.*** (view on web) https://github.com/TomFrankly/pipedream-notion-voice-notes/assets/684961/a09af717-a030-46fd-8f6c-8ff1e3623720 I won't be able to provide additional support for this though, as it's an extension of functionality. I can only support the app as it's currently built – we'll be adding future improvements to this workflow to our upcoming Flylighter mobile app https://flylighter.com/.

— Reply to this email directly, view it on GitHub https://github.com/TomFrankly/pipedream-notion-voice-notes/issues/68#issuecomment-1954965999, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3BCQC5PR32PZDYM57ZDWTTYUT6SDAVCNFSM6AAAAABC24LOQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUHE3DKOJZHE. You are receiving this because you were mentioned.

TomFrankly commented 4 months ago

Name creation happens in the workflow, but you can add an other custom step at the end to change it as I've suggested.

My updates only affect the notion_voice_notes Action, and only if you manually update the action. No overwrites to additional actions you add to the workflow – the workflow itself is yours. It just has actions I built in it.

I'll leave the rest up to you to explore and test yourself! I have Pipedream tutorials planned, but their docs are also helpful: https://pipedream.com/docs