How to edit Salesforce credentials within several Alteryx workflows at once


In Alteryx, the Salesforce connector is very useful to easily import raw data from Salesforce using its wonderful API. All you need to input is the email and password for a API enabled user login, as well as the Security Token.

The connectors are so convenient to combine SFDC tables, that you will quickly have several within a single workflow, and you will most likely have several workflows, that you spent countless hours to configure, as Salesforce tables can be VERY long. For instance, you must select the proper combination of fields to extract, as Salesforce tables, especially the custom ones, are laden with open text fields, useless for analytics in most cases. Those open text fields are input with very few restrictions of characters and will often trip S3 or your database.

There is just a slight issue with this design: on one hand, the SFDC credentials you did input are stored locally in each connector object you deploy, on the other hand, most SFDC logins require episodic password changes as they are set to expire. And should that happen, you will have failing workflows, unless you tirelessly inventory the location of each and painstakingly process to edit them. In my experience, that is not the end of the suffering: when you click on the connector to go edit the credentials, Alteryx Designer sends a request to SFDC featuring credentials, and after a few of those requests, sometimes just a handful, SFDC will lock your login out! You will then need to either get an admin to unlock the account, always a fun conversation to have with an admin, or wait one hour for SFDC to automatically remove the lock.

Can this get worse? You bet! Some versions of the connector will wipe out all the settings from the tool when you click to update the credentials! Obviously, Alteryx is aware of the issue, and here is the official guidance, quoted integrally from here with spelling errors:

Password Expiry
If you’re password expires in Salesforce you will receive a pop up error message in Alteryx. Currently there is no Alias option for the Salesforce Connector therefore if you’re password expires you will have to manually go and change it in each connector. This is something we are looking at internally to try and create an Alias for similar to that available with the database connections. 
For the time being the easiest alternative is to have your salesforce admin create a generic login and set this password to never expire. If this is not an option you can go to User Settings > Advanced > Disable Auto Config and this will allow you to change the password in your salesforce connectors without getting locked out and the error message popping up.

Needless to say, this is not satisfying, as the generic login is not always an option within reach. Having faced the issue way too often, I invested time to research the issue and came up with a free and practical hack that will reliably perform the credentials update, for all your Salesforce connectors with minimal efforts, giving you more time to analyze!

Step 1

Gather all the workflows or copies of the workflows containing one or many SFDC connectors into a single folder on your hard drive.

Step 2

If you don’t already have it, install the excellent utility Notepad++ which you should have already. If not, it is free, as in “free beer”.

Step 3

Copy one of your connectors with the expired credentials, into a new Alteryx workflow, save it under a temp name, close it and then right click it from Windows Explorer and select Edit with Notepad:

Step 4

Notepad++ should open your workflow and you should see your username, scroll to the bottom to see Password and Token. Copy each of the string between the <> and tags that you need to edit and paste aside into another tab of Notepad++for further use

You can also view your credentials from within Alteryx Designer, once you configure the right setting:
Go to Options–>User Settings–>Edit User Settings. Under here you will click on the Advanced tab and then select  “Display XML in Properties Window” . Now when you click on the Connector, there will be a XML view option on the left hand side.

Step 5

Reopen workflow in Alteryx, it can stay open in Notepad++, edit the connector credentials in Alteryx to the proper version, test whether the connector does access SFDC properly and save the workflow in Alteryx. Notepad++ should then prompt you to refresh the workflow, which you will accept. And now you can pick up the strings, that is encoded credentials for the updated credentials in Notepad++. You can then close Alteryx.

Step 6

In Notepad++, press CTRL+h, select Find in Files tab, input the proper directory where you gathered all your workflows to be updated, input old credentials in Find what, and updated in Replace with, then press Replace in Files, and you are done!!

Obviously, if you need to edit the login and/or the Token, just rinse and repeat…

This entry was posted in Alteryx, Productivity, SFDC. Bookmark the permalink.

6 Responses to How to edit Salesforce credentials within several Alteryx workflows at once

  1. Jim says:

    Hi! We are starting to use Alteryx with Salesforce and we are running into the issue where we get the Salesforce Input (5) 401 Client Error: Unauthorized for URL: error. Once we click on the Salesforce Connector, the job runs as it should. Do you know of any workarounds for this? We would like to use the Alteryx Scheduler and Server, but if we cannot automate these jobs, we will not be able to take advantage of those tools. Any help you can share is appreciated. Thanks!

    • Frederic says:

      Sorry, I have not come across that one… Sounds like a connectivity issue?
      I use many scheduled jobs with the SFDC connector and it is mostly reliable…

      • AD says:

        Fred do you have query builder or custom query in your salesforce workflows ?
        Which version of alteryx and salesforce input tool is being used ?

        I am encountering the 401 issue for numerous workflows that have a custom query and not able to schedule them

        • Frederic says:

          I am using the query builder…
          I am using Alteryx 2020.2.3 but all the previous versions have been working for me, no problem scheduling those extractions…

  2. Varun says:

    Hi Fredrick

    I am having an issue with SF input tool wherein when its runs fine individually on server machine as well as local machine but when I try to publish a workflow from my local machine to the gallery (with the same SF login credentials) it says ‘ {‘error’: ‘invalid_grant’, ‘error_description’: ‘authentication failure’} (Tool Id: 1) ‘ and I have to go to the server (set up on Amazon Work Spaces) ,open the workflow and add same credentials again in the SF input tool in order for it to get to work

    This is really defeating the purpose of having the gallery as most of our workflows have SF input connectors and everyone in the team wants to use Alteryx on their local machine and publish workflows to gallery. Can you please suggest?

    Thanks

Comments are closed.