This topic was automatically generated from Slack. You can find the original thread here.
Hi everyone, I need some help with Pipedream Connect and external user IDs.
I’m trying to deploy a trigger programmatically and associate it with an external user. I’ve run into an issue where the external_user_id never seems to propagate into the workflow’s event.context. Here’s what I’ve tried so far:
- Using
webhook_url
• I deployed the trigger with the workflow’sunique urlas thewebhook_url.
• When the external event fires, the request does reach the workflow and it executes.
• Problem:event.context.external_user_idis alwaysnull.
• I also tried sending the external user ID in headers during deploy, but it still staysnull. - Using
workflow_id
• I switched to deploying the trigger withworkflow_idinstead ofwebhook_url.
• This time, the trigger deploys fine, but when the event fires, the workflow never runs at all — the request doesn’t even seem to reach the workflow.
• I’m guessing I may be misunderstanding how to route events when usingworkflow_id(e.g. should I be calling the trigger URL returned from the deploy response instead of the workflow run URL?).
My deploy code
Here’s the snippet I’m using:
const response = await [axios.post](http://axios.post)(
`https://api.pipedream.com/v1/connect/${process.env.PIPEDREAM_PROJECT_ID}/triggers/deploy`,
{
id: componentId,
external_user_id: userId,
configured_props: configuredProps,
// Tried both webhook_url and workflow_id here
webhook_url: "https://secret.m.pipedream.net"
// workflow_id: workflow.id
},
{
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-environment": process.env.PIPEDREAM_PROJECT_ENVIRONMENT,
"Content-Type": "application/json",
},
}
);
What I expected
• When using external_user_id in the deploy payload, I expected the workflow executions to include that user ID in event.context.external_user_id.
• I’ve followed the docs and the community thread here
• , but I’m still stuck.
Has anyone else run into this mismatch where webhook_url works but drops the external user, while workflow_id doesn’t trigger the workflow at all?
Any insights, examples, or working code snippets would be hugely appreciated!
