Forum Discussion

SLMPACDevelopme's avatar
SLMPACDevelopme
Qrew Member
2 years ago

How to get record ID into Pipeline

Hi there friends.

Here's what I'm trying to do...

I have an "Events" table which includes a production report area, comprised of 6 multiline text fields for notes from department heads. As part of this production report, I want to capture weather data so that we can analyze that information against attendance/sales anomalies. I have a button that triggers a webhook in a pipeline to fetch the weather data. The weather data gets entered into its own "Weather Reports" table. All that works great. The issue is that I want that information to then update back to the events record from whence the button was pressed. I'm having trouble figuring out how to tell the pipeline what the original record ID for the event where the button was pressed it. I'm sure there's an easy solution, but I'm kinda new to this and putzed around long enough lol. Help?

------------------------------
SLMPAC Development
------------------------------

5 Replies

  • HI ,

    It will help to post the schema of the table to figure easily or at least your pipeline

    In Pipelines , if you are triggering web hook manually , you can find the Record ID from menu which pops up during creation process using {{a.id}} or searching for Record ID



    ------------------------------
    Prashant Maheshwari
    ------------------------------
    • SLMPACDevelopme's avatar
      SLMPACDevelopme
      Qrew Member
      Thanks for the reply Prashant. I should have thought to post some screenshots. Thanks for the tip. The pipeline images are below, but essentially all I've built are three steps: 
      • A - incoming request from a webhook URL
      • B - outgoing request to openweatherAPI
      • C - create record in weather reports table
      My thought was if I could somehow get the button URL to direct to the webhook with a Record ID header somehow, and then grab that in the pipeline in a step D-E, search and update records? But I can't figure that out. Open to other suggestions! Like I say, I'm pretty new to this, and especially API calls and such. I appreciate your time!







      ------------------------------
      SLMPAC Development
      ------------------------------
    • PrashantMaheshw's avatar
      PrashantMaheshw
      Qrew Captain

      Some brainstorming

      Method 1

      • When triggering the button which triggers the web hook , we can edit the record with API_edit to turn a checkbox ON in the same record
      • Post Step C in your pipeline , we can search for the record for record with checkbox ON , insert Record ID#
      • Turn the Checkbox Off

      Method 2 : Require control over incoming web hook
      • When trigger the web hook , we can send the Record ID# of the said record to the web hook in a data field 
      • We can get the Record ID# back in Incoming Webhook trigger


      ------------------------------
      Prashant Maheshwari
      ------------------------------
      • SLMPACDevelopme's avatar
        SLMPACDevelopme
        Qrew Member
        I think method 2 is what I was thinking but I used the wrong terms. I'm not positive how to send the record ID through with the webhook request (step A) as you describe. Do you have a resource to point me to, or do you mind talking through that a bit more?