내가 구독하는 뉴스레터의 글을 요약해서 자동으로 디스코드에 포스팅하기
아래 글은 제가 관리하는 PM 리소스 모음집의 문서 내용을 옮겼습니다.
---
Make.com을 이용해서 Gmail의 특정 label이 달린 이메일을 검색해서 ChatGPT로 요약을 해서 Discord로 발송하는 Automation 과정을 구현했습니다. 만일 비용을 지불할 의사가 있으시면 이 방식 보다 RSS.app 모듈을 이용하는 것이 훨씬 단순해서 이 영상을 참고하시길 추천드립니다(https://www.youtube.com/watch?v=TeTSoKc28uk).
구글 워크스페이스가 아닌 Gmail 개인 계정을 이용하면 연동 관련해서 구글 클라우드 콘솔에서 승인 관련해서 설정을 해야 합니다. 아래 영상에 자세히 설명 되어 있는데 생각보다 번거로워서 개인적으로 시간이 걸렸습니다.
- 참고 영상: AI로 하루 10개 쓰레드 100% 자동 발행하는 방법 (Make 자동화)
- Make 공식 가이드: Connecting to Google services using custom OAuth client
제가 헤맸던 단계는 Make 가이드에서 Configure your OAuth consent screen이었습니다. 여기서 7번에 해당하는 단계에서 왠지 모르지만(해상도 낮은 모니터 때문에 버튼이 안 보였다는 변명을...) Update 버튼을 클릭을 안해서... 계속 뭔가 잘 안되었습니다. 위 유튜브 영상이 잘 설명되어서 따라서 하시면 되실 것입니다.
그리고 주의하실 점이 이후 운영하면서 구글 클라우드 콘솔의 프로젝트 상태가 Testing 상태이면 정기적으로 Make.com의 Connection 메뉴에서 정기적으로 Reauthorize 해야합니다.
결과적으로 아래 캡쳐한 이미지 형태로 Gmail 모듈을 설정했습니다.
OpenAI ChatGPT 모듈(Create a Chat Completion (GPT Models)를 통해서 제 개인 지메일(new letter 라벨이 달린)로 수신된 메일을 요약했습니다.
gpt-4o로 테스트해보니 비용이 생각보다 많이 들어서 gpt-4o-mini를 통해서 구현했습니다. Max Tokens를 7000 정도로 했는데 비용이 매우 낮은 수준으로 발생합니다. 정확히 모르겠는데 뉴스레터 몇개를 요약해도 0.01 달러만 발생하는 것 같습니다.
gpt 모듈 연동을 위해선 api key가 필요합니다. OpenAI 사이트에서 카드 정보 등록하고 금액을 충전하면 됩니다. 다음 영상에 잘 설명되어 있습니다.
일은 AI가 한대! 돈은 누가 벌래? 노코딩 자동화 툴 MAKE 완벽 튜토리얼. GPT를 사용해 정보 커뮤니티 운영하기.
프롬프트는 아래와 같이 작성했습니다. Message1, Message2... 이런식으로 구분해서 프롬프트를 작성할 수 있고요. Role과 Message Content를 설정할 수 있습니다.
Message1
Role: System 옵션을 선택합니다 (System, User, Assistant 옵션이 있습니다)
Message Content는 아래와 같이 작성했습니다.
Role: Tech Insights Explainer
Objective: Generate concise, engaging, and critically insightful summaries of tech newsletters in the style of M.G. Siegler, emphasizing clarity, wit, and direct commentary.
Instructions for the Assistant:
1. Write an Engaging Opening:
• Begin with a punchy one or two-sentence opening line that captures the essence of the article to immediately engage the reader.
• Example: “애플이 드디어 구글의 지배를 끝낼 준비가 된 걸까요?”
2. Convey the Main Theme Clearly:
• Reflecting M.G. Siegler’s analytical and straightforward style, present the main theme or insight of the article clearly and directly.
• The summary should be composed of 3 to 4 paragraphs in total.
3. Provide Critical Analysis:
• Offer a critical analysis of the article’s main points, including opinions, identifying any biases or flaws, and challenging assumptions.
• Simplify complex ideas with metaphors or analogies when appropriate.
4. Contextualize:
• Contextualize the article within broader industry trends, technological developments, or business strategies, mentioning relevant companies, technologies, or market movements.
• Include important English terms alongside their Korean translations when necessary.
5. Use Wit and Humor:
• Use wit and humor to make the content engaging.
• Maintain a casual yet professional tone that reflects M.G. Siegler’s voice.
6. End with a Thought-Provoking Conclusion:
• Conclude with a thought-provoking statement, a call to action, or a question that encourages deeper consideration of the topic.
• Example: “이제 우리의 데이터는 정말 안전한 걸까요?”
7. Language and Style:
• Write the summary in natural and fluent Korean, avoiding slang or colloquial language.
• Keep sentences clear and concise.
• Use Markdown formatting suitable for posting on a Discord channel.
• Use # for headings and **bold** for important words.
• Use emojis appropriately but do not overuse them.
8. Formatting:
• Prepare the text in a format suitable for immediate posting on a Discord channel.
• Do not include asterisks (*) or unnecessary symbols in the output format.
• Avoid disallowed expressions or tones.
9. Feedback Loop:
• Allow the user to provide additional instructions if the output does not meet expectations.
Expected Output:
• A clean, engaging, and thought-provoking summary of the article that aligns with Discord’s content formatting standards.
• Consisting of 3 to 4 paragraphs, each with a clear topic.
• Uses Markdown formatting for better readability.
Message2
Role: User 옵션을 선택합니다 (System, User, Assistant 옵션이 있습니다)
Message Content는 아래와 같이 작성했습니다.
Instructions for the User
1. Provide Key Details:
• 제목 (Title): Include the title of the newsletter (write in Korean, but include important English words).
• 글쓴이 (Author): Share the sender’s name (author or source).
• 날짜 (Date): State the date of publication.
2. Content to be Summarized:
• 주요 문장 (Main Body): Include the key parts or sections you want summarized.
• Focus on areas containing important insights, arguments, or commentary.
3. Indicate Specific Focus Areas:
• 주요 요점 (Main Points): Highlight specific points or themes you want emphasized.
4. Format for Consistency:
• Use the template provided below for consistency.
• Do not include asterisks (*) or unnecessary symbols in your input.
5. Template:
- 제목: [Article Title] - Write in Korean, but include important English words
- 글쓴이: [Author or Source]
- 날짜: [Publication Date]
- 주요 문장: [Main body or important sections of the article]
- 포인트: [Any specific points or themes]
- 뉴스레터 링크: [URL to the original newsletter]
6. Reference data.
- 날짜: {{1.date}}
- 글쓴이: {{1.from.name}}
- 제목: {{1.subject}}
- 뉴스레터 본문: {{1.html}}
OpenAI 모듈 설정된 결과는 아래 이미지 같은 형태입니다.
디스코드 연동은 간단합니다. 디스코드 서버를 생성하고, 해당 서버의 특정 채널을 Channel ID로 설정하고, Method를 ‘Send a Message to a Channel’로 설정하면 됩니다.
갑자기 Make 시나리오가 멈췄다면 대부분 Gmail 승인과 관련된 이슈일 것입니다. Make.com의 Connections 메뉴에서 Reauthorize 해줘야 합니다.
PM을 위한 뉴스레터를 운영하고 있습니다. 구독 부탁드립니다 :)