How can I correctly obtain and push a workflow ID to Google Sheets for efficient navigation to specific leads?

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

Hello everyone, I am trying to obtain the ID of the workflow and push it to Google Sheets as an additional column. Check Screenshot 1

The reason for doing this is that I won’t have to go through the Pipedream events history every time to find and check a specific LEAD. Instead, I can simply go to the Google Sheet, retrieve the LEAD’s ID from there, and insert it into the URL, which will directly navigate me to that particular LEAD. /inspect/**2SR37mrlZIOzbXzFLYvUJuYa5nA**

But the Pipedream context ID is incorrect when it comes to Google Sheets, and I’m unable to navigate to a specific lead based on the ID I have in Google Sheets. This is because the Google Sheet ID and the ID used for inspecting the URL do not match. They are different.

image.png

That is the event ID, not the workflow ID, so the events will expire from the UI after 7 days (that’s likely what the 2nd screenshot is telling you). Depending on what you want to do, if you’re looking for the workflow ID, you can use steps.trigger.context.workflow_id

I don’t need the workflow ID. I need the event ID if possible

image.png

Ok, well the individual events will expire from the UI after 7 days (they’ll stay in the Event History UI for 30 days on the Advanced or higher plans)

I understand but how can i post the EVENT ID to Google sheets?

I am already on Advance Plan because i am using Pipdream Proxy as well

Oh ok great, so you’ll have access to those events in the Event History UI for longer

It looks like you’re posting them the right way and it appears to be working, based on your screenshots, but maybe I’m not following the exact issue.

This is not working. Basically the ID posting to google sheet and the ID in event History is not the same.

Let me know if i have to shot a loom video for you

So here’s the sample. In Google Sheet the user “Pedro Lopez” have a ID of “2SR37mrlZIOzbXzFLYvUJuYa5nA”

But in event history the ID is different. inspect/2SR37m63PcafRP6HOxdZ8VSEfDE

image.png

Let me see if I can reproduce

Oh, you may want context.trace_id actually. Let me confirm the difference.

Yea, you should use context.trace_id instead of context.id. context.id is for that particular invocation, whereas trace_id will be reused if you’re suspending and resuming, and is what’s used in the URL for the Inspector and Event History.

Thankyou! The context.trace_id did the job. Appreciate your help