Is it Possible to Deploy Triggers for Multiple External Accounts per User Using Pipedream Connect API?

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

I have a use case where I want to create workflows that use multiple accounts on the same app for a given user of my application. I understand that this is not possible in workflows-- they default to using the most recent account for a given app when there’s multiple. So I’m considering putting the logic into my application backend, and using Pipedream connect just for the account credential storage & API Proxy functionality.

For each Pipedream Connect (externalUserId) user, that user would have multiple accounts connected for an app-- we’ll use gmail for example.

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 from my backend.

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)?

What would best practice be for receiving trigger events at my backend? Deploying triggers via the Connect API??? And if so, could I deploy triggers for multiple different accounts for a given Pipedream connect user?

Yes as part of the payload when you deploy a trigger via Connect, you specify both the externalUserId and the authProvisionId, so you can deploy a trigger for user foo, which uses one Gmail account, and another trigger for that same user foo that uses a different Gmail account.

ok awesome thanks!