This is an instructional on how to use a workflow automation tool Zapier in order to connect AI with other software. Zapier allows different apps to interact with each other. Recently, this enabled Zapier to connect ChatGPT with apps like Medium and LinkedIn, allowing generated text to be automatically posted in these social media sites.
The following steps show how to connect:
- Zapier→ Email. Email content sent to Zapier triggers a chain of emails.
- Email → LinkedIn. Content sent in an email is automatically posted in LinkedIn
- Email → ChatGPT. Content sent in an email is automatically summarized into a Medium blog post by a Large Language Model (LLM) ChatGPT.
- ChatGPT → Medium. Content generated by ChatGPT is automatically posted on Medium.
As with the other instructionals, these instructions are not provided with intention of you using this exact chain of steps, but to introduce you to the power of workflow automation using generative AI. With this knowledge, you can venture out to automate all kinds of software together using Zapier.
Link 1. Email set-up
Set up an email address through Zapier so that when an email is sent to this address, it will trigger the chain of tasks described above.
1. Sign in / Sign up with Zapier
2. Click on the orange plus sign. It may say the words “Create a Zap” once you hover over the button.
3. You will be taken to a blank zap template. Click on step 1 - Trigger.
In the window which appears, click on the “Search” bar and type in “Email”. In the options which appear, select “Email by Zapier.”
5. In the new window which will appear, click on the option menu under the title “Event”. Then click on “New Inbound Email”. This will specify what will trigger the chain of tasks which you will subsequently specify.
6. Click “Continue”.
7. Choose a name for the email address which will trigger the next chain of events once you send an email to this address. Here we chose the name “postrepost”. Note that the actual email will also involve a string of random letters and numbers and a domain name @zapiermail.com.
8. Copy the email to a local document from where you can extract it later.
9. Click continue
10. Now draft an email. Specify the email address to what you copied from Zapier earlier.
11. Write a LinkedIn post. Put the title of the post in the subject line. Put the body of the post in the body of the email.
12. Go back to Zapier. Click on “Test trigger”.
13. If your email was successfully received by Zapier, you should see a confirmation window which looks something like this.
14. Click “Continue”.
Link 2. Create a LinkedIn post from email
1. You will automatically be redirected to step two once you clicked “Continue”. In this search bar, start searching for LinkedIn among the apps and select it from the list.
2. In the window that will appear, click on the text-box “Event”.
3. From the drop-down menu, select “Create Share Update”. This is what LinkedIn calls a post.
4. Click “Continue.”
5. Next, click on “Login” to login to your LinkedIn account through Zapier and connect the two accounts together. I have already logged into my account prior so my screen will look a little different.
6. In the “Comment” section, specify what content you want to populate the body of the LinkedIn post. Click on the text box “Comment” and select “Body Plain” from the drop down menu which appears. This will insert verbatim the content of the email into the LinkedIn post.
7. If you would like for LinkedIn to use the image attached to the email as the banner image for your post, click on the text box under “Content - Image URL” and select “Attachment” from the drop-down menu.
8. Click “Continue”
Now test that this process actually works by clicking on the button “Test action”. After you clicked the button, log in to your LinkedIn account and check that a post with the content you sent in the email was posted onto your LinkedIn page.
Link 3. Creating a longer blog post with ChatGPT
1. Click on the plus button to add another action
2. Click on the text box and search for “ChatGPT”, then select the ChatGPT option from the list of available apps.
Click on the text-box “Event” and select the option “Conversation” from the drop-down menu.
Click on the button “Continue”.
6. Click on the “Sign in” button to connect ChatGPT into your Zapier workflow. You cannot simply log into your ChatGPT account and connect it thus to your Zapier. You will need to input an API key into Zapier to integrate it with ChatGPT.
7. To get an API key, log into your ChatGPT account. Then click on your account name in the top-right corner.
Note. You will need to have a paid account to use ChatGPT’s services in your Zapier chain of tasks in an unlimited fashion. Otherwise, you may run out of free credits on your ChatGPT account and the Zapier chain will no longer work.
8. Once you click on your account name in the top-right corner, click on the option “View API keys”
9. In the window which appears, click on “Create new secret key”
10. In the window that appears, give a name to your new API key and click “Create secret key”.
11. Save the key to a personal file. After you close the dialog box where ChatGPT reveals your API key, you will not be able to access the key again. So be sure to copy that key and paste it in a personal file where nobody else will be able to see it.
12. Paste this API key into the Zapier window requesting the API key.
13. Once you connected Zapier with ChatGPT, click “Continue.”
14. In the drop-down menu, click on the text-box under “User Message” and select “New Inbound Email in Email by Zapier” from the drop-down menu. This will instruct the user to feed the content from the email into the model.
In the follow-up drop-down menu, select “Body Plain”. This will inform ChatGPT that it should use the body of the email as part of the prompt.
16. Scroll down until you see the textbox “Assistant Instructions”. This is where your prompt resides. Give instructions to ChatGPT as to what it is to do with the email text you provide to it.
- Instruct ChatGPT to summarize the content into a longer blog post. An example prompt: “Elaborate on this LinkedIn post and expand on it so it will be a full blog post. DO not add any new information or outside knowledge to the original content. The target reading audience for the blog post are product managers, entrepreneurs and business leaders who are interested in Generative AI. The target reading audience for the blog post it not professionals in the field of Machine Learning and AI. Write the content to be comprehensible to readers not specialized in Machine Learning and AI.”
- Note: Notice that I specified the goal, explained what to do and not to do, my target audience and their level of knowledge on the content. Try to also be as specific and comprehensive in your prompts as you can be.
Your final set-up for the ChatGPT link of the process should look like this. Then click “Continue”
17. Zapier will now offer to test ChatGPT in its task within the chain. Check that the “user_message” is the same as the content you input into the body of your email in the first step.
18. Now click on the button at the bottom that says “Test action”.
19. After you click “Test action”, ChatGPT will generate a sample summary of the blog post. Check that the text in the section “content” meets your expectations as to what you would like to post on your Medium account. If it does not, consider expanding on your instructions to “ChatGPT” in 36 to improve output.
Link 4. Sending output of ChatGPT to Medium
1. Click on the plus button to add another link to the chain.
2. Search for “Medium” in the search box and select it from the options available.
3. Click on the text-box under the “Event” title, and then select the option “Create Story” from the drop-down menu. “Story” is what Medium calls new publications.
4. Click “Continue”
5. Connect your Medium account to Zapier by clicking “Sign in” or “Connect”. I have already completed this step so my button is titled differently.
6. You can automatically assign the title of the article to be a copy of the subject which you gave to your email. To do so, first click on the field “Title.”
7. From the drop-down menu which appears, select the option “New Inbound Email in Email by Zapier.”
8. From the list of options which will appear, select the “Subject” of the email.
9. You will need to specify the format of the input text. Select “Markdown.”
10. You will now instruct to populate the body of your Medium post with the output of ChatGPT. Click on the text box “Content”.
11. Select “Conversation in ChatGPT” from the drow-down menu.
12. From the next list of options, select “Reply.”
13. Click “Continue”
14. Check that the output of the model adheres to your standards. Modify your prompt if you see any issues.
15. Click on “Text step” to see if the article will successfully post on Medium.
You now have a chain of commands which will be triggered every time you email Zapier.