Creating workflow for Typeform and MongoDB

Hello, I’m relatively new to web development. I was tasked to link Typeform and MongoDB for a webapp and I decided to try using Pipedream. The process I am trying to create can be described as follows:

Step 1: User registers at the webapp to complete their survey. This creates a user account at MongoDB, specifically a document in a “User” collection.

Step 2: Once the user has completed the survey, this triggers an action that inserts a document into another “Results” collection linked to the user.

However I encountered a few issues when trying to create the workflow using Pipedream, listed below:

Issue 1: I am unsure how to fill in the fields for the “Create a new connection to MongoDB” form. (I’ve attached an image of the form)

Issue 2: Do I have to insert the code in the workflow in any part of my webapp?

Sorry in advance if any of my questions seem a bit unclear, I’m still trying to figure things out.

Welcome @thommerrilin241 ! Happy to help.

Re: issue #1, are you using a Mongo database hosted by a specific service (e.g. Mongo Atlas), or does your company host a Mongo DB internally? It depends on where your DB is running, but you’ll normally find the user, pass, hostname and database name as a part of the connection details for the database. For example, Mongo Atlas provides a Connect button next to your cluster where you can find this information (see docs). Let me know what service you’re using and I can try to point you to the right place.

Re: issue #2, if you’re just looking to write a new User document for every Typeform submission, you should be able to do that completely within Pipedream. So for this particular workflow, you shouldn’t have to include any code in your web app. Each time a user submits the Typeform, this should run in the background.

Let me know if that helps!

Hi @dylburger, thanks for the response! I’m currently using Mongo Atlas to host the database.

Great! Did that Mongo Atlas docs link help point you in the right direction?

I’ve looked through their documentation but can’t find the option to whitelist an IP address.

Does your organization require you whitelist an IP address? Pipedream will actually connect to Mongo from a large range of IP addresses - we don’t have a static range where you’ll receive traffic from. If possible, I’d recommend either opening up Mongo to the public internet (0.0.0.0/0), or working with your team to setup a bastion host, as recommended here.

Here’s documentation from Mongo Atlas on configuring IP access rules.