gRPC request timestamp conversion/format

In a gRPC request, Does Postman support auto-converting date strings to a timestamp? If I enter “2024-03-03T00:13:01.000000761Z” for the timestamp field, will postman convert it to a timestamp value like “1709424781”.

If conversion is not automatic, how change I change the request Message using a Pre-request script. I tried this to see if I could change the message: pm.request.messages.upsert(‘data:start_date’, { “seconds”:“1709412122”, “nanos”:“0” }); but it has no effect.

Are you using variables to set the request message?

You can access these elements in a “Before query”. You can update, or completely replace the variables.

For example…


I could use variables for the request message, except they do not appear to be supported for gRPC.
I get “errors in your composed message” and a log dump of the request.messages shows an unresolved {{…}}.

Having the startdate and enddate directly in the message on the call would be best, as I will end up with a large number of calls to test. I could then open a request, type in the date(s) into the message in human readable format and have a script automatically convert it to the google.protobuf.Timestamp.

So my conclusions are:

  1. Postman cannot use variables in a Grpc request message
  2. A Grpc request message (body) cannot be modified by a Before Query Script
  3. Postman does not know how to convert a human readable Date/Time to a timestamp in a Grpc message.
  4. Postman is falling further behind in usability with Grpc - time to look at other tools that already handle the above liitations.

@michaelderekjones Thank you for being part of the community and sharing the workaround!

@material-engineer-19 We are sorry that you are facing this difficulty. Let me assure you we consistently listen to our community’s feedback and strive to improve our product.

Now to clarify a few of things here:

  1. gRPC request messages do support variables. Looking at the screenshot shared above, you’ll need to wrap the variable in quotes to make it a valid JSON.

  2. As rightly mentioned, request mutation is not supported in gRPC, but we are already tracking it internally, and you can follow this thread for further updates.

  3. We’ll evaluate having first-class support for interacting with google.protobuf.Timestamp #11273

  4. Please open an issue on our tracker for any other specific bugs/feedback you want us to look at.


Thank you for the reply and especially pointing out my error with the message variables. I will follow those other threads. The timestamp auto-conversion would make Postman much more usable for Grpc. My team is currently using Kreya (it offers the auto-conversion), but I find it cumbersome to use. We have many endpoints using date filters. If I can get the date conversion stuff sorted out (even if using another endpoint to convert the date and update the variable), that will get me closer to convincing the team to move to Postman.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.