Workflow - TypeError — Invalid URL: 407674804074840067

Hi,

I get an email about this error in my workflow, not sure what it means.

TypeError — Invalid URL: 407674804074840067

at null.__node_internal_captureLargerStackTrace (internal/errors.js:412:5) at null.__node_internal_addCodeToName (internal/errors.js:168:9) at NodeError.NodeError (internal/errors.js:322:7) at global.onParseError (internal/url.js:270:9) at URL.URL (internal/url.js:346:5) at null.removeSearchFromUrl (/opt/ee/node_modules/@pipedreamhq/platform/dist/axios.js:18:17) at Object.default_1 (/opt/ee/node_modules/@pipedreamhq/platform/dist/axios.js:52:5) at Object.module.exports (/steps/send_message.js:10:47) at MessagePort.messageHandler (/var/task/launch_worker.js:629:41)

No return values or exportsfor this step

Hi @EMar

Sure happy to help, the issue is that 407674804074840067 is not a valid URl, a valid URL looks like https://pipedream.com.

Perhaps you’re passing a variable to a URL prop in a pre-built component.

Hi @pierce

Where’s that invalid url being entered?
I just used the Pipedream workflow to get the newest video from a youtube channel

Hi @EMar

The YouTube API does not return full URLs to videos. You’ll have to craft the video’s URL with it’s YouTube ID.

There’s a video that shows how to do that and send the new YouTube video with it’s full link to Slack:

Thanks but I don’t use slack…
The workflow seems to deliver what I need it to, but that email warning keeps arriving.

Hi @EMar

That video will show you how to recreate the YouTube video URL from the video ID captured from the same trigger.

No need to follow the Slack instructions.

I think my workflow is set up differently, there’s no text field:

Thanks for the screenshot, much easier to follow along.

Is it possible that auths.discord_webhook.oauth_id is not a URL? Have you tried console.log(url) to verify it’s a valid URL?

You’re way ahead of me now, not sure tbh.

Do you mean the steps_send_message code?

const url = auths.discord_webhook.oauth_uid

let content = params.message

const { embeds, username, avatar_url } = params

It looks like the errors are coming from your Ambient - New Releases workflow, not the workflow you took a screenshot from earlier.

Can you try deleting the Discord Send Message step and recreating it? I think there’s just something wrong with the configuration of it. The auths.discord_webhook.oauth_uid variable should contain a full URL, but instead it’s returning an integer value.

I recreared the Discord send message step, but get an error when I test it,
Also there’s a new field in this Webhook: Threat ID


Errorconnect EAFNOSUPPORT ::1:80 - Local (undefined:undefined)

at null.__node_internal_captureLargerStackTrace (internal/errors.js:412:5) at null.__node_internal_exceptionWithHostPort (internal/errors.js:590:12) at null.internalConnect (net.js:934:16) at null.defaultTriggerAsyncIdScope (internal/async_hooks.js:452:18) at null.null (net.js:1022:9) at process.processTicksAndRejections (internal/process/task_queues.js:77:11)

@EMar Could you try reconnecting your Discord Webhook account and try sending a message after that?

I have 12 workflows, 12 Discord Send Message webhooks. (new music releases)
Each webhook sends a different message to separate channels in my Discord server.
So there’s 12 accounts, one for each webhook, I deleted and recreated them all.

@EMar Thanks. Did you reconnect your Discord Webhook account at https://pipedream.com/accounts ? We recently fixed a bug that showed up in exactly the way you reported. If you reconnect your account, make sure that account is linked to the Send Message step, then test the step once more, do you still see the error?

@dylan yes I had to connect 12 accounts, because each webhook is for a different
Discord send message and every time I conencted a step it created a new account.

No error messages yet

Oh great, so it’s working OK for you now?

They were working but that error message kept coming to my email,
So I was getting 12 emails a day, but since I recreated the steps and accounts, no emails yet.

Thanks for getting back to me

1 Like