Can Pipedream Connect run workflows interacting with multiple accounts for the same app and do I need to use an API Proxy for DIY external auth?

This topic was automatically generated from Slack. You can find the original thread here.

I’m working on a project that uses Pipedream Connect. The idea is to, for a given “source” account on an OAuth app, sync changes to corresponding resources on one or more other “destination” accounts on the same OAuth app, for the same user. I’ve been reading the Connect API docs, and this snippet (screenshotted below) is now making me think that won’t be possible.

Is my use case possible? Is there any way for me to run workflows on behalf of my end users that interact with multiple accounts for the same app? If not, does anyone have any workarounds for this?

Currently, my possible solutions are:

  1. Just make due with a single account / end user.
  2. Use the end user account for the sources, and use a “service account” for the actions. This “service account” would need to be shared w/ each user
  3. DIY external auth for the “destination” accounts. I’ve not done this before so this would take some learning.
    Maybe I can use the Connect API Proxy to help with #3, doing semi-DIY external auth for the additional accounts for the user?
    → Claude is telling me to do this. Write a backend that uses the API proxy to do the actions for the “destination” accounts, receiving events directly from app or from (Pipedream triggers + HTTP requests to my backend). Thoughts???

Is my use case possible? Is there any way for me to run workflows on behalf of my end users that interact with multiple accounts for the same app?
This is not possible for now.

I think the workaround for now (on top of my mind):

  1. Create multiple “external users” on Pipedream — each will be authenticated with different accounts on the same app.
  2. On your app backend, store the authProvisionId for each external user ID
  3. On your app backend, add the code to manually execute actions with different authProvisionId

gotcha. Thanks. But i guess, since my users would have multiple “external users” on Pipedream, i would need to store, for each external account, the authProvisionId & externalUserId for that account. Does this sound right to you?

So User X has 3 “sample_app” accounts:

• authProvisionId (aka the external accountId) of “xxx” and externalUserId in PD of “1”
• authProvisionId (aka the external accountId) of “yyy” and externalUserId in PD of “2”
• authProvisionId (aka the external accountId) of “zzz” and externalUserId in PD of “3”
To perform actions, I would need to pass in a valid pairing for a pipedream connect user-- like externalUserId of “2” and authProvisionId of “yyy”. I couldn’t use externalUserId of “1” with authProvisionId of “zzz”. Does this sound right to you??

Thank you in advance

since my users would have multiple “external users” on Pipedream, i would need to store, for each external account, the authProvisionId & externalUserId for that account.
Yes this sounds right to me

To perform actions, I would need to pass in a valid pairing for a pipedream connect user
Yes this sounds right to me

ok thx

– one last thing-- what are your thoughts about using one Pipedream external user ( externalUserId ) for one user in my application?

For each Pipedream Connect (externalUserId) user, say I’d have multiple accounts for Gmail.

Short term, I need to deploy triggers for 1 Gmail account per user. Long term, I’ll need to deploy triggers for multiple Gmail accounts per user. I would deploy triggers and execute actions with the connect API.

Would this be possible with Pipedream Connect (using the API instead of the workflows)-- namely, having multiple accounts for a single Pipedream user? Could I deploy multiple triggers, each with the same pipedreamUserId with different authProvisionId 's (external app account IDs)?