Last active
September 14, 2022 07:13
-
-
Save ljlabs/6f299ca5f52fa06ee4e01b22716f02c4 to your computer and use it in GitHub Desktop.
workflowEngine-CF config file to create a news tweeting bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
if __name__ == '__main__': | |
main("{NAME OF YOUR CONFIG FILE}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": { | |
"node": "RepetitiveWIthDelay", | |
"sleep_duration": 3600, | |
"next_steps": [{ | |
"node": "HttpGetRequest", | |
"url": "https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&country=us,gb&language=en&q=cryptocurrency", | |
"next_steps": [{ | |
"node": "tweet", | |
"credentials": { | |
"api_key": "", | |
"api_key_secret": "", | |
"bearer_token": "", | |
"access_token": "", | |
"access_token_secret": "", | |
"client_id": "", | |
"client_secret": "" | |
}, | |
"template": "${restResponse.0.results.0.title}\n${restResponse.0.results.0.link}\n${restResponse.0.results.0.image_url}\n#Blockchain #cryptocurrency #news" | |
}] | |
}] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"node": "HttpGetRequest", | |
"url": "https://newsdata.io/api/1/news?apikey=YOUR_API_KEY&country=us,gb&language=en&q=cryptocurrency", | |
"next_steps": [{ | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": { | |
"node": "RepetitiveWIthDelay", | |
"sleep_duration": 3600, | |
"next_steps": [{ | |
... | |
}] | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"node": "tweet", | |
"credentials": { | |
"api_key": "", | |
"api_key_secret": "", | |
"bearer_token": "", | |
"access_token": "", | |
"access_token_secret": "", | |
"client_id": "", | |
"client_secret": "" | |
}, | |
"template": "${restResponse.0.results.0.title}\n${restResponse.0.results.0.link}\n${restResponse.0.results.0.image_url}\n#Blockchain #cryptocurrency #news" | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment