Error while processing {P_result.entry.folder_id}

200 views
Skip to first unread message

matthewda...@gmail.com

unread,
Oct 15, 2014, 7:54:11 AM10/15/14
to suppor...@runmyprocess.com
I have set up very simple process to get the ID of a Google folder using:

Google API Login provider with Login Documents connector.
Google Documents provider with Get the id of a folder [v3.0]

I have created a GUI with a text field to enter the name of a folder with the variable name: folder_name. This is the input variable (along with the AUTH) for the get the id of a folder activity.


Please can you advise why the workflow is not returning a folder id to me?
(Please can you keep the explanation simple I'm not a programmer.)

Matthew Daniels

unread,
Oct 15, 2014, 8:19:00 AM10/15/14
to suppor...@runmyprocess.com
Dear Support

I can mot find a connector called "login Document list" as advised in the connector description, so I assume it is the "login Document" connector instead?


Returns the id of the folder you requested.
Note: to be able to use this web service, you need to log in using the "login Document list" web service of the "Google API login" provider first.

Parameters:
s
folder_name: the name of the folder  (entered via gui)

To retrieve the id of a given folder, create an output variable with the following value.
Note 1: if the folder is not found or if 2 folders have the same name, the id will contain an error message.

${P_result.entry.folder_id}


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to a topic in the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/nUnQFt1avsE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/819e9d63-7229-4740-8dcd-e9c8fa0869bf%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

Pankaj Kumar

unread,
Oct 15, 2014, 8:52:57 AM10/15/14
to suppor...@runmyprocess.com
Hi Matthew,

Its seems return JSON object structure is changed by google webservices. you will not get the folderId in ${P_result.entry.folder_id}.

Please try the ${P_result.feed.entry.id}, it contains the result something like this


Here "3A0B-QhTaGv81ffTFJ1cUFJY1Z3aEE" is the id of the folder.


Thanks,
Pankaj



You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

Matthew Daniels

unread,
Oct 15, 2014, 9:02:32 AM10/15/14
to suppor...@runmyprocess.com
Pankaj

Thank you that seems to have worked.  Now I need to get it so I just have the ID of the folder only.



Matthew Daniels

unread,
Nov 5, 2014, 5:07:57 AM11/5/14
to suppor...@runmyprocess.com
(November 2014) I'm trying to get the ID of a folder (Google "Get the ID of a Folder" connector where the description in the connector is wrong.  The connector states the output is ${P_result.entry.folder_id} which fails.  

Instead I am using ${P_result.feed.entry.resourceId} which works but returns the ID with a prefix folder:oboma125987... This is not usable in "Move a word document / spreadsheet /presentation into a folder [v3.0]"

Please advise how to get the URL returned to the process with out the folder: prefix.  the current result is not usable by downstream processes.

Please can you help I have been trying for a long time now without success.

thoshino

unread,
Nov 14, 2014, 1:59:45 PM11/14/14
to suppor...@runmyprocess.com, matthewda...@gmail.com
Hi,

Quick fix will be to try to process the value to remove the folder.
You can use freemarker script to do that.
I think builtins like "split" will be good.

If your string looks like
folder:sfasdfasdfasd
and wanted to get rid of "folder:", then you can do
<#assign my_folder = "folder:sfasdfasdfasd">
${my_folder?split(":")[1]}

split will make array, and index 0 is first item that you don't want, so just get 2nd part. This works if folder_id NEVER contain a 2nd ":".

Another thing you can look for is, look at the full return message from that Connector call, and try to find a value that is exactly what you want.
This might be more sustainable approach.

Best regards,

Taka
Reply all
Reply to author
Forward
0 new messages