Check out my blog for more articles or Github for my free-to-read JavaScript Ebook that covers all the new features from ES6 to 2019
My girlf...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Alberto, just another question. I want to create more than one tweet per day. One of the regular tweets will be a countdown until an event.
I could now do the same with another Google Spreadsheet but I would love to use the same document but another tab.
I checked the google information and I miss the idea how I could create an function that refers to an tab2 instead only tooks the first.
So I also don't understand what is an "active" sheet and what is not. Do you have any idea?
Next Challenge solved. Different tweets from the same source with different content. Works fine.
I'm really excited.
Awesome, what's your twitter profile?
the Google Sheet solution is working for "SaMDExpert"
It's a very new account and with an direct purpose to support Software as a Medical Device Industry, StartUps and NGOs products.
So, direct after I wrote the question I guess I found it. :)
developers.google.com/apps-script/...
So now I have to make some tests. :)
Awesome!
Done. Works. :) Is just not as complicated as thought. I love it.
@AngeloM Thank you for the inspiration.
How I have done it. Just created a second sheet and copied the original Script. I change the first rows to:
function sendDailyTweet2() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
SpreadsheetApp.setActiveSheet(sheet.getSheets()[1]);
....
Awesome, if you want to go further you can try adding images to your tweets.
I'm familiar with Markup but Dev.to is using something different so I didnt spend so much time for that.
But of course, I'll do it as soon as I figured out how it works. :)
Hi Alberto, I like that Tutorial. Thank you very much for the work.
I just enabled the Google Dev Account and I added the trigger. Unfortunately I cant choos the deployment "Head". It's just showing "Test Environement".
I guess because the account is not yet confirmed. Am I right?
I'm not sure but I read this on the documentation:
Note: There is only ever one head deployment for each Apps Script project. In order to use a head deployment the user invoking the script must have at least read access to the script project.
developers.google.com/apps-script/...Interesting. Is my project, my app and my script. .... Hm, I will check that.
Let me know if you find out the reason so I can add a note to the tutorial
Of course, I will do it.
Today, I checked it and it doesn't worked out. I will give you more details when I checked the log and so on.
Alberto, the code ran today and created an error. But the error is nothing with the trigger.
It's just that I missed to initialize the "identifier".
Now it's done and lets see how it works. We keep in touch. :)
Awesome, something I forgot to implement was a check if "today" there's a tweet to post. You might want to put the code to send a tweet inside of an "if else".
Good point. I take it to my list of future improvements.
So I checked the googletwitterbot and now it works perfect! Thank you very much. '
I have the google sheet and can put in advance the content inside and can be sure that on the proper day the content is online.
Great is, that I can in advance create twitter reminders for any deadline and I can remind follower about the reaching end of a period.
Hello Alberto,
After a while now, I changed the bot a little bit. But not in the code but only in the table.
But now the automatic executions do not work anymore and it asks for a property.
Do you have an idea what I could do?
Nice one!!
I was thinking about building something similar, but then I discovered TweetDeck!
Looks cool but in this case I just wanted something simple that I could do by myself. If i needed something more complicate I would definitely use a tool like that one.
Very cool stuff information shared! it's nicely alternate to Tweet Deck, but there on Tweet Deck you need to automate manually, but with your script can deploy automatically, it's really time saver.
Wow Javascript
I need to get the row for today so I still need to loop over the rows to get the right one, no? Did you have something else in mind?
Is there a way to edit this script so you can use it with essential access?