st.doForJobs
This action allows you to apply the actions specified in its then parameter to each job provided by the parent action.
This action cannot start a workflow, so the SDK has no method for it: put it under its parent action in the workflow you pass to customWorkflow – see Building Workflows.
This action cannot start a workflow, so the CLI has no command for it: put it under its parent action in the workflow you pass to linkedin workflow run – see Building Workflows.
Constraints
⏺️ Root Start: not allowed.
⬆️ Parent Actions: st.searchJobs.
⬇️ Child Actions: st.openJob.
Parameters
{
"actionType": "st.doForJobs",
"then": { ... }
}then– object or array of child actions to apply to each job from the parent action.
Result options
This action doesn't produce its own distinct result. The effects are visible in the jobs that were involved, as they will contain a then field with the results of the applied actions. See usage examples for more details.
Usage examples
- Retrieving details for jobs from search results:
Workflow:
{
"actionType": "st.searchJobs",
"term": "product manager",
"limit": 2,
"then": {
"actionType": "st.doForJobs",
"then": {
"actionType": "st.openJob",
"basicInfo": true
}
}
}Completion:
Completion – result() returns this whole completion in data:
Completion – linkedin workflow run prints this whole completion as data:
{
"actionType": "st.searchJobs",
"success": true,
"data": [
{
"jobId": "4416248954",
"jobUrl": "https://www.linkedin.com/jobs/view/4416248954/",
"title": "Senior Product Manager",
"companyName": "Example Company",
"location": "San Francisco, CA",
"workplaceType": "remote",
"salary": {
"currency": "usd",
"minAmount": 140000,
"maxAmount": 180000,
"period": "yearly"
},
"easyApply": true,
"isPromoted": false,
"isSimilarMatch": false,
"then": {
"actionType": "st.openJob",
"success": true,
"data": {
"jobId": "4416248954",
"jobUrl": "https://www.linkedin.com/jobs/view/4416248954/",
"title": "Senior Product Manager",
"companyName": "Example Company",
"companyUrl": "https://www.linkedin.com/company/example-company",
"location": "San Francisco, CA",
"postedDate": "1w",
"applicantsCount": 84,
"workplaceType": "remote",
"employmentType": "Full-time",
"salary": {
"currency": "usd",
"minAmount": 140000,
"maxAmount": 180000,
"period": "yearly"
},
"description": "Example job description text.",
"applyUrl": "https://www.linkedin.com/jobs/view/4416248954/apply/",
"easyApply": true
}
}
}
]
}