How Can I Correctly Propagate External User IDs in Pipedream Connect Workflow's Event.Context?

Can you please help me to resolve this issue

Okay so the core problem is that you’re trying to invoke a workflow from a Connect trigger, and the emitted event never contains the external-user-id, which means you can’t run the workflow. Is that right?

Yes

Okay, thanks. Checking it out.

Thanks

Is the workflow getting invoked when the trigger emits?

With workflow_id its not getting triggered, but with webhook_url it triggers but event.context has external_user_id: null

Got it, thanks. The external_user_id not being included when emitted to a webhook_url is expected, but we plan to address that soon.

It sounds like maybe there’s a bug re: not triggering the workflow, I’m looking into that.

but with the workflow_id, it even not triggers the workflow

I understand. That’s what I’m looking into.

Okay, thanks

And are you deploying the trigger via the REST API? Or SDK? It looks like REST above, but want to confirm.

I tried with both SDK and REST

and the result was same

I just deployed a trigger that emits to a workflow via the REST API and that works, but I was running into issues getting it to emit to the workflow when deploying with the SDK, so I’m still investigating.

    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,
      "workflow_id ": workflowId
    },
      {
        headers: {
          Authorization: `Bearer ${accessToken}`,
          "x-pd-environment": process.env.PIPEDREAM_PROJECT_ENVIRONMENT,
          "Content-Type": "application/json"
        },
      }
    )

Can you show me the actual request you sent, with the full payload? (please omit your access token of course)

my last message is the actual request snippet

I mean with the actual configured_props object, componentId, etc

sure, let me structure it first