How to Automate Workflow Creation for App-Based Triggers without Errors?

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

Hi , thanks for your email. Posting the issue here as discussed. We are able to create triggers but still facing errors when we are trying to automate creation of workflows for our external users which contain app based triggers. Here are the details of the issue. We referred to the docs given below:

We were able to successfully deploy triggers for our end user.
It was a gmail trigger which would work when the user receives an email.

const requestOpts:DeployTriggerOpts={
userId: ,
triggerId:“gmail-new-email-received”,
configuredProps:{
gmail:{
authProvisionId: gmail,
triggerType:“polling”,
timer:{
intervalSeconds:1,
},
labelIds:[“INBOX”],
excludeLabels:null,
},
projectId:"
",
},
externalUserId: ********************,
webhookUrl: [**](https://eodo193cjqo0xcs.m.pipedream.net)***********************************************,
}

const response:DeployTriggerResponse = await pipeDreamServer.deployTrigger(requestOpts);
console.log(response);

We put a webhookUrl there which gets hit whenever user receives an email. What we wanted to do was to store this email content in our end user’s google doc but the payload which gmail is sending to our webhookUrl doesn’t contain externalUserId of our end user, instead it is showing null there. We want to do this for many of our end users and we are avoiding manually creating workflows for our end users as it is not efficient.
If there is a workaround to it then request you to provide it to us.

Can you share the payload structure, obviously without any sensitive data?

Are you able to map the source ID to an external user in your app?

Yea we’re working on including relevant metadata in the emit payload, but that’s not live yet. For now can you deploy distinct webhook URLs? Or add unique params that help you identify your users?