Questions on a workflow to connect Memberstack and Webflow

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

Mohammed Zeeshan : Hey gang!
Been following Pipedream for past 6~ months but today i got hands on setting first pipedream workflow between Memberstack and Webflow.
New sign ups are stored inside Webflow CMS.

Progress:

  1. Obtained Endpoint URL from Pipedream and connected to Memberstack to run HTTP trigger. This captures login email and user-id.
  2. Created a live collection item in Webflow with user-id (obtained in the above step) as slug.
    help
    Now i would like to update a field in Memberstack by passing it an item-id created by Webflow. Anyone know how to do that? Like creating a Member, Memberstack has other fields such as Updating/Deleting a member but it awaits an endpoint URL.

Dylan Sather (Pipedream) : Hi , in this case:

> Now i would like to update a field in Memberstack by passing it an item-id created by Webflow
What’s the trigger you’d like to run your workflow on here? Do you want to run the update when a specific event happens in Webflow?

Mohammed Zeeshan : Yes, i want to run this step when a member is created in Webflow.

I thought to add another http request and using that pipedream url to be hooked to Memberstack but it didn’t provide any URL.

Dylan Sather (Pipedream) : just to confirm, did you want this new logic to be a part of the original workflow (in steps 1 and 2) above, or a different workflow?

Mohammed Zeeshan : Yes, this is the part of the current workflow. it is 3rd step.

Dylan Sather (Pipedream) : Got it thanks. Just to confirm, is that workflow receiving events correctly (based on the setup you did in step #1)?

Does the incoming event from Webflow have the item ID you’re looking for?

Mohammed Zeeshan : Yes, the second step has the id.

Dylan Sather (Pipedream) : Thanks, I misunderstood your original problem. Are you trying to update an item by ID? Is the issue that you can’t find the Webflow API endpoint for that?

Dylan Sather (Pipedream) : or are you trying to update the fields attached to a User? I’m not familiar with Webflow so just trying to understand the specific object and what the specific issue is that you’re encountering

Mohammed Zeeshan : The second one - i am trying to update the field attached to a user. Btw, i have a loom recorded, getting you links in a moment…

Mohammed Zeeshan : Loom | Free Screen & Video Recording Software

Dylan Sather (Pipedream) : got it, that Loom helps a lot

Mohammed Zeeshan : So glad Dylan, i was actually too nervous recording this haha!

Mohammed Zeeshan : Actually i’m trying to mimic what i suppose to do with Zapier conventionally - source

Dylan Sather (Pipedream) : have you seen the docs on the Update Member API endpoint? Since the Memberstack API accepts an API key, you can add that as a Pipedream environment variable. Then, add a new Node.js code step and try modifying this code to update that hidden field in Memberstack:

const fetch = require("node-fetch")

fetch(`https://api.memberstack.com/v1/members/${your memberstack member ID here}, {
  method: 'POST',
  headers: {
    'X-API-KEY': process.env.MEMBERSTACK_API_KEY // fill in the name of your env var here
  },
  body: JSON.stringify({ 
    hidden_field_name: steps.webflow_create_live_collection_item.$return_value._id // reference the correct field name, but this value should reference the ID you want from the step above
  })
} 

Mohammed Zeeshan : Awesome! let will try this out and see. Will let you know how it goes.

I haven’t been through their api docs for this and didn’t have that in mind. Thank you :man-bowing:

Dylan Sather (Pipedream) : great! Yeah we don’t yet have Memberstack as an integrated app, which means we also don’t have actions like you’d find for other apps, but I added a ticket to track support for that here: [APP] Memberstack · Issue #686 · PipedreamHQ/pipedream · GitHub

Mohammed Zeeshan : Awesome! Memberstack has a very active community and they would definitely love pipedream support. Plus i would like to share this workflow with the folks there if there isn’t been one yet.

Dylan Sather (Pipedream) : that’s awesome, yeah please share!

Mohammed Zeeshan : Update: I have created that step(hopefully correct) and ran it.

1/2