This post is related to a previous post by Trevor here:
I’m a software dev and I work with Trevor, I was having a look at the workflow to try and solve the issue.
The “inserting a fake entry hack” before the input data for every field fixed the issue with the indexes getting mixed up.
But the next issue became that The Zapier JavaScript tool doesn’t let you take the input object as the output object from the previous step. So you have to choose fields you want to add to you input object.
It seems the issue is that Zapier splits the data by comma. Some of the data is people names from linkedin provided by the PhantomBuster app where they put their qualifications in the name.
Example - The second object of phantomOutput is real data with the first and last name switched out….
const phantomOutput = {
1: {
name: 'Phil Murray',
firstName: 'Phil',
lastName: 'Murray',
},
2: {
name: 'Nick Cage, PE, GE, DGE',
firstName: 'Nick',
lastName: 'Cage, PE, GE, DGE',
},
};
const inputObj = {
name: r'Phil Murray', 'Nick Cage', 'PE', 'GE', 'DGE'],
firstName: 'Phil', 'Nick'],
lastName: 'Murray', 'Cage', 'PE', 'GE', 'DGE'],
};
You can see that phantomOutputt“2”].lastName is ok but gets destroyed in between.
If we could have an option to make the inputData the object from the previous step’s output then this would be perfect. I think for someone using the JavaScript tool, receiving the raw data would be much more preferrable.
Is there any solution for this?