Download Salesforce speficif report

Good afternoon,
I am using the salesforce extension with the three nodes below but I find unconvenient for two reasons: 1. if I retrieve the report via rest API, it returns a JSON and when converted the table rows becomes column and it takes too much to load, 2. if I use the node Salesforce simple query I need to download all the different tables and rebuild the repor through multiple join.

image

Question, why not developing a node (in line with competitor Alteryx) that allows to select and download a specific report?

Hello @vstefano,

You can propose new ideas for the devs to review under the ‘Feedback & Ideas’ category. I think that would be a great suggestion for the devs to look over!

Although if you wanted to, you could probably use a GET request and ping the API directly to get the report you want specifically. There is more info on the API below:

TL

1 Like

Hi Thor,
actually I was able to develop the connector myself using pyhton.
I have followed the guidelines of Salesforce in order to extract report with pyhton, connecting to the Salesforce API. Even with no prior python experience, it was quite easy to develop the code.

Once done, than I have integrated it in Knime using the Python node.

Now it is possible and superfast for me to download any salesforce report already in table format.

Should you need more details, let me know.

Stefano

2 Likes

Great to hear you got it!

TL

Hi @vstefano.

Thank you for your solution.
Is it possible for you to share your workflow on the forum, so that others can study and learn to?

Best regards
Hugo

Hi Hugo,
yes, here it is my solution.
I skip the part of set up Python in Knime. You can refer to this:
https://docs.knime.com/2021-12/python_installation_guide/#configure_python_integration
sample_code_salesforce_report.txt (2.4 KB)

sample_code_credentials.txt (904 Bytes)

In order to create the connector, you need to have SFDC 1.username,2.password and 3. token (necessary to connect to the API).

I have first encrypted the credentials (see attached sample to use, sample_code_credentials). You execute this in python only once or when you change your password.
Briefly, you execute attached script “sample_code_credentials” and an encrypted credential file is created.
Be sure to insert your credentials in the code: "
image

Final step is to insert the python script, inside the Knime node, to retrieve the report (see sample_code_salesforce_report).

Please be sure to indicate the directory in which you have saved the credentials file.
image

Insert your SFDC domain in the string (see in yellow below).
You can insert in the code multiple Salesforce report and choose then which one to retrieve (see yellow part).

Final result is this: you click and get the report.
image

I hope this can help.

Stefano

2 Likes

I really appreciate your effort and help.
Thank you very much

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