Is it Possible to Send and Receive Emails through a User's Gmail Account via Pipedream?

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

Hi everyone,
I’m exploring a workflow design question and would appreciate guidance from anyone who has worked with Gmail integrations in Pipedream.
I’m building a web application that needs to send emails from a user’s own Gmail account (after they connect it through Pipedream) and also receive replies on the same email thread. The goal is to have my app trigger outbound messages on behalf of the user, then capture inbound replies programmatically.
I reviewed the Pipedream Gmail docs and components, but I’m not fully clear whether this end-to-end flow is feasible. Specifically:

  1. Can Pipedream reliably send emails from a user’s authenticated Gmail account in a way that preserves the thread ID?
  2. Can Pipedream listen for replies to those same threads and route them back to my application?
    If anyone has implemented something similar or can point me in the right direction, I’d really appreciate it.

Thanks in advance.

Hi ,

You can try Pipedream’s string.com. This app can help you to build your workflow through your stated requirements.

Also, you can try to take a look at Pipedream Connect: Pipedream Connect. This feature allow your end user authenticate their Gmail account to your system

Thanks, Mohammed. I’ve integrated Pipedream Connect into my app and have the send-email flow working. The part I’m still trying to solve is the email receiving logic. Specifically, I’m unsure how to set up the inbound side for users who authenticate their Gmail accounts.
Do I need to create a separate workflow for each connected Gmail account, or can a single centralized workflow handle replies from multiple user accounts? And if there’s an alternative approach that avoids spinning up workflows per user, I’d really appreciate any pointers.
Thanks again for the help.

Should be a single workflow

You can check this document to understand how to run a single workflow for your end users

I am able to connect a user’s Gmail account to my application, but I have not found a way to invoke the workflow on behalf of that user. The documentation does not seem to describe how a workflow can be executed per user when the trigger is a Gmail event rather than an HTTP endpoint. Is there a supported method for invoking a workflow in this scenario, or a recommended pattern for handling user-specific executions?

When you deploy the trigger, make sure to set the workflow_id, so emitted events will programmatically invoke that workflow: Deploy trigger - Pipedream

How do I connect that workflow for an end user, right know what I had done is added my account while creating the workflow, but then it only listens for the email in my gmail inbox, how do I connect the account of my customer through my app. When I make a request to deploy the trigger for an end user with the workflow id, it gives record not found response.

Hi , I believe this document provide detailed steps for you to invoke workflow for your end user https://pipedream.com/docs/connect/workflows

Have you tried to follow it? If so, could you share screenshots of the steps you’re being blocked on?

For real example, you can check the playground here https://pipedream.com/connect/demo

I created the workflow like this.

response: {
status: 404,
statusText: ‘Not Found’,
headers: Object [AxiosHeaders] {
date: ‘Thu, 04 Dec 2025 06:29:56 GMT’,
‘content-type’: ‘application/json; charset=utf-8’,
‘transfer-encoding’: ‘chunked’,
connection: ‘keep-alive’,
‘x-frame-options’: ‘SAMEORIGIN’,
‘x-xss-protection’: ‘1; mode=block’,
‘x-content-type-options’: ‘nosniff’,
‘x-download-options’: ‘noopen’,
‘x-permitted-cross-domain-policies’: ‘none’,
‘referrer-policy’: ‘strict-origin-when-cross-origin’,
vary: ‘Accept-Encoding, Origin’,
‘cache-control’: ‘no-cache’,
‘x-request-id’: ‘a7dea1c5-e4bd-4edc-a997-d6ecd92e72cc’,
‘x-runtime’: ‘0.020598’
},
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: ‘XSRF-TOKEN’,
xsrfHeaderName: ‘X-XSRF-TOKEN’,
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [Object [AxiosHeaders]],
method: ‘post’,
url: ‘https://api.pipedream.com/v1/connect/proj_xxxxx/triggers/deploy’,
data: ‘{“id”:“gmail-new-email”,“external_user_id”:“xxxxx”,“configured_props”:{“gmail”:{“authProvisionId”:“apn_xxxxx”}},“webhook_url”:“https://mohammeds-macbook-air.taile683b8.ts.net/api/webhooks/gmail-incoming",“workflow_id”:"p_5VCDL8J”}’,
allowAbsoluteUrls: true
},
request: <ref **1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: ,
outputSize: 0,
writable: true,
destroyed: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 237,
_hasBody: true,
_trailer: ‘’,
finished: true,
_headerSent: true,
_closed: true,
_header: ‘POST /v1/connect/proj_JPsA3xp/triggers/deploy HTTP/1.1\r\n’ +
‘Accept: application/json, text/plain, **/*\r\n’ +
‘Content-Type: application/json\r\n’ +
‘Authorization: Bearer xxxxxxx\r\n’ +
‘x-pd-environment: development\r\n’ +
‘User-Agent: axios/1.13.2\r\n’ +
‘Content-Length: 237\r\n’ +
‘Accept-Encoding: gzip, compress, deflate, br\r\n’ +
‘Host: api.pipedream.com\r\n’ +
‘Connection: keep-alive\r\n’ +
‘\r\n’,
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: ‘POST’,
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: ‘/v1/connect/proj_xxxxx/triggers/deploy’,
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: ‘api.pipedream.com’,
protocol: ‘https:’,
_redirectable: [Writable],
Symbol(shapeMode): false,
Symbol(kCapture): false,
Symbol(kBytesWritten): 0,
Symbol(kNeedDrain): false,
Symbol(corked): 0,
Symbol(kChunkedBuffer): ,
Symbol(kChunkedLength): 0,
Symbol(kSocket): [TLSSocket],
Symbol(kOutHeaders): [Object: null prototype],
Symbol(errored): null,
Symbol(kHighWaterMark): 65536,
Symbol(kRejectNonStandardBodyWrites): false,
Symbol(kUniqueHeaders): null
},
data: { error: ‘record not found’ }
},
status: 404
}

This is the API response I received upon deploying the trigger for a user

You can check this Playground, try to deploy the Gmail trigger there, you should see details on the Debug tab. You should also use Pipedream SDK

Playground asks me for a webhook url in order to trigger the workflow, but apparently my workflow doesn’t have a webhook url as it does not have an http trigger, the trigger itself is receiving the email.

Yes that’s how it should work, you should follow the playground example

Your workflow should use HTTP trigger, which will give you the HTTP endpoint that you can pass to the Deploy Trigger process

My requirement is that when one of my end users receives an email in their Gmail inbox, the workflow should capture that event in Pipedream and then post the email details to my application’s webhook. Since the trigger is the Gmail event, the workflow would not have an HTTP trigger.
Given this setup, does it mean that this use case is not supported?

  1. You setup the Workflow with HTTP trigger
  2. You deploy the Gmail trigger for your user using the Pipedream Connect SDK, where you will input the HTTP endpoint in step 1
  3. When your Gmail trigger in step 2 is triggered, there will be an event in the HTTP trigger you created in step 1

How is it that I deploy a gmail trigger as such, isn’t trigger a part of the workflow?